---
title: "Pagination"
description: "How to read list results from the Nodu API page by page with limit, cursor and nextCursor."
url: "/guides/api-basics/pagination/"
index: "/llms.txt"
---

# Pagination

List operations in the Nodu API, such as [List all transfers](/api/tag/transfers/get-v1-transfers.md), return their results one page at a time. They share two request parameters and three response fields. Each list operation in the reference shows whether it takes these parameters.

## Request a page

| Parameter | Meaning |
|---|---|
| `limit` | How many objects to return, from 1 to 100. The default is 10. |
| `cursor` | The position to continue from. Send the `nextCursor` value of the previous response. Leave it out to get the first page. |

Nodu refuses a `limit` outside this range with a `422` validation error.

For example, this call returns up to 50 transfers:

```bash
curl 'https://api.sandbox.nodu.fi/v1/transfers?limit=50' \
  --header 'Authorization: Bearer <your-api-key>'
```

Most lists also accept filters, such as `customerId`. The reference lists the filters of each operation.

## Read the response

| Field | Meaning |
|---|---|
| `data` | The objects of this page, as an array. |
| `total` | The number of objects that match the request, across all pages. It is not the size of this page. |
| `nextCursor` | The cursor of the next page. The response contains it only when there are more results. |

On the last page the response has no `nextCursor` field. Treat a `null` value in the same way.

## Order of results

A paginated list returns the most recently created objects first. No parameter changes the order.

## Read all pages

1. Send the request without `cursor`.
2. Process the objects in `data`.
3. If `nextCursor` is present and is not `null`, send the request again with `cursor` set to that value. Keep `limit` and every filter the same.
4. Repeat steps 2 and 3. Stop when `nextCursor` is absent or `null`.

Three rules keep the loop correct:

- Send a cursor back exactly as you received it. Do not build a cursor and do not change one.
- Stop when `nextCursor` is absent or `null`, not when you have counted `total` objects. `total` can change while you read, because objects are created in the meantime.
- Objects created after you started are at the beginning of the list. If you have already read the first page, the remaining pages do not include these new objects. Start again from the first page to read them.

## Next steps

- [Errors and rule codes](/guides/api-basics/errors-and-rule-codes/index.md): the validation error that a wrong `limit` returns.
- [Track and cancel a transfer](/guides/transfers/track-a-transfer/index.md): reconcile your records with the list of transfers.
