API Design Interview Question

What is pagination in an API?

Updated 2026-07-10 · Beginner friendly
Quick answer

Pagination is breaking a large list of results into smaller pages instead of returning everything at once. If a query could return a million rows, sending them all would be slow and heavy, so the API returns a page at a time. The two common styles are offset based, using page and size, and cursor based, using a pointer to the next item.

The two common styles

Offset pagination is easy to build and understand. Cursor pagination performs better on huge datasets and avoids skipping or repeating items when new rows are added while the user pages through.

In the interview

If asked which is better for large or fast changing data, say cursor based. Explaining that offset pagination can skip or duplicate rows when data changes shows you have thought past the basics.

Want the full API Design guide?

Read every API Design concept with notes, diagrams, and code in one place. Track your progress as you go.

Open the API Design guide All API Design questions