# Get daily usage breakdown

Default range is last 30 days. Max range is 366 days.

**GET** `/v1/usage/daily`

## Parameters

- `from` (query, string) — Start date (YYYY-MM-DD). Default 30 days ago.
- `to` (query, string) — End date (YYYY-MM-DD). Default today.
- `api_key` (query, string) — Filter by API key (prefixed ID, e.g. `ak_xxx`). When provided, returns usage rows attributed to that key only. The key must belong to the requesting account; cross-account keys return empty data. Revoked keys still return historical data. When absent, aggregates across all keys.

## Responses

### 200 — Successful response.
- `from`
- `to`
- `data`
- `data.date`
- `data.credits_single`
- `data.credits_bulk`
- `data.credits_monitor`
- `data.credits_scrape`
- `data.credits_search`
- `data.credits_total`
- `data.bytes_total`
- `data.bytes_single`
- `data.bytes_bulk`
- `data.bytes_scrape`
- `data.bytes_monitor`
- `data.bytes_screenshot`
- `data.bytes_recording`
- `data.bytes_scrape_md`
- `data.bytes_fetch`
- `data.bytes_fetch_md`
- `data.bytes_crawl`
- `data.bytes_crawl_links`
- `data.bytes_sitemap`

### 401 — Unauthorized. The request carried no valid credential, and no work was
performed. The unified `Error` envelope carries one of the codes below
in `error.code`; match on the code, never on the prose.

- `invalid_api_key` — a bearer API key was presented and rejected:
  unknown, revoked, expired or malformed. The bearer-only operations
  (`/v1/webhook-deliveries*` among them) also return it when no
  `Authorization` header is sent. `GET /v1/account` is the exception
  to "malformed": it returns `invalid_api_key` only for a key that
  starts `sk_test_` or `sk_live_` and is unknown, revoked or expired.
- `unauthorized` — the `Authorization` header is absent or malformed on
  an operation that also accepts a dashboard session (the dual-auth and
  billing operations). `GET /v1/account` also returns it, for no
  `Authorization` header and for any bearer value that does not start
  `sk_test_` or `sk_live_` (that value is checked as a dashboard
  session token).

Not retryable as-is: supply a valid API key first.
- `status`
- `error`
- `error.code`
- `error.message`
- `error.http_status`
- `error.failed_at`
- `error.details`