Offset Pagination
Offset pagination uses parameters such as page and limit or offset and limit.
Example: GET /products?page=3&limit=20.
It is easy to implement and works well for many administrative interfaces. However, large offsets can become expensive because the database may need to scan or skip many records. Results can also shift between requests when records are inserted or deleted.
Use stable ordering and enforce maximum page sizes. Never allow clients to request unlimited records.
Pagination Parameters
page
1
One-based page number.
limit
20
Maximum records returned per page.
maximum
100
Protects the API and database from huge requests.