Briefle words · Code & architecture
Cursor-based pagination
Paging with an opaque bookmark that points to the last item seen, instead of page numbers, so new items don't shift or duplicate results.
Say it to an AI
GET /v1/videos/:id/comments with cursor-based pagination: default limit 20, max 100, newest first. Return {data, pagination: {limit, nextCursor, hasMore}} and accept ?cursor= for the next page. Never an unbounded query.
How an expert would brief the stronger version of “Video comments API”.
See it
Try it as a puzzle →A video app loads the comments under a popular video from its API.
Why: B returns "nextCursor": "MjAyNi0wOS0zMFQxODo0MjowN1p8Y21fNDgxOTQ", which is the created_at and id of the 20th comment, "2026-09-30T18:42:07Z|cm_48194", in base64url; the app sends it back as ?cursor=… to load the next 20.
Related words
Room 5 · APIs & data
Learn “Cursor-based pagination” in a five-minute lesson