Rest API Pagination

Pagination in REST API's

Pagination is achieved through the following query string parameters:

  • first
  • after

"first" is your page size. Maximum and minimum values vary by endpoint. Default 50.

"after" is your page token. This token is returned to you when you use a pagination enabled endpoint, you will receive the following JSON object in your response

{  
  ...  
  "responseMetadata": {  
    "hasNextPage": true,  
    "endCursor": "<PAGE_TOKEN>"  
  }  
}

This response means that you have another page of data available. You may retrieve that next page by performing your request again. In your next request you would add the following query string parameters.
after=<PAGE_TOKEN>