starting_after and ending_before parameters. Results are always sorted in reverse chronological order (most recently created records first). An example can be found at the end of this page.
ending_beforereturns the page that ends immediately before the given object, if setstarting_afterreturns the page that comes immediately after the given object, if set.limitreturns the number of results per page. Defaults to 10. This value can be set to any number between 1 and 100. Note that larger limits may result in slower response times.
ending_before or starting_after pagination parameters. If you set both parameters, you will receive an API parameter error.
To iterate through a list of all results for a given endpoint and filters, you will pass the object id of the last result to starting_after on your next query.
We strongly recommend using the next_page response value to iterate through the data.
string
The type of object returned. In paginated list views, the value will always be
list.boolean
Indicates if there are more results to fetch.
string
A URL relative to the API’s domain which you can use to fetch the next page of the list. This link will include the
starting_after parameter pointing to the next page or, if your current request used ending_before, this link will include the ending_before parameter pointing to the previous page.array
A list of objects returned by the list endpoint, up to the list limit for the endpoint.
Example usage:
For example, if there are 20 records with IDs1 through 20, the first request with limit=5 would return the following records’ IDs:
[20, 19, 18, 17, 16]
with the next_page with the pre-filled starting_after=16.
The next request would return
[15, 14, 13, 12, 11]
and so on and so forth, until the value has_more=False.
Note: Because of soft deletions, some records in the sequence may be missing, though the overall ordering remains intact.