What is pagination and how does it work


Endpoints which return an extensive list of objects use pagination

Pagination allows the user to request a part of the list, receiving an array of results, next, previous and count parameters in the response. This allows the response to be faster and more precise.

You can use this call to test it (add your token):

curl --location '' \
--header 'X-Token: <your_token>'

Here is an example answer:

    "count": 3291,
    "next": "",
    "previous": "",

Here is an example code on how to use Pagination and Pandas dataframes on Python:

Answer Parameters

The answer will have four particular parameters:

countHow many data points this request has in its entirety, regardless of pagination
nextThe URL of the request to be done to provide the next page of the request
previousThe URL of the request to be done to provide the previous page of the request
resultsWhere the data request will be located

Request Parameters

Alternatively, you can see that the pagination URL is constructed in a specific manner. At the end of the URL two new parameters are added:

LimitThe number of data points to be on each page.
Default: 1000
Maximum: 10000
OffsetBy which datapoint the page will start.
This can be any number as long as it is smaller than the number of data points on the dataset

That means you can also construct your page structure, if you prefer, by adding these two parameters in the URL to fit your purpose.