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
| Field | Type | Default | Notes |
|---|---|---|---|
queries | string[] | required | Max 25 |
k | int | 5 | Top-k per query (1..50) |
namespace | string | — | Applies to every sub-query |
metadata_filter | object | — | JSONB @> containment |
created_after / created_before | int | — | Epoch 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.