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

# Pagination

> Cursor-based pagination for list endpoints.

All list endpoints use cursor-based pagination.

## Parameters

| Parameter | Type    | Description                   |
| --------- | ------- | ----------------------------- |
| `limit`   | integer | Max results per page          |
| `cursor`  | string  | Cursor from previous response |

## Response Format

```json theme={null}
{
  "pagination": {
    "total": 1250,
    "limit": 20,
    "has_more": true,
    "next_cursor": "eyJpZCI6MTIzfQ=="
  }
}
```

## Example

```python theme={null}
cursor = None
while True:
    params = {"provider": "polymarket", "limit": "50"}
    if cursor:
        params["cursor"] = cursor
    data = requests.get(url, params=params, headers=headers).json()
    all_markets.extend(data["markets"])
    if not data["pagination"]["has_more"]:
        break
    cursor = data["pagination"]["next_cursor"]
```
