# Pagination

> How to read long lists of the Tentary API page by page: next_cursor, cursor and limit.

Source: https://tentary.com/en/help/api/pagination/
Last updated: 2026-10-27

---

Lists of the Tentary API come in pages, newest first. The cursor gets you the next page.

## How it works

- Lists are newest first.
- `limit` sets the number of items per page. The default is 25. Each endpoint shows its maximum.
- The answer has `next_cursor`. Send this value as `cursor` to get the next page.
- If `next_cursor` is `null`, this is the last page.

> **Important:** The cursor does not keep your filters. Send the same filters and the same `limit` with every page.

## Example

All orders from 1 October 2026, 50 per page. The first page:

```bash
curl "https://api.tentary.com/v1/orders?from=2026-10-01&limit=50" \
  -H "Authorization: Bearer $TENTARY_API_KEY"
```

The next page, with the same filters and the `next_cursor` from the answer:

```bash
curl "https://api.tentary.com/v1/orders?from=2026-10-01&limit=50&cursor=<next_cursor>" \
  -H "Authorization: Bearer $TENTARY_API_KEY"
```

Repeat this until `next_cursor` is `null`.

## Cursor not valid

If a cursor is not valid, the API answers with the status 400 and the code `bad_cursor`. Then start again without a cursor.
