# GET /v1/usage: Credit Usage by Day or Key | API Reference

URL: https://email-validation.org/docs/api-reference/get-usage/
Updated: 2026-11-27

> Documentation index: https://email-validation.org/llms.txt

`GET https://api.email-validation.org/v1/usage`

Credit usage for any window within the last 90 days. Daily credit totals come from the credit ledger and are exact; the split by status (API, MCP, dashboard and bulk results) is compiled from request records and is approximate (it can lag by up to an hour). `totals` are always the whole account; with `group_by=key` the items cover only credits spent through an API key. Needs the `account:read` scope.

Also served at `https://api-eu.email-validation.org/v1/usage` (EU data residency: validated and stored in the EU).

## Authentication

Your API key, in one of these headers (a key in the URL is refused; see [Authentication](https://email-validation.org/docs/authentication/)):

- Your API key as a bearer token: `Authorization: Bearer ev_live_…`.
- Alternative header for clients that cannot set `Authorization`.

## Query parameters

- **`from`** · string (date)\
  First day (UTC, `YYYY-MM-DD`), no earlier than 89 days before today: usage covers the last 90 days. Defaults to the start of the 90-day range that ends on `to`.
- **`to`** · string (date)\
  Last day (UTC). Defaults to today. The whole window must lie within the last 90 days (today included); an earlier day is a `400`.
- **`group_by`** · string: `day`, `key`\
  Group the usage by day or by API key. (default `"day"`)

## Response

`200`: Usage for the range.

**Headers**

- `X-Request-Id`: Our ID for the request (same as `request_id` in bodies).

**Body:** [UsageResponse](https://email-validation.org/docs/api-reference/#schema-usageresponse)

- **`from`** · string (date) · **always present**\
  First day included (UTC).
- **`to`** · string (date) · **always present**\
  Last day included (UTC).
- **`group_by`** · string: `day`, `key` · **always present**\
  One item per `day` or per API `key`.
- **`totals`** · [UsageTotals](https://email-validation.org/docs/api-reference/#schema-usagetotals) · **always present**\
  Totals of the whole account for the range, whatever `group_by`: API, MCP, dashboard and bulk usage.
- **`items`** · array of [UsageDay](https://email-validation.org/docs/api-reference/#schema-usageday) or [UsageByKey](https://email-validation.org/docs/api-reference/#schema-usagebykey) · **always present**\
  One item per day (`group_by=day`) or per API key (`group_by=key`): every item is a `UsageDay` when `group_by` is `day` and a `UsageByKey` when it is `key`, never a mix.

## Errors

An error answer uses no credit. Branch on `code`, never on `message`.

- **`400`** · [`invalid_request`](https://email-validation.org/docs/errors/invalid-request/)\
  A parameter is missing, has the wrong type or is out of range, the `Authorization` header is not `Bearer <key>`, or the API key was sent in the URL (a query parameter named `api_key` in any spelling, such as `apiKey` or `API-KEY`, or any query value that looks like a key). The message names the fields at fault. A method the path does not take (such as `GET /v1/bulk`) is a `405` with an `Allow` header that lists the methods it does take, sent before the key is checked; `/a2a` does the same with `Allow: POST`. `/mcp` checks the key first: with a valid key, any method but `POST` gets its `405` with `Allow: POST` and a JSON-RPC body instead. **What to do:** Correct the request. Send the key in the Authorization header, never in the query string. On a `405`, use a method from `Allow`.
- **`401`** · [`unauthorized`](https://email-validation.org/docs/errors/unauthorized/)\
  No API key was sent, or the key is not valid: unknown, revoked, expired or replaced by a roll. **What to do:** Send a current key as `Authorization: Bearer <key>` (or `X-Api-Key`). Create a new key in the dashboard if needed.
- **`403`** · [`forbidden`](https://email-validation.org/docs/errors/forbidden/)\
  The key lacks the scope this endpoint needs (for example `bulk`), the account is suspended or on a billing hold, or the account has EU-only processing turned on and the request went to https://api.email-validation.org. `GET /v1/latency`, which takes no key, answers it to a browser request made by another website: it serves our website only. **What to do:** Use a key with the right scope, or check the notices in your dashboard. With EU-only processing, send requests to https://api-eu.email-validation.org. For `GET /v1/latency`, call it from a server or a terminal, not from another website's page.
- **`403`** · [`forbidden_origin`](https://email-validation.org/docs/errors/forbidden-origin/)\
  The key is restricted to a list of browser origins and the request came from another `Origin`. **What to do:** Call the API from an allowed origin, or update the allowed origins of the key.
- **`429`** · [`rate_limited`](https://email-validation.org/docs/errors/rate-limited/)\
  The account or key sent more requests per second than its limit allows, the IP address sent more than 500 requests per second (requests with a key from Cloudflare Workers, which all share one address, are left out), or the IP address sent more than 20 requests with an invalid key in a minute (its further invalid keys get this for up to a minute; valid keys keep working). `GET /v1/latency` has its own limit instead, 20 requests in 10 seconds per IP address, and test and malformed addresses, which do not count toward the per-second limit, have a separate, much higher safety limit per key. **What to do:** Wait for the number of seconds in `Retry-After`, then retry. Spread requests evenly over time, and fix an invalid key instead of retrying it.
- **`500`** · [`internal_error`](https://email-validation.org/docs/errors/internal-error/)\
  Something failed on our side. No credit was used. **What to do:** Retry later. If it keeps happening, check https://email-validation.org/status/.
- **`503`** · [`service_unavailable`](https://email-validation.org/docs/errors/service-unavailable/)\
  Validation is paused for a short time, for example while a dependency recovers. No credit was used. `GET /v1/status` answers it while no status information is available, and `GET /v1/latency` while its test answer is not in the cache, both with `Retry-After: 60`. **What to do:** Wait for `Retry-After`, then retry. In sign-up forms, accept the address and check it later.

## Examples

### Request

**curl**

```bash
curl https://api.email-validation.org/v1/usage \
  -H "Authorization: Bearer $EV_API_KEY"
```

**JavaScript**

```js
const res = await fetch('https://api.email-validation.org/v1/usage', {
  headers: {
    Authorization: `Bearer ${process.env.EV_API_KEY}`,
  },
  signal: AbortSignal.timeout(20_000),
});
const data = await res.json();
```

**Python**

```python
import os

import requests

res = requests.get(
    "https://api.email-validation.org/v1/usage",
    headers={"Authorization": f"Bearer {os.environ['EV_API_KEY']}"},
    timeout=20,
)
data = res.json()
```

**PHP**

```php
<?php
$ch = curl_init('https://api.email-validation.org/v1/usage');
curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('EV_API_KEY'),
    ],
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 20,
]);
$data = json_decode(curl_exec($ch), true);
```

**Ruby**

```ruby
require 'json'
require 'net/http'

uri = URI('https://api.email-validation.org/v1/usage')
req = Net::HTTP::Get.new(uri)
req['Authorization'] = "Bearer #{ENV.fetch('EV_API_KEY')}"
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true, read_timeout: 20) { |http| http.request(req) }
data = JSON.parse(res.body)
```

**Go**

```go
package main

import (
	"encoding/json"
	"log"
	"net/http"
	"os"
	"time"
)

func main() {
	req, err := http.NewRequest("GET", "https://api.email-validation.org/v1/usage", nil)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("Authorization", "Bearer "+os.Getenv("EV_API_KEY"))
	client := &http.Client{Timeout: 20 * time.Second}
	res, err := client.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	defer res.Body.Close()
	var data map[string]any
	if err := json.NewDecoder(res.Body).Decode(&data); err != nil {
		log.Fatal(err)
	}
	log.Println(data)
}
```

### Response 200

Grouped by day:

```json
{
  "from": "2026-10-19",
  "to": "2026-10-20",
  "group_by": "day",
  "totals": {
    "credits_used": 1212,
    "by_status": {
      "valid": 1040,
      "invalid": 121,
      "catch_all": 42,
      "unknown": 31,
      "disposable": 9
    }
  },
  "items": [
    {
      "date": "2026-10-19",
      "credits_used": 640,
      "by_status": {
        "valid": 552,
        "invalid": 61,
        "catch_all": 22,
        "unknown": 17,
        "disposable": 5
      }
    },
    {
      "date": "2026-10-20",
      "credits_used": 572,
      "by_status": {
        "valid": 488,
        "invalid": 60,
        "catch_all": 20,
        "unknown": 14,
        "disposable": 4
      }
    }
  ]
}
```

More example responses:

Grouped by API key:

```json
{
  "from": "2026-10-19",
  "to": "2026-10-20",
  "group_by": "key",
  "totals": {
    "credits_used": 1212,
    "by_status": {
      "valid": 1040,
      "invalid": 121,
      "catch_all": 42,
      "unknown": 31,
      "disposable": 9
    }
  },
  "items": [
    {
      "key_id": "key_5Dt1RmZ8vK3qP7xL2nH6sC",
      "name": "Production server",
      "last4": "x7Qa",
      "credits_used": 1212
    }
  ]
}
```


### Error 400

```json
{
  "error": {
    "code": "invalid_request",
    "message": "The request is invalid.",
    "request_id": "req_7Hq2LmX9cV4bN8tR1zK6wD"
  }
}
```


## More

- Every endpoint and schema on one page: [API reference](https://email-validation.org/docs/api-reference/#getusage).
- The full OpenAPI document: [JSON](https://api.email-validation.org/openapi.json) or [YAML](https://api.email-validation.org/openapi.yaml).
- Free test addresses for every status and reason: [test addresses](https://email-validation.org/docs/test-addresses/).
- Samples with retries and error handling: [code samples](https://email-validation.org/docs/code-samples/).
