Skip to main content

Pagination

All list endpoints use cursor-based pagination with cursor, limit, and order parameters. Responses include next_cursor and has_more for iteration.

All list endpoints use cursor-based pagination. Pass a cursor token from the previous response to fetch the next page.

Most integrations call list endpoints after bulk ingestion to iterate through results. A typical workflow is to fetch the first page with a limit, then loop using pagination.next_cursor until has_more is false.

The response always includes a pagination object with total, limit, has_more, and next_cursor. The total field reflects the full count of matching items, not just the current page. Use order to control sort direction by created_at.

Pair pagination with query filters (e.g. status, after, before, search) on endpoints like GET /v1/documents and GET /v1/extractions to narrow results before paginating. Note that cursors are opaque and short-lived — do not persist or parse them.

Request parameters

limitintegerNumber of items per page (1–100, default 20).
cursorstringOpaque cursor token from `pagination.next_cursor` of the previous response. Omit for the first page.
orderstringSort direction: `asc` or `desc` (default `desc`, newest first).

Response shape

Paginated response

{
  "data": [
    { "id": "doc_x9y8z7w6", "name": "invoice-001.pdf", "..." : "..." },
    { "id": "doc_a1b2c3d4", "name": "invoice-002.pdf", "..." : "..." }
  ],
  "pagination": {
    "total": 1500,
    "limit": 20,
    "has_more": true,
    "next_cursor": "YWJjMTIzfDIwMjYtMDQtMjVUMTQ6MzA6MDAuMDAwWg"
  }
}

Pagination object

totalintegerTotal number of items matching the query.
limitintegerPage size used for this request.
has_moreboolean`true` if there are more pages after this one.
next_cursorstring | nullCursor token to pass in the next request. `null` when on the last page.

Iterating through all pages

Python — paginate through all documents

Cursors are opaque tokens — do not parse, modify, or store them long-term. They may change format without notice.