Cursor pagination
The standard. You request a page, and the response hands you a cursor pointing at the next one. You keep following cursors until there are none left. Request parameters
Response shape
nextPageCursor comes back empty.
Page through every result
Request the first page, then keep passing the returnednextPageCursor back until it’s empty:
Offset pagination
Some existing endpoints page by offset instead: you ask for alimit and skip a number of records with offset.
Offset responses include a
count — the total number of records matching your query — so you can calculate how many pages there are. To walk the full set, increase offset by limit on each request until offset reaches count:
Which pagination an endpoint uses
Check the endpoint’s parameters in the API reference: anextPageCursor parameter means cursor-based, an offset parameter means offset-based. Two differences catch people out when moving between endpoints:
- Default and maximum page size vary. A cursor endpoint might default to 25 records (max 100), while an offset endpoint defaults to 500 (max 1000). Set
limitexplicitly rather than relying on the default. - Only offset responses return a total. If you need a count, read it from
counton an offset endpoint; cursor endpoints don’t provide one.
If your integration reads from several endpoints, handle both styles: branch on whether the response returns a
nextPageCursor or a count, rather than assuming one scheme everywhere.Related
Filtering
Narrow and sort list results with query parameters.
API reference
The exact pagination parameters each endpoint accepts.