Pagination

Learn how to paginate through the results of the API

Overview

All endpoints that list objects provide support for pagination. This allows you to retrieve a subset of the results at a time, making it easier to manage large datasets.

Paginated responses return items in reverse chronological order, such that the most recently created object will be returned first on the list and the oldest will be returned last.

The result includes a link object with a previous and a next attribute. Do a GET request to the URLs in those attributes to fetch the previous or next page of results.

Request Attributes

The following attributes can be used to control pagination in your requests:

takedefault: 10
number

The number of items to return per page.

from
string

The cursor indicating where to start fetching the next set of results. It corresponds to the ID of the first item on the current page.

If not provided, the API will start fetching from the newest item.

Response Structure

The paginated response has the following structure:

{
  "data": [...],
  "links": {
    "previous": "<url>",
    "next": "<url>"
  }
}

Response Attributes

Here's a breakdown of the attributes in the response:

data
array

The list of items for the current page.

links
object

URLs to navigate to the previous and next pages.

Treat these URLs as a opaque strings. Do not try to parse or construct it.

On this page