Search Storyblok's Documentation
  1. Pagination

Pagination

To efficiently handle large datasets, the Storyblok API supports pagination for all top-level resources. For instance, stories and datasource_entries share a common structure and take these two parameters: page, per_page.

The default per_page is set to 25 entries per page. You can increase this number to receive up to 100 entries per page. To go through different pages you can utilize the page parameter. The page parameter is a numeric value and uses 1 as default.

For the calculation of how many pages are available, you can access the total response header that you will receive after you make your first request. Access it and divide it with your per_page parameter to receive the highest possible page. You will receive an empty array as a result if the page doesn't exist

Query parameterDescription
pageDefault: 1. Increase this to receive the next page of content entries
per_pageDefault: 25, Max for Stories: 100, Max for Datasource Entries: 1000. Defines the number of content entries you will receive per page
Example Request
curl "https://mapi.storyblok.com/v1/spaces/606/stories/" \
  -X GET \
  -H "Authorization: YOUR_OAUTH_TOKEN" \
  -H "Content-Type: application/json"
Example Response
{
  "stories": [
    { ... },
    { ... }
  ]
}
Example Response Headers
status: 200
per-page: 2
total: 3
...