Cursor pagination
How to paginate Platform API responses using cursor-based pagination parameters.
1 min read
The Platform API uses cursor-based pagination for large result sets, available on GET requests only.
HTTP request
GET https://platform-api.productsup.io/platform/v2/....?limit=number1&previous=number2&cursor=number3The response includes a meta object containing pagination details:
{
"success": true,
"Entities": [
{
}
],
"meta": {
"cursor": {
"current": 0,
"prev": 0,
"next": 1,
"count": 1
}
}
}Cursor parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 50 | Maximum number of entities per page |
cursor | integer | 0 | Cursor identifier to return entities with IDs after this value |
previous | integer | 0 | Return the previous entity ID, or 0 if none exists |
Response fields
| Field | Type | Description |
|---|---|---|
meta | array | See cursor fields |
Cursor fields
| Field | Type | Description |
|---|---|---|
current | integer | The current ID of the cursor |
prev | integer | The previous entity ID |
next | integer | The ID of the next entity page starter |
count | integer | Number of entities returned in the current response |
How is this guide?