List documents with GET
Retrieve documents in batches using query parameters for offset, limit, and optional filtering.
Deprecated: This endpoint will be deprecated in a future release. Use POST /indexes/{index_uid}/documents/fetch instead, which supports more parameters and array-based filter expressions.
Note: Documents are not returned following the order of their primary keys.
Authorizations
An API key is a token that you provide when making API calls. Read more about how to secure your project.
Include the API key to the Authorization header, for instance:
If you use a SDK, ensure you instantiate the client with the API key, for instance with JS SDK:
Path Parameters
Unique identifier of the index.
Query Parameters
Number of documents to skip in the response. Use this parameter
together with limit to paginate through large document sets. For
example, to get documents 21-40, set offset=20 and limit=20.
Defaults to 0.
x >= 0Maximum number of documents to return in a single response. Use
together with offset for pagination. Defaults to 20.
x >= 0Comma-separated list of document attributes to include in the
response. Use * to retrieve all attributes. By default, all
attributes are returned. Example: title,description,price.
When true, includes vector embeddings in the response for documents
that have them. This is useful when you need to inspect or export
vector data. Defaults to false.
Comma-separated list of document IDs to retrieve. Only documents with matching IDs will be returned. If not specified, all documents matching other criteria are returned.
Filter expression to select which documents to return. Attributes must be added to the
filterableAttributes index setting before they can be used in filters. Only accepts
string expressions (not array syntax). Example: genres = action AND rating > 4.
Attribute(s) to sort the documents by. Format: attribute:asc or
attribute:desc. Multiple sort criteria can be comma-separated.
Example: price:asc,rating:desc.
When true, runs the query on the whole network (all shards covered exactly once).
When false, the query runs locally.
When omitted or null, the default value depends on whether the sharding is enabled for the instance:
- If the instance has sharding enabled (has a leader), defaults to
true. - Otherwise defaults to
false.
It also requires the network experimental feature.
Values: true = use the whole network; false = local, default = see above.
When using the network, the index must exist with compatible settings on all remotes.
Response
The documents are returned.