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

# Statistics

> Query traffic usage across all your proxies. Required scope: stats:read.

<Info>
  See the [Swagger UI](https://api.catproxy.io/swagger/index.html) for live request/response schemas and to try endpoints directly in your browser.
</Info>

***

## Get traffic stats

Returns aggregated traffic usage for the authenticated user across all proxies for a given date range.

```http theme={null}
GET /v1/user/traffic
```

**Query parameters**

| Parameter   | Type   | Required | Description                       |
| :---------- | :----- | :------- | :-------------------------------- |
| `date_from` | string | Yes      | Start date in `YYYY-MM-DD` format |
| `date_to`   | string | Yes      | End date in `YYYY-MM-DD` format   |

**Scope:** `stats:read`

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.catproxy.io/v1/user/traffic?date_from=2026-01-01&date_to=2026-12-31" \
    -H "X-API-Key: cat_YOUR_API_KEY"
  ```

  ```python Python theme={null}
  import requests

  r = requests.get(
      "https://api.catproxy.io/v1/user/traffic",
      headers={"X-API-Key": "cat_YOUR_API_KEY"},
      params={"date_from": "2026-01-01", "date_to": "2026-12-31"}
  )
  print(r.json())
  ```
</CodeGroup>

***

## Export proxy usage (CSV)

Downloads a CSV file with a per-day breakdown of traffic and spend for a specific proxy list. Useful for billing reconciliation and pipeline monitoring.

```http theme={null}
GET /v1/proxy/{id}/usage/export
```

**Path parameters**

| Parameter | Type   | Description                   |
| :-------- | :----- | :---------------------------- |
| `id`      | string | Proxy list ID (e.g. `86Rf07`) |

**Query parameters**

| Parameter   | Type   | Required | Description                       |
| :---------- | :----- | :------- | :-------------------------------- |
| `date_from` | string | Yes      | Start date in `YYYY-MM-DD` format |
| `date_to`   | string | Yes      | End date in `YYYY-MM-DD` format   |

**Response:** `text/csv` file download.

**Scope:** `stats:read`

```bash theme={null}
curl "https://api.catproxy.io/v1/proxy/86Rf07/usage/export?date_from=2026-01-01&date_to=2026-12-31" \
  -H "X-API-Key: cat_YOUR_API_KEY" \
  -o proxy-usage-2026.csv
```
