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

# Pagination

> Every list endpoint uses the same opaque cursor.

List endpoints (`/chapters`, `/series`, `/series/{id}/glossary`, `/webhook_endpoints`, `/events`, `/ledger`) return pages:

```json theme={null}
{
  "object": "list",
  "data": [ ... ],
  "has_more": true,
  "next_cursor": "eyJjIjoiMjAyNi0xMS0yNVQxNDowNDowMFoiLCJpIjoiY2hfN0txMm1YIn0.k3J"
}
```

| Parameter | Default | Notes |
| - | - | - |
| `limit` | 20 | 1 to 100 |
| `cursor` | none | The `next_cursor` from the previous page |

Results are ordered newest first (by `created`, then by id). Cursors are opaque and signed: don't build or edit them. They don't expire.

To get the next page, pass `next_cursor` as `cursor` with the same filters. Stop when `has_more` is `false`.

```bash curl theme={null}
curl "https://api.relettr.com/v1/chapters?status=succeeded&limit=100" \
  -H "Authorization: Bearer $RELETTR_API_KEY"

curl "https://api.relettr.com/v1/chapters?status=succeeded&limit=100&cursor=$NEXT_CURSOR" \
  -H "Authorization: Bearer $RELETTR_API_KEY"
```

```python Python theme={null}
def list_all(path, **params):
    params = {"limit": 100, **params}
    while True:
        r = requests.get(f"{API}{path}", params=params, headers=HEADERS)
        r.raise_for_status()
        page = r.json()
        yield from page["data"]
        if not page["has_more"]:
            return
        params["cursor"] = page["next_cursor"]

for ch in list_all("/chapters", status="succeeded"):
    print(ch["id"], ch["number"])
```

## Unpaginated lists

`GET /v1/chapters/{id}/regions` returns every region of the chapter in one response (a few hundred at most), with an `ETag`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.