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
Set the number of results you want to fetch for each request.
Minimum Value
Maximum Value
0
1000
Notes
If the specified limit is out of bounds, the maximum value is used.
offset
This option allows you to set the index of the first retrieved item.
Minimum Value
Maximum Value
0
10 000
Notes
Indexes are 0-based: offset=0 will return the first item and offset=9 the tenth.
To have a proper pagination, the offset should always be a multiple of the limit 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 and limit is set to 10)