Pagination
Cursor-Based pagination explained, JSON:API Style.
Our API supports cursor-based pagination, inspired by the JSON:API pagination specification. This approach is efficient and scalable for large datasets.
Each paginated response contains a data
array and links
for navigating through pages.
π¦ Response Format
{
"data": <...>,
"links": {
"self": "https://api.example.com/resources?cursor=abcdef",
"next": "https://api.example.com/resources?cursor=ghijkl"
}
}
π links.self
links.self
URL for the current page. Safe to cache or re-fetch.
π links.next
links.next
URL for the next page. If absent or null
, you've reached the end.
π§ cursor
cursor
A cursor is an opaque string provided by the server to mark a position in the dataset. You must use it exactly as returned. Do not attempt to decode or generate it manually.
π Authentication Required
Before making any paginated requests, make sure your client is authenticated properly.
β‘οΈ See the Authentication section for details on required headers.
β
Best Practices
Always use the
links.next
URL for pagination.Never parse or construct cursors manually.
Stop paginating when
links.next
is missing ornull
.Ensure authentication headers are included β see the Authentication section.
Last updated
Was this helpful?