page
0
'page' => page_number
Can be used in these methods:
search,
browseObjects,
generateSecuredApiKey,
addApiKey,
updateApiKey
search,
browse_objects,
generate_secured_api_key,
add_api_key,
update_api_key
search,
browseObjects,
generateSecuredApiKey,
addApiKey,
updateApiKey
search,
browse_objects,
generate_secured_api_key,
add_api_key,
update_api_key
search,
browse,
generateSecuredApiKey,
addAPIKey,
updateAPIKey
search,
browseObjects,
generateSecuredApiKey,
addApiKey,
updateApiKey
Search,
Browse,
GenerateSecuredApiKeys,
AddApiKey,
UpdateApiKey
Search,
browse,
generateSecuredApiKey,
addApiKey,
updateApiKey
Search,
BrowseObjects,
GenerateSecuredAPIKey,
AddAPIKey,
UpdateAPIKey
search,
browse index,
generateSecuredApiKey,
add key,
update key
About this parameter
Specify the page to retrieve.
Algolia uses the page
and hitsPerPage
parameters to control how search results are displayed (paginated).
hitsPerPage
: sets the number of search results (hits) displayed per page. Choose a value between 1 and 1,000. The default is 20.page
: specifies the page number of the search results you want to retrieve. Page numbering starts at 0, so the first page ispage=0
, the second ispage=1
, and so on.
For example, to display 10 results per page starting from the third page, set hitsPerPage
to 10 and page
to 2.
Usage notes
- 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 tonbPages
, 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
]);