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

> ## Agent Instructions
> ## Submitting feedback
> If you find an error, a missing step, or information that is outdated or misleading on this page — especially if it stopped you from completing your task — report it so the Encrata docs team can fix it.
> Send a POST request to https://docs.encrata.com/feedback with a JSON body containing `path` (the full URL of the page, for example `https://docs.encrata.com/quickstart`) and `feedback` (what was wrong and what you expected):
> curl -X POST https://docs.encrata.com/feedback -H 'Content-Type: application/json' -d '{"path": "https://docs.encrata.com/quickstart", "feedback": "Step 3 uses a parameter that the API rejects."}'
> Do not include API keys, personal data, or other secrets in your feedback.

# Credit Analytics

> See how your workspace spent credits: by product, by origin, and per day.

Credit Analytics summarises your workspace's credit spend over the last `days`: by product area, by origin, by lookup, and per day. Top-ups, refunds, and bonuses aren't counted.

## Authentication

Send your API key as `Authorization: Bearer enc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`.

## Request

**days** `integer` (default: 30)

The trailing window, from 1 to 365 days.

## Example request

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
curl "https://developer.encrata.com/api/account/credit-analytics?days=7" \
  -H "Authorization: Bearer enc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
```

## Example response

This route returns the analytics object directly, without the `{success, result, message}` envelope. This
example is shortened: `lookups` and `daily` list every lookup and every day.

```json theme={"theme":{"light":"github-light","dark":"vesper"}}
{
  "total": 705,
  "categories": [
    {
      "key": "lookups",
      "label": "Lookups",
      "value": 570
    },
    {
      "key": "ai_chat",
      "label": "AI chat",
      "value": 135
    },
    {
      "key": "file_storage",
      "label": "File storage",
      "value": 0
    }
  ],
  "sources": [
    {
      "key": "dashboard",
      "label": "Dashboard lookups",
      "value": 4
    },
    {
      "key": "bulk",
      "label": "Bulk lookups",
      "value": 0
    },
    {
      "key": "api",
      "label": "API",
      "value": 566
    },
    {
      "key": "ai_chat",
      "label": "AI chat",
      "value": 135
    },
    {
      "key": "automations",
      "label": "Automations",
      "value": 0
    }
  ],
  "lookups": [
    {
      "key": "email_validity",
      "label": "Email validity",
      "value": 1
    },
    {
      "key": "email_identity",
      "label": "Email identity",
      "value": 0
    },
    {
      "key": "email_breaches",
      "label": "Email breaches",
      "value": 0
    },
    {
      "key": "email_gender",
      "label": "Email gender",
      "value": 3
    }
  ],
  "daily": [
    {
      "date": "2026-11-14",
      "used": 0
    },
    {
      "date": "2026-11-15",
      "used": 0
    }
  ]
}
```

## Response

**total** `integer`

Credits spent in the window.

**categories** `object[]`

Spend by product area, each with `key`, `label`, and `value`.

**sources** `object[]`

Spend by origin: `dashboard`, `bulk`, `api`, `ai_chat`, and `automations`.

**lookups** `object[]`

Spend by lookup, each with `key`, `label`, and `value`: `email_validity`,
`email_identity`, `email_breaches`, `email_gender`, `password_breaches`,
`phone`, and `other`. Malware scans are counted in `other`.

**daily** `object[]`

One entry per day, oldest to newest, each with `date` and `used`. Days with no
spend are included with `used: 0`.

```bash cURL theme={"theme":{"light":"github-light","dark":"vesper"}}
curl "https://developer.encrata.com/api/account/credit-analytics?days=7" \
  -H "Authorization: Bearer enc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
```

```json 200 theme={"theme":{"light":"github-light","dark":"vesper"}}
{
  "total": 705,
  "categories": [
    {
      "key": "lookups",
      "label": "Lookups",
      "value": 570
    },
    {
      "key": "ai_chat",
      "label": "AI chat",
      "value": 135
    },
    {
      "key": "file_storage",
      "label": "File storage",
      "value": 0
    }
  ],
  "sources": [
    {
      "key": "dashboard",
      "label": "Dashboard lookups",
      "value": 4
    },
    {
      "key": "bulk",
      "label": "Bulk lookups",
      "value": 0
    },
    {
      "key": "api",
      "label": "API",
      "value": 566
    },
    {
      "key": "ai_chat",
      "label": "AI chat",
      "value": 135
    },
    {
      "key": "automations",
      "label": "Automations",
      "value": 0
    }
  ],
  "lookups": [
    {
      "key": "email_validity",
      "label": "Email validity",
      "value": 1
    },
    {
      "key": "email_identity",
      "label": "Email identity",
      "value": 0
    },
    {
      "key": "email_breaches",
      "label": "Email breaches",
      "value": 0
    },
    {
      "key": "email_gender",
      "label": "Email gender",
      "value": 3
    },
    {
      "key": "password_breaches",
      "label": "Password breaches",
      "value": 0
    },
    {
      "key": "phone",
      "label": "Phone",
      "value": 0
    },
    {
      "key": "other",
      "label": "Other lookups",
      "value": 566
    }
  ],
  "daily": [
    {
      "date": "2026-11-14",
      "used": 0
    },
    {
      "date": "2026-11-15",
      "used": 0
    },
    {
      "date": "2026-11-16",
      "used": 135
    },
    {
      "date": "2026-11-17",
      "used": 1
    },
    {
      "date": "2026-11-18",
      "used": 333
    },
    {
      "date": "2026-11-19",
      "used": 3
    },
    {
      "date": "2026-11-20",
      "used": 233
    }
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.