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

# API reference

> One endpoint, normalized responses.

## Base URL

All requests go to:

```
https://api.adgreg.com
```

## Authentication

Every request must include your Adgreg API key in the `X-API-Key` header.

```bash theme={null}
X-API-Key: YOUR_API_KEY
```

Retrieve your key from the [Adgreg dashboard](https://adgreg.com/dashboard/api).

## Adnetworks

The `ad_network` parameter accepts one of the following values:

| Value          | Adnetwork    |
| -------------- | ------------ |
| `exoclick`     | ExoClick     |
| `trafficstars` | TrafficStars |
| `twinred`      | TwinRed      |
| `onclicka`     | Onclicka     |
| `kadam`        | Kadam        |
| `clickadilla`  | Clickadilla  |
| `trafficshop`  | TrafficShop  |
| `hilltop`      | HillTop      |

## Response format

All endpoints return a paginated envelope:

```json theme={null}
{
  "page": 1,
  "page_size": 100,
  "page_count": 4,
  "response": [ ... ]
}
```

The `/statistics` endpoint returns a flat `response` array without pagination fields.

## Errors

| Status | Meaning                                        |
| ------ | ---------------------------------------------- |
| `422`  | Validation error — check your query parameters |
