Pagination

All endpoints that return a list are paginated by:

  • page: the page number
  • per_page: the number of items returned per page

The current default value for page is the first (1) page, and for per_page, the default is 25 items per page. This is reflected in each method's documentation:

616

An example of changing the default value for page in an endpoint's documentation

For performance reasons, we limit items per page to a max of 100 items per page.

To set these values, pass them as query parameters in your request. For example, in a list organizations GET request, to return the first page at 50 items per page:

curl --request GET \
     --url 'https://api.planetscale.com/v1/organizations?page=1&per_page=50' \
     --header 'Authorization: TOKEN_ID:TOKEN_SECRET' \
     --header 'accept: application/json'