Pagination
Endpoints that return lists of resources are paginated. You control pagination with two parameters:
page: which page to retrieve (starts at 1)offset: how many items per page (minimum 1, maximum varies per endpoint)
The default offset on most endpoints is 12.
GET endpoints
For GET requests, pass pagination as query parameters:
GET /v2/products?page=1&offset=10
GET /v2/products?page=2&offset=20
GET /v2/products?page=3
POST search endpoints
For POST search endpoints, include pagination in the request body:
{
"filters": {
"categories": ["electronics", "computers"]
},
"page": 1,
"offset": 15
}
Response metadata
Every paginated response includes metadata alongside the data array:
{
"data": [
{ "id": 56897, "name": "Product 1" },
{ "id": 36975, "name": "Product 2" }
],
"messages": ["Completed"],
"start": 1,
"end": 2,
"page": 1,
"pages": 20,
"total": 2,
"offset": 2,
"itemsFound": 35
}
| Field | Type | Description |
|---|---|---|
data | array | Array of resources for the current page |
start | integer | First item number on the current page |
end | integer | Last item number on the current page |
page | integer | Current page number |
pages | integer | Total number of pages |
total | integer | Number of items on the current page |
offset | integer | Number of items per page |
itemsFound | integer | Total number of items across all pages |
To iterate through all results, loop from page 1 to pages, incrementing by 1.
See also
- Expanding Resources for including related data in paginated responses
- REST API Reference for the full endpoint specification