How to paginate datasets using the APIs
GET
collection endpoints. This allows you to specify which page you’re on and obtain details about the entire collection.
Parameter | Type | Default | Description |
---|---|---|---|
page | number | 1 | Designates which page of results to return. Always starts at 1. If 0 is specified, it defaults to 1. |
per_page | number | 25 (max 100) | Determines the number of results on each page. It can’t exceed 100. |
order | asc or desc | desc | Organizes the results based on their creation time, either ascending or descending. |
pagination
object containing:
Field | Type | Description |
---|---|---|
total_records | number | Total records in the collection. |
per_page | number | Records on each page. |
prev_page | number | The previous page number, or null for the first page. |
page | number | The current page number. |
next_page | number | The next page number, or null if it’s the last page. |
last_page | number | The number of the last page with records. |
next
field, presenting a fully-qualified URL to the next
set of results. This field is being phased out in favor of the pagination
object but remains present for
now.