Skip to content

Pagination

Most list endpoints in the Publisher API use cursor-based pagination. Each response includes a page object with the information needed to fetch the next set of results.

Request

json
{
  "pagination": {
    "limit": 100,
    "cursor": null
  }
}
FieldTypeDescription
limitintegerMaximum number of results to return (min: 1, default: 500)
cursorstring | nullOpaque cursor from a previous response. null or omitted for the first page
skipintegerNumber of results to skip (min: 1). Use sparingly - cursor-based iteration is preferred

Response

Every list response includes a page object:

json
{
  "data": [...],
  "page": {
    "page_size": 100,
    "cursor": "eyJpZCI6Im1fMTIzNCJ9",
    "more": true
  }
}
FieldTypeDescription
page_sizeintegerNumber of results in this page
cursorstring | nullCursor to pass in the next request. null if no more results
morebooleanWhether more results are available beyond this page

To retrieve all results, pass the cursor from each response into the next request until cursor is null or more is false.

Sorting

Some list endpoints support a sorts array to control result ordering:

json
{
  "sorts": [
    { "key": "created_at", "direction": "desc" }
  ]
}
FieldTypeDescription
keystringThe field to sort by (e.g. "id", "created_at")
directionstring"asc" (default) or "desc"

Available sort keys vary by endpoint. Refer to the API reference for details.