Guides

To allow the API Query to be able to fetch very large requests, they are automatically split into "pages" of data returned (usually up to 500 entries per page).

APIs that support pagination, accept two optional query parameters:

Parameter NameDescriptionDefault Value
pagePage number of the total data to return (starting from 1)1
per_pageData entries to return per page500 (unless otherwise specified)

The query will return the data in the following format:

{
  "items": [],
  "has_next_page": false
}
FieldDescription
itemsAn array of entries returned for this query
has_next_pageA value of true signifies there are more pages of data available, to retrieve more entries another query should be made with the pageparamter increased by 1.

Sample pseudo-code

page = 1
finished = false

while (!finished) {
  returned_data = query_api("url&page={page}")
  
  if (!returned_data.has_next_page) {
    finished = true
  } else {
    page = page + 1
  }
  
  process_data(returned_data.items)
}

Errors

Passing invalid values to the pageor per_pagewill result in 422errors.