ArtemisAds uses cursor-based pagination for querying large data sets through our APIs. This method provides a reliable and consistent way to iterate through results, especially as data volume changes.
When you make a paginated query, we return a special field, the cursor, in the response. You must use this token in your next request to retrieve the subsequent page of results.| Condition | cursor Value | Action |
|---|
| More results available | A non-null opaque string | Include this token in the next request to get the following page. |
| No more results | null | You have reached the final page. Stop making requests. |
Important Note: When the cursor parameter is set to null or is empty in the request, the API will always return the first page of data.
2. Request Parameters#
To control the pagination, use the following optional query parameters in your API request:| Parameter | Type | Default | Description |
|---|
cursor | string | (empty/null) | The opaque token returned from the previous request's cursor field. Omit this for the first request. |
limit | integer | 100 | The maximum number of records to return per page. |
Example: First Page Request
To fetch the first 50 results (by setting the limit parameter):
3. Response Structure#
The cursor field is located at the root level of the response body.Example Response (Page 1)
The response for the first request includes the data (e.g., trackingIds) and the cursor for the next page.{
"trackingIds": [
{ },
],
"cursor": "eyJpZCI6IjUwMCIsInRpbWUiOiIxNjc5MDU0NzQ2In0="
}
Example Response (Last Page)
When no more data is available, the cursor field will be returned null.{
"trackingIds": [
{ }
],
"cursor": null
}
Modified at 2025-11-11 06:25:08