System Design · Junior · Question 16 of 75
Why does an API return a list page by page (pagination)?
- ✓Correct answer: So that thousands of records aren't transferred and rendered at once
- 2So that search engines index each page separately
- 3Because JSON doesn't support arrays longer than 100 elements
Explanation
Large responses are slow to transfer and burden the database and browser memory. Pagination can be offset-based (?page=3&limit=20) or cursor-based (?after=abc). In the UI: page numbers, "Load more" or infinite scroll.