POST /v1/multi-search 🔒 Bearer

Multi-search

Run several search queries in one HTTP round-trip.

Send multiple independent queries in a single request. Each runs in parallel on the engine; the response contains one entry per query in the same order.

Useful for:

  • "Customers also searched for…" widgets (one query per term).
  • Cross-index search bars that hit products + articles together.
  • Faceted "show me 5 of each brand" layouts.

# Body parameters

Name Type Required Description
searches[] array required Up to 50 search specs. Each one is a normal /query body plus an index field.
searches[].index string required The index to query.

All other parameters are the same as Query an index.

# Response

{
  "data": {
    "results": [
      { "found": 12, "hits": [...], "search_time_ms": 7 },
      { "found": 4,  "hits": [...], "search_time_ms": 5 },
      { "found": 9,  "hits": [...], "search_time_ms": 6 }
    ]
  }
}

If one query fails, the others still run — the failed slot gets { "error": "...", "code": "SK-..." } instead of a result block.

esc
POST /v1/multi-search