---
title: "Read account usage for sources authorized by the API key"
method: GET
path: "/usage"
tags: ["Credits"]
---

# Read account usage for sources authorized by the API key

`GET /usage`

## Request

- Base URL: `https://api.flashdata.dev/v2`
- URL: `https://api.flashdata.dev/v2/usage`
- Auth: API key in header `X-API-Key`

Free read, authenticated only by X-API-Key. Includes all account keys but
only sources granted to the calling key. Does not return query text, keys,
payment details or other accounts. Defaults to seven days; maximum 31 days.
Dates must use UTC Z timestamps. From is inclusive and to exclusive;
both are rounded down to minutes. With from alone, to defaults to from + 7 days.
With neither, to is the start of the next minute. Aggregates are eventually
consistent; even updating=false does not guarantee all recent events are ingested.
Read limit: 60 requests per minute per client IP.

## Query parameters

- `source` 'google_search' | 'google_images' | 'google_news' | 'google_shopping' | 'google_videos' | 'google_places' | 'youtube_search' | 'youtube_search_extended' | 'youtube_metadata' | 'youtube_transcript' | 'youtube_captions' | 'youtube_trainability' | 'youtube_channel' | 'youtube_suggestions' | 'youtube_download'
- `from` string, date-time
- `to` string, date-time

## Response `200`

Scoped request counts and charged Credits, with freshness information

- ApiKeyUsage
  - `scope` 'account_authorized_sources', required
  - `unit` 'Credits', required
  - `from` string, date-time, required
  - `to` string, date-time, required
  - `observedAt` string, date-time, required
  - `totals` UsageCounts, required
    - `requests` integer, required
    - `completed` integer, required
    - `failed` integer, required
    - `credits` number, required: Charged Credits in the current aggregate; pending work may not be finally settled.
  - `bySource` object[], required
    - `source` string, required
    - `requests` integer, required
    - `completed` integer, required
    - `failed` integer, required
    - `credits` number, required
  - `updating` boolean, required
  - `note` string, required

## Other responses

- `401`: Authentication required or invalid
- `403`: Authenticated but not permitted, or CSRF validation failed
- `422`: Request validation failed
- `429`: Too many usage reads; retry after the rate-limit window
- `503`: A required dependency or catalog is temporarily unavailable

---

[API](https://skmtc.dev/flashdata/apis/flashdata-customer-api.md) · [All operations](https://skmtc.dev/flashdata/apis/flashdata-customer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/flashdata/apis/flashdata-customer-api/revisions/109179fe9313?raw)
