Limit Query Parameter

The limit query parameter allows you to retrieve a specific number of results. For endpoints that support the limit query parameter, you can specify the number of results to retrieve. For example, if you only want to retrieve the first 10 available results, add ?limit=10 to the request URL:

Get First 10 Results
curl -X GET 'https://api.uplift.ai/v1/data/export/job/{id}/results?limit=10' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json'

Offset Query Parameter

The offset query parameter allows you to skip a specific number of results in the response. When a response contains many results, you can use the limit and offset query parameters together to break the response into pages.

For example, consider a job result response object that contains 5000 results. The Job Results API allows you to retrieve a maximum of 500 results per request. To retrieve all 5000 results, start by adding ?limit=500 to the request URL to retrieve the first 500 results:

Get First 500 Results
curl -X GET 'https://api.uplift.ai/v1/data/export/job/{id}/results?limit=500' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json'

In the next request, to retrieve the next 500 results (rows 501-1000), add &offset=500 to the request URL:

Get Results 501-1000
curl -X GET 'https://api.uplift.ai/v1/data/export/job/{id}/results?limit=500&offset=500' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json'

To retrieve the next 500 results (rows 1001-1500), increment the offset parameter to 1000 (&offset=1000) in the next request:

Get Results 1001-1500
curl -X GET 'https://api.uplift.ai/v1/data/export/job/{id}/results?limit=500&offset=1000' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json'

Continue incrementing the offset parameter in requests until you have retrieved all 5000 results. Query with offset beyond available results will get a status OK response with empty ‘rows’ in it. Similar offset and limit parameters are applied in listing of athletes.