Public Search
Search public context with schema-aware response formatting.
Issue #238: Public REST API for external systems (EC inventory, docs, etc.). Issue #626: Optional API-key attribution via Authorization: Bearer <kagura_…>. A bound key gets a per-key rate-limit bucket and audit attribution; an unbound key (owner / workspace-scoped) is rejected so callers don't accidentally route their primary credentials through a public path. Anonymous access continues to work without any header.
Authentication: - Workspace member session (authenticated access, no rate limit) - Public-bound API key (#626) — per-key rate limit, audit-attributed - Anonymous access (rate limited to 50 req/min per context, shared)
Rate Limits: - Anonymous access: 50 requests/minute per context (shared bucket) - Public-bound key: per-key bucket from workspace plan tier (bound_public_calls_per_minute) - Workspace members: No limit (uses normal workspace quota)
Request: POST /api/v1/public/{context_id}/search Headers: Authorization: Bearer kagura_… (optional; required only for attributed/bound-key access) Body: { "query": "商品名 価格", "limit": 10, "use_rerank": false }
Response: { "status": "success", "query": "商品名 価格", "results": [ { "memory_id": "...", "content": "商品名: ..., 価格: ...", "score": 0.95, "metadata": {...}, "highlighted": {...} } ], "count": 5, "context_id": "...", "resource_id": "ec_products", "schema_version": 1 }
Errors: - 401: API key supplied but invalid / expired - 403: Context is not public, OR API key is not public-bound, OR API key is bound to a different context (CWE-639 IDOR) - 404: Context not found - 429: Rate limit exceeded (anonymous or per-key bucket), or the workspace's plan has no public API allowance (#1939)
Request
- Base URL: https://memory.kagura-ai.com (the document declares no server; this is the origin it was published from)
- URL: https://memory.kagura-ai.com/api/v1/public/{context_id}/search
- Auth: none declared
Path parameters
Headers
Request body
Response
Successful Response
Changes
No recorded changes to this operation across all 2 revisions of this API.