Search knowledge sources
Search across the project’s knowledge sources and get back the most relevant passages, optionally with a generated answer written from them.
Example: “Search my knowledge base for anything about refund policy”
Usage: give the search text and say how many passages you want back (5 by default). Ask for a generated answer or turn it off to get the raw passages only. You can narrow the search to specific sources, folders, or tags, or to sources in certain workflow statuses; leave those out to search the whole project. Only sources that have finished syncing are searchable, so a whole-project search already skips ones still queued, syncing, or failed.
Response: the matching passages with their source, and, when asked for, a generated answer written from them.
Headers
Project ID for tenant scoping
Overrides the key's workspace
User API key
Query Parameters
Search text to match against knowledge source content.
Maximum number of matched chunks to return.
If True, also return a generated answer; if False, return raw matched chunks only.
Body
Response
Successful Response
Retrieval response. answer is null in chunks-only mode.