Pagination
Cursor pagination SHOULD be preferred for most APIs — stable under concurrent mutations, consistent performance at any depth. Use offset pagination only when users need page numbers or data is relatively static.
Cursor response:
{
"data": [ ... ],
"pagination": {
"next_cursor": "eyJpZCI6MTAwfQ==",
"has_more": true
}
}
Offset response:
{
"data": [ ... ],
"pagination": {
"offset": 20,
"limit": 10,
"total": 142
}
}
References: