POST · Bulk search

Run up to 25 search queries in one round-trip. Fan-out for RAG.

POST /api/memories/search/bulk

Run up to 25 search queries in a single round-trip. Useful for RAG flows that decompose a user question into sub-queries and want all the hits in one call.

curl -X POST https://www.mnueron.com/api/memories/search/bulk \
  -H "Authorization: Bearer $MNUERON_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "queries": ["indentation style", "tab width preference", "JS code style"],
    "namespace": "preferences",
    "k": 3
  }'

Body

FieldTypeDefaultNotes
queriesstring[]requiredMax 25
kint5Top-k per query (1..50)
namespacestringApplies to every sub-query
metadata_filterobjectJSONB @> containment
created_after / created_beforeintEpoch ms

Response

{
  "results": [
    { "query": "indentation style",   "hits": [...] },
    { "query": "tab width preference", "hits": [...] },
    { "query": "JS code style",        "hits": [...] }
  ]
}

Hits are the same shape as the single-search endpoint, including the per-hit score. The sub-queries share a single Postgres connection, so this is meaningfully cheaper than 25 separate POST /api/memories/search calls.

Last updated 2026-05-24edit