# Usage report

> Per-operation usage aggregation. (GET /v1/usage)

Source: https://sightradar.com/docs/api/wallet-and-usage/usage-report

Per-operation usage aggregation. The window is either the last `days`
days (default 30, max 365) or a custom `from`/`to` range, which wins when
both parse. `to` is exclusive; a bare date such as `2026-11-02` means the
end of that day, so the echoed `to` is the next midnight
(`2026-11-03T00:00:00Z`). An empty or inverted range falls back to the 30
days before `to`. Free.

### Example request

```bash
curl -X GET "https://api.sightradar.com/v1/usage" \
  -H "Authorization: Bearer $SR_API_KEY"
```

### Parameters

| Name   | In    | Type      | Description                                                                                          |
| ------ | ----- | --------- | ---------------------------------------------------------------------------------------------------- |
| `days` | query | `integer` |                                                                                                      |
| `from` | query | `string`  | Window start, inclusive (YYYY-MM-DD or RFC3339). Requires `to`.                                      |
| `to`   | query | `string`  | Window end, exclusive (YYYY-MM-DD or RFC3339); a bare date includes that whole day. Requires `from`. |

### Response body

| Field           | Type       | Description                                                                                                                |
| --------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------- |
| `days`          | `integer`  | Length of the returned window in days: the `days` you asked for, or for a `from`/`to` range the days it spans, rounded up. |
| `from`          | `string`   | Resolved window start (inclusive).                                                                                         |
| `to`            | `string`   | Resolved window end (exclusive).                                                                                           |
| `by_op`         | `object[]` |                                                                                                                            |
| `total_calls`   | `integer`  |                                                                                                                            |
| `total_credits` | `integer`  |                                                                                                                            |

### Status codes

| Status | Meaning                     |
| ------ | --------------------------- |
| `200`  | Usage breakdown.            |
| `401`  | Missing or invalid API key. |
