public

Search

Run Onyx's internal search and get back ranked document sections, with no LLM answer generated.

This is the same multi-stage retrieval pipeline the chat Search action uses: query expansion, hybrid retrieval, reranking and section merging. Results are ordered most relevant first and are always filtered by the calling user's document permissions.

post/search

Request body

querystring required

The query to search for.

sourcesDocumentSource[] nullable

Restrict results to these connector source types.

document_setsstring[] nullable

Restrict results to documents in these document sets, by name.

time_cutoffstring date-time nullable

ISO 8601 timestamp. Only documents updated on or after this moment are returned. Timestamps without a timezone are treated as UTC.

persona_idinteger nullable

Search as this Agent: its document sets, attached documents and search start date are applied on top of the other filters, and its LLM is used unless provider/model say otherwise.

providerstring nullable

Name of the LLM provider to use for query expansion and section selection. Must be sent together with model, and the caller must have access to the provider.

modelstring nullable

Model to use from provider. Must be sent together with provider.

skip_query_expansionboolean

When true, the query is run as written instead of being rewritten and expanded first.

Response

Successful Response

Changes

Changed in 1 of the 14 revisions of this API.1