Pagination
How page numbers and pagination tokens behave over a live index.
List endpoints return a pagination object:
{
"elements": [ … ],
"pagination": {
"totalPages": 40,
"totalElements": 1987,
"pageNumber": 1,
"previousElements": 0,
"pageSize": 3,
"paginationToken": "eyJwYWdlIjoyLCJjdXJzb3IiOiJhYmMxMjMifQ"
}
}
Two ways to page
Increment page for simple cases. Carry paginationToken when you want stable paging over a result set that is changing underneath you.
Search results shift
The index updates continuously, so paging a large query slowly will produce the occasional duplicate and the occasional gap. That is normal for any relevance-ranked search. Deduplicate on the record ID as you collect, and treat totalElements as an estimate rather than a promise.
Deep paging has a ceiling
You cannot page a single query indefinitely — the limit mirrors the one in the LinkedIn interface. For broad coverage, split one wide query into several narrow ones that do not overlap: by title, then location, then school. Ten narrow queries surface far more distinct records than one broad query paged to exhaustion.
What paging costs
Search endpoints are priced per page returned, not per record. A page with fifty results costs the same as a page with five, which is why filtering to fewer, denser pages is cheaper than paging a broad query.