1. Pagination

Pagination

To efficiently handle large datasets, the Storyblok API supports pagination for all top-level resources, such as Stories, Links, and Datasource Entries.

The list API method allows two parameters, page and per_page:

Query parameterDescription
pageAn integer value representing the page number to retrieve. Increase this value to receive the next page of entries. The default is set to 1.
per_pageThe number of entries per page. The default is set to 25, the maximum is 100 (1000 for datasource entries).

For paginated API requests, the response headers include two important properties:

- total: Indicates the total number of items available across all pages.

- per_page: Specifies the number of items per page as per your request.

These values can be leveraged to implement efficient pagination strategies.

Requesting a page number that is higher than the last available page number results in an empty array in the API response.

Related Resources