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

# Paging

> How to paginate through results in the Everflow API.

Endpoints that return lists of resources use pagination. Paginated responses include a `paging` object:

```json theme={null}
{
  "paging": {
    "page": 2,
    "page_size": 50,
    "total_count": 150
  }
}
```

| Field         | Description                            |
| ------------- | -------------------------------------- |
| `page`        | The current page number (1-based).     |
| `page_size`   | The number of results per page.        |
| `total_count` | The total number of results available. |

## Requesting a specific page

Use the `page` and `page_size` query parameters:

```bash theme={null}
curl -H "X-Eflow-API-Key: <your-api-key>" \
  "https://api.eflow.team/v1/networks/affiliates/1?page=2&page_size=10"
```

## Pagination on POST endpoints

POST-based search and reporting endpoints paginate the same way as GET endpoints: `page`
and `page_size` are read from the **query string**, not from the JSON request body. The
body carries the query itself (date range, columns, filters); paging sits alongside it in
the URL.

```bash theme={null}
curl -X POST -H "X-Eflow-API-Key: <your-api-key>" \
  -H "Content-Type: application/json" \
  "https://api.eflow.team/v1/networks/reporting/conversions?page=2&page_size=50" \
  -d '{
    "from": "2026-03-01",
    "to": "2026-03-31",
    "timezone_id": 90,
    "show_conversions": true,
    "show_events": false
  }'
```

<Warning>
  `page` and `page_size` placed **inside the JSON body are ignored**. The request still
  succeeds and still returns data, so a body-paginated loop silently re-reads page 1
  forever. If your pages all look identical, this is why — move them into the query string.
</Warning>

The response includes the `paging` envelope:

```json theme={null}
{
  "conversions": [...],
  "paging": {
    "page": 2,
    "page_size": 50,
    "total_count": 320
  }
}
```

### Iterating all pages

```python theme={null}
import requests

API_KEY = "your-api-key"
BASE = "https://api.eflow.team/v1"

page = 1
page_size = 100
all_rows = []

while True:
    resp = requests.post(
        f"{BASE}/networks/reporting/conversions",
        headers={"X-Eflow-API-Key": API_KEY, "Content-Type": "application/json"},
        params={"page": page, "page_size": page_size},   # paging goes here, not in the body
        json={
            "from": "2026-03-01",
            "to": "2026-03-31",
            "timezone_id": 90,
            "show_conversions": True,
            "show_events": False
        }
    )
    data = resp.json()
    rows = data.get("conversions", [])
    all_rows.extend(rows)

    total = data["paging"]["total_count"]
    if page * page_size >= total:
        break
    page += 1

print(f"Fetched {len(all_rows)} rows")
```

<Note>
  **Not every endpoint paginates.** Aggregated reporting endpoints such as
  [Entity Table](/api-reference/post-networksreportingentitytable) return the full result
  set in one response with **no `paging` object at all** — reading `data["paging"]` against
  one of those raises a `KeyError`. Check the endpoint's own reference page before writing
  a paging loop.
</Note>

<Note>
  Aggregated reporting endpoints cap responses at **10,000 rows total**. They are not
  paginated, so there is no way to reach rows beyond the cap by paging — if your result set
  exceeds it, use the [Entity Table Export](/api-reference/post-networksreportingentitytableexport)
  endpoint, which returns a full CSV without a row cap.
</Note>

## Defaults and limits

* On a paginated endpoint, omitting `page` and `page_size` returns page 1 with a page size of **50**. Endpoints that are not paginated ignore both and return their full (capped) result set.
* The maximum page size is typically **2,000**, though some endpoints enforce a smaller limit.
* Endpoints that return paginated responses are identified as such in their documentation.
