Limit/offset pagination
Most list endpoints acceptlimit and offset query parameters. This approach is best for browsing through results where you need random page access.
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 20 | Number of items to return. Must be between 1 and 100. |
offset | integer | 0 | Number of items to skip before returning results. |
pagination object:
| Field | Type | Description |
|---|---|---|
total | integer | Total number of items matching your filters. |
limit | integer | The limit value used in this request. |
offset | integer | The offset value used in this request. |
has_more | boolean | true if there are more results beyond this page. |
Paginating through all results
To retrieve all results, incrementoffset by limit until has_more is false.
Cursor-based pagination
Some real-time endpoints (such as webhook event logs) use cursor-based pagination for consistent results when new items are being created.| Parameter | Type | Description |
|---|---|---|
limit | integer | Number of items to return (1-100, default 20). |
cursor | string | Opaque cursor from the previous response. Omit for the first page. |
next_cursor as the cursor parameter in your next request to fetch the following page.
Best practices
Use reasonable page sizes
Use reasonable page sizes
A
limit of 20-50 is optimal for most use cases. Requesting 100 items per page increases response time and payload size.Cache total counts
Cache total counts
The
total field requires a count query on each request. If you only need to check for more results, use has_more instead of comparing offset + limit < total.Handle concurrent modifications
Handle concurrent modifications
With limit/offset pagination, items may shift between pages if new records are created or deleted between requests. For consistency-critical workflows, prefer cursor-based endpoints or filter by a fixed date range.
Respect rate limits
Respect rate limits
Paginating through large datasets generates many requests. Add a small delay between pages or use a larger
limit to stay within rate limits.