Skip to main content
  • Type: integer
  • Default: 0
  • Scope: search
The page parameter defines the zero-based page number of results to retrieve. It works together with hitsPerPage to control pagination. For example, to fetch the third page of results with 10 hits per page, set page to 2 and hitsPerPage to 10.

Usage

  • Pagination is zero-based: the first page is page: 0.
  • The total number of available pages is returned as nbPages in the search response.
  • If page exceeds or equals nbPages, the response contains zero hits but no error.
With page and hitsPerPage, the response includes these fields:
{
  // ...
  "page": 1,
  "nbPages": 20,
  "hitsPerPage": 10,
  // ...
}

Example

Current API clients

var response = await client.SearchSingleIndexAsync<Hit>(
  "ALGOLIA_INDEX_NAME",
  new SearchParams(new SearchParamsObject { Query = "query", Page = 0 })
);
index.Search(new Query("query")
{
    Page = 0
});
I