> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Get Scrapfly monitoring metrics

> Read aggregate or per-domain Scrapfly monitoring metrics.

`scrapfly.getMonitoringMetrics` reads Enterprise monitoring data for Scrape, Screenshot, Extraction, or Crawler requests.

```ts theme={null}
import { automation, onSchedule } from "automate.ax"
import { scrapfly } from "automate.ax/scrapfly"

export default automation("Monitor scraping", () => {
  onSchedule({ schedule: "0 * * * *" })
  scrapfly.getMonitoringMetrics({
    product: "scrape",
    domain: "example.com",
    period: "last1h",
  })
})
```

| Input                      | Type                                                              | Required | Default                                | Description                                               |
| -------------------------- | ----------------------------------------------------------------- | -------- | -------------------------------------- | --------------------------------------------------------- |
| `product`                  | `'scrape' \| 'screenshot' \| 'extraction' \| 'crawler'`           | Yes      | —                                      | Product metric family.                                    |
| `period`                   | `'last5m' \| 'last1h' \| 'last7d' \| 'last24h' \| 'subscription'` | No       | Provider default; `last24h` per domain | Rolling window.                                           |
| `aggregation`              | `('account' \| 'project' \| 'target')[]`                          | No       | Provider default                       | Aggregate grouping; unavailable with `domain`.            |
| `domain`, `groupSubdomain` | Target controls                                                   | No       | Aggregate metrics                      | Read one target domain and optionally combine subdomains. |
| `start`, `end`             | `Date`                                                            | No       | Period                                 | Exact target window. Supply both; requires `domain`.      |
| `includeWebhook`           | `boolean`                                                         | No       | `false`                                | Include work executed by Scrapfly webhook workers.        |

Returns Scrapfly's structured metrics with provider keys converted to camelCase. Scrapfly restricts this API to eligible Enterprise plans.
