Path parameters
-
indexUid string Required
Index Unique Identifier
Query parameters
-
limit number
Maximum number of results to return.
Default value is
20
. -
offset number
Number of results to skip.
Default value is
0
. -
fields string
Comma-separated list of fields to display for an API resource. By default it contains all fields of an API resource.
Default value is
*
. -
Attribute(s) to filter on.
Can be made of 3 syntaxes
- Nested Array:
["something > 1", "genres=comedy", ["genres=horror", "title=batman"]]
- String:
something > 1 AND genres=comedy AND (genres=horror OR title=batman)
- Mixed:
["something > 1 AND genres=comedy", "genres=horror OR title=batman"]
_geoRadius({lat}, {lng}, {distance_in_meters}) and _geoBoundingBox([{lat, lng}], [{lat}, {lng}]) built-in filter rules can be used to filter documents within geo shapes.
Attribute(s) used in
filter
should be declared as filterable attributes. See Filtering and Faceted Search. - Nested Array:
GET /indexes/{indexUid}/documents
curl \
-X GET https://example.meilisearch.com:7700/indexes/movies/documents \
-H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
"results": [
{
"id": 25684,
"title": "American Ninja 5",
"poster": "https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg",
"overview": "When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.",
"release_date": 725846400
},
{
"id": 45881,
"title": "The Bridge of San Luis Rey",
"poster": "https://image.tmdb.org/t/p/w500/4X7quIcdkc24Cveg5XdpfRqxtYA.jpg",
"overview": "The Bridge of San Luis Rey is American author Thornton Wilder's second novel, first published in 1927 to worldwide acclaim. It tells the story of several interrelated people who die in the collapse of an Inca rope-fiber suspension bridge in Peru, and the events that lead up to their being on the bridge.[ A friar who has witnessed the tragic accident then goes about inquiring into the lives of the victims, seeking some sort of cosmic answer to the question of why each had to die. The novel won the Pulitzer Prize in 1928.",
"release_date": 1072915200
}
],
"limit": 20,
"offset": 0,
"total": 2
}
Response examples (401)
{
"message": "The Authorization header is missing. It must use the bearer authorization method.",
"code": "missing_authorization_header",
"type": "auth",
"link": "https://docs.meilisearch.com/errors#missing_authorization_header"
}