Practice API pagination vocabulary: cursor-based pagination, offset/limit pagination, page tokens, keyset pagination, results-per-page patterns, and Link header conventions.
0 / 5 completed
1 / 5
What is cursor-based pagination in an API?
Cursor-based pagination uses an opaque value (like a base64-encoded ID or timestamp) as a position marker. Clients pass this cursor in subsequent requests to get the next page, which is more stable than offset pagination when data changes.
2 / 5
An API returns { 'next_cursor': 'abc123' }. How should the client use this value?
The client should include the next_cursor value in the next request's 'after' (or equivalent) parameter. This tells the server where to start the next page. The client should treat the cursor as opaque and not parse it.
3 / 5
What is a key disadvantage of offset/limit pagination compared to cursor-based pagination?
With offset/limit pagination, if a record is inserted or deleted between requests, the offset shifts and clients may receive duplicates or miss records. Cursor-based pagination avoids this by anchoring to a stable record position.
4 / 5
What does a 'Link header' provide in an API paginated response?
The Link header (defined in RFC 5988/8288) provides hypermedia navigation links — rel='next' and rel='prev' — so clients can paginate without constructing URLs themselves. GitHub's API is a well-known example.
5 / 5
A colleague says 'this returns at most N results per page.' What does 'at most' signal about the API?
'At most N results per page' is standard API documentation language indicating the page_size or limit is a maximum, not a guarantee. The last page, sparse datasets, or filtered queries may return fewer results.