# Usage

`GET /v1/usage`

Your organization's spend and request counts across every product.

Family: Crawl API

## Price

Unit: request

Free.

## Description

Every billed request: crawls, map, searches (native and the SERP API routes), Pages, AI, Business, Ads, audits and visibility runs. Amounts are what you were charged. All-time unless `from` / `to` narrow it. Free.

## Authentication

HTTP Basic auth: any login, with your `dg_` API key as the password. A `Bearer` token header with the key also works.

## Request

No request body.

| Field | Type | Required | Description |
|---|---|---|---|
| `from` | string | no | First day to count, YYYY-MM-DD (UTC), inclusive. |
| `to` | string | no | Last day to count, YYYY-MM-DD (UTC), inclusive. |

### Example request

```bash
curl -X GET "https://api.dataforgaio.com/v1/usage" \
  -u "api:$DATAFORGAIO_API_KEY"
```

## Response

| Field | Type | Description |
|---|---|---|
| `status` | string | Always `ok`. |
| `currency` | string | Always `USD`. |
| `from` | string\|null | The `from` you sent, or null. |
| `to` | string\|null | The `to` you sent, or null. |
| `cost` | number | Total spend, USD. |
| `units` | object | Counts. |
| `units.crawl_tasks` | integer | Crawl tasks run. |
| `units.crawl_pages_billed` | integer | Crawl tasks that were billed. |
| `units.serp_requests` | integer | Searches run (native and SERP API routes). |
| `units.serp_requests_billed` | integer | Searches that were billed. |
| `units.requests` | integer | Requests of every product. |
| `units.requests_billed` | integer | Requests of every product that were billed. |
| `spend` | object | Spend by product group. |
| `spend.crawl_usd` | number | Crawl spend, USD. |
| `spend.serp_usd` | number | Search spend, USD. |
| `products` | array<object> | Requests and spend per product and mode. |
| `products.product` | string | Product key, for example `serp.google.organic` or `crawl_job`. |
| `products.mode` | string\|null | `live`, `standard`, `priority`, or null. |
| `products.requests` | integer | Requests. |
| `products.requests_billed` | integer | Requests that were billed. |
| `products.charged_usd` | number | Charged, USD. |
| `total_crawl_jobs` | integer | Same as `units.crawl_tasks`. Kept for older clients. |
| `total_cost_usd` | string | Same as `cost`, as a decimal string. Kept for older clients. |

### Example response

```json
{
  "status": "ok",
  "currency": "USD",
  "from": "2026-11-01",
  "to": "2026-11-30",
  "cost": 0.79036,
  "units": {
    "crawl_tasks": 1840,
    "crawl_pages_billed": 1795,
    "serp_requests": 520,
    "serp_requests_billed": 514,
    "requests": 2385,
    "requests_billed": 2334
  },
  "spend": {
    "crawl_usd": 0.4213,
    "serp_usd": 0.27756
  },
  "products": [
    {
      "product": "ai.chat_gpt.llm_responses",
      "mode": "live",
      "requests": 25,
      "requests_billed": 25,
      "charged_usd": 0.0915
    },
    {
      "product": "crawl_job",
      "mode": null,
      "requests": 1840,
      "requests_billed": 1795,
      "charged_usd": 0.4213
    },
    {
      "product": "serp.google.organic",
      "mode": "live",
      "requests": 120,
      "requests_billed": 118,
      "charged_usd": 0.06372
    },
    {
      "product": "serp.google.organic",
      "mode": "standard",
      "requests": 400,
      "requests_billed": 396,
      "charged_usd": 0.21384
    }
  ],
  "total_crawl_jobs": 1840,
  "total_cost_usd": "0.79036"
}
```

## Errors

| Code | When |
|---|---|
| invalid_request | HTTP 400. `from` or `to` isn't a YYYY-MM-DD date, or `from` is after `to`. |
| unauthorized | HTTP 401. Missing, malformed or revoked API key. |
| rate_limited | HTTP 429. Too many requests, or too many inline requests in flight for your organization. Honor `Retry-After`. |
