Pagination
How to use pagination with the Clerk.io API.
Some API endpoints that return product-result-sets support pagination. Pagination is only available for APIs where it makes sense, such as search results or popular in a category.
Pagination is controlled by the limit
and offset
parameters.
limit
determines the number of results to be returned.
offset
determines how far into the result-set the limit
-number of products should be selected from. offset
is 0 if not provided and by default 0-indexed.
Examples
limit
of 10 and an offset
of 0 will give the first 10 results.
limit
of 10 and an offset
of 10 will give the next 10 results.
If you have a page size of 20 and want to select page 3, your limit
should be 20 and your offset should be (3-1) * limit
= 40.
Updated about 5 years ago