Guides ยท Technology
API Pagination Design Basics
Page large API results well
Designing API pagination means choosing between offsets and cursors, enforcing sane limits, providing next/prev tokens, and keeping stable sort keys so clients can page reliably at scale.
- api pagination
- cursors
- offsets
- limits
- sorting
Choose Style
Use cursors for large/real-time data; offsets for simple small sets.
Set Limits
Cap page sizes; return next/prev links or tokens consistently.
Keep Order
Sort on stable keys (time/id) to avoid duplicates or gaps.