Pagination for results with the REST API

The results retrieved from the prismic.io repository will automatically be paginated. Here you will find an explanation of how to modify the pagination parameters.

The pageSize parameter

The pageSize parameters defines the number of documents that the API will return for each page of the pagination of your query.

Default is 20, max is 100.

The following example demonstrates how to query all of the documents of the custom type "recipe," allowing 100 documents per page.

Here are all the required parameters for this query:

all of type "recipe"

q=[[at(document.type,"recipe")]]

100 recipes per page

pageSize=100

The page parameter

The page parameter defines the pagination for the result of your query.

If unspecified, this field defaults to "1", corresponding to the first page of results.

The following example demonstrates how to query all of the documents of the custom type "recipe" limited to 10 recipes per page, and showing the third page of results.

Here are all the required parameters for this query:

all of type "recipe"

q=[[at(document.type,"recipe")]]

10 recipes per page

pageSize=10

3rd page of results

page=3