API pagination, explained
Offset pagination (?offset=200&limit=100) is simple but can skip or repeat items when data changes between requests. Cursor pagination returns an opaque token pointing to the next page and stays consistent as data changes.
Changing a default page size, sort order or pagination style is a common, easy-to-miss breaking change.
Related terms
- REST API: A REST API is an HTTP API organised around resources identified by URLs and manipulated with standard methods such as GET, POST, PUT, PATCH and DELETE.
- Breaking change: A breaking change is a change to an API that causes a correctly written client, which worked before, to fail or behave differently without modifying its code.
- Rate limiting: Rate limiting caps how many requests a client can make to an API in a given time window, protecting the service from overload and abuse.