Pagination
Implement faster search results using the pagination support
This feature is only available for the Search API
Parameters
Pagination is supported using 2 parameters: limit
and offset
. As their name suggests, the first one defines the number of results per request's response, and the second defines the index of the first result to fetch.
Name
Type
Is Required?
Default value
limit
integer
✖
10
offset
integer
✖
0
limit
limit
Set the number of results you want to fetch for each request.
0
1000
Notes
If the specified
limit
is out of bounds, the maximum value is used.
offset
offset
This option allows you to set the index of the first retrieved item.
0
10 000
Notes
Indexes are 0-based:
offset=0
will return the first item andoffset=9
the tenth.To have a proper pagination, the
offset
should always be a multiple of thelimit
parameter.
Response
All responses from XO Search uses the same format. Check API Reference page for a more detailed description of this format.
Usage example
Fetch the 3rd page of results, with each page containing 10 elements (ie.
offset
is set to 20 andlimit
is set to 10)
NodeJS / NPM example
HTML example
Last updated