API Reference / API Parameters / page
Type: integer
Engine default: 0
Parameter syntax
'page' => page_number

Can be used in these methods:

About this parameter

Specify the page to retrieve.

Page numbers are zero-based.

Usage notes

  • Page-numbering is based on the value of hitsPerPage. If hitsPerPage=20, then page=0 will display the hits from 1 to 20, page=2 will display the hits from 41 to 60.

  • Page numbers are zero-based. To retrieve the tenth page, set page=9.

  • You can see the number of available pages in the value of nbPages in the JSON response to the search query.

  • If you send a request for a page that doesn’t exist, for example, page is greater than or equal to nbPages, Algolia doesn’t respond with an error. Instead, the response has 0 results.

Examples

Access the nth page of results

1
2
3
$results = $index->search('query', [
  'page' => 0
]);
Did you find this page helpful?