Search
Multi-search
Execute multiple search queries in a single request. Each query targets an index and accepts the same parameters as /v1/search, using indexUid instead of index.
Request and response
POST
/v1/multi-searchSearch multiple indexes in a single request.
- Auth
- admin or search key
- Returns
- 200
{
"queries": [
{
"indexUid": "products",
"q": "macbook",
"limit": 5
},
{
"indexUid": "articles",
"q": "macbook review",
"limit": 3,
"attributesToHighlight": ["title"]
}
]
}{
"results": [
{
"indexUid": "products",
"hits": [ ... ],
"query": "macbook",
"processingTimeMs": 1,
"estimatedTotalHits": 12
},
{
"indexUid": "articles",
"hits": [ ... ],
"query": "macbook review",
"processingTimeMs": 2,
"estimatedTotalHits": 5
}
]
}Each query in the queries array accepts all parameters from the search endpoint, using indexUid instead of index. Each query counts as one search.
Queries per call
A call with more queries than that is refused, and none of them runs (400 too_many_search_queries).