Skip to main content
POST
Handle Send Search Message
Required permission: Search — Read (read:search), which basic includes, so any signed-in user has it. A limited Personal Access Token needs the Search — Read scope.
This is the endpoint behind the Onyx Search UI. Unlike POST /chat/send-chat-message, stream defaults to false here, so the default response is the aggregated SearchFullResponse. See Search with the API for the streaming packet format.
Requires a vector database: deployments running with DISABLE_VECTOR_DB set (Onyx Lite) answer with 501. Every query from a signed-in user is recorded in that user’s search history.

Authorizations

Authorization
string
header
required

Authorization header with Bearer token

Body

application/json
search_query
string
required
filters
BaseFilters · object | null
num_docs_fed_to_llm_selection
integer | null
run_query_expansion
boolean
default:false
num_hits
integer
default:30
hybrid_alpha
number | null
include_content
boolean
default:false
stream
boolean
default:false

Response

If stream=true, returns text/event-stream. If stream=false (the default), returns application/json (SearchFullResponse).

all_executed_queries
string[]
required
search_docs
SearchDocWithContent · object[]
required
doc_selection_reasoning
string | null
llm_selected_doc_ids
string[] | null
error
string | null