In many applications, data retrieval is an important aspect, especially when dealing with large quantities of data. Given the impacts of such a volume to the performance, splitting the information into manageable ‘chunks’, a technique known as pagination, comes into play. In our API, we support pagination parameters to simplify this process.

How pagination works

The pagination parameters are set at API request and appear under the pagination element.

{
  ...
  "pagination": {
    "page": 1,
    "limit": 100
  },
  ...
}

This attribute contains two elements:

  • page: refers to the current page number.
  • limit: determines the maximum number of items to return on each page.

In the example above, we see an API Request asking to return the first page of the results and a maximum of 100 results per page.

When a API is paginated, also the API Response contains the pagination object, to be used to iteratively and incrementally query the data in chunks.

So by adjusting page and limit parameters, you can effectively manage what portion of your data you’re dealing with at any one time, ensuring efficient data retrieval regardless of the volume.