This page documents an earlier version of the API client. For the latest version, see Browse for records.
browse
Use the browse method to get records from an index, for example, to export your index as a backup.
To export all records, use an empty query.
Use browse
instead of search
when exporting records from your index,
when ranking, or analytics, isn’t important.
The Analytics API doesn’t collect data when using browse
.
Don’t use this method for building a search UI.
Use search
instead.
You can’t export your indices from the Algolia dashboard,
only your index settings, synonyms and rules.
For more information, see Export and import your indices.
Ranking
Results are ranked by attributes and custom ranking. For better performance, there is no ranking for:- Distinct
- Typo tolerance
- Number of matched words
- Proximity
- Geo distance
Reduce response size
If you don’t need all attributes, you can reduce the size of thebrowse
response.
Use the attributesToRetrieve
parameter to declare which attributes you want to retrieve.
Pagination
The API clients return all results without pagination, often via iterators or similar constructs. If you need paginated results from the API, use the/browse
HTTP API endpoint.
Examples
Get all records from an index
Get all records with only a few attributes
TheobjectID
attribute is always retrieved.
Parameters
Search query.Use an empty query to fetch all objects.
Compatible search parameters. For example:
- Retrieve only certain attributes:
- Filtering:
browse
, the engine overrides these API parameters:-
typoTolerance
can only betrue
orfalse
. If you settypoTolerance
tomin
orstrict
, the engine sets it totrue
(records matching up to 2 typos are retrieved) -
distinct
:false
-
enableRules
:false
-
ignorePlurals
:false
-
advancedSyntax
:false
-
facets
:[]
-
getRankingInfo
:false
-
attributesToHighlight
:[]
-
attributesToSnippet
:[]
-
optionalFilters
:[]
browse
, the pagination parameters hitsPerPage
and page
are ignored.Personalization isn’t applied to browse requests. The enablePersonalization
parameter is ignored.A mapping of request options to send along with the query.
Response
A cursor to retrieve the next chunk of objects.
If absent, the end of the index has been reached.
Retrieved records.
The maximum number of hits returned per page.
Present only when the query is empty and the browse is not filtered.
Number of objects in the index.
Present only when the query is empty and the browse is not filtered.
The number of returned pages. Calculation is based on total number of hits (
nbHits
)
divided by the number of hits per page (hitsPerPage
), rounded to the nearest highest integer.Present only when the query is empty and the browse is not filtered.Index of the current page (zero-based).
Present only when the query is empty and the browse is not filtered.
URL-encoded search parameters used to filter the results.
Time that the server took to process the request, in milliseconds.
This does not include network time.
Query text used to filter the results.
Response as JSON
This section shows the JSON response returned by the API. Each API client wraps this response in language-specific objects, so the structure may vary. To view the response, use thegetLogs
method.
Don’t rely on the order of properties—JSON objects don’t preserve key order.
JSON