Skip to main content
The Query endpoint lets you ask questions about your documents using natural language. Scope the query to a single document, a group (or multiple groups), or leave it unscoped to search your entire workspace.

Query Documents

Endpoint

POST /api/v1/query

Scoping behaviour

Request Body

application/json
string
required
Your natural-language question
string
Restrict the query to a single document.
string
Restrict the query to documents in a specific group. Cannot be combined with document_id or group_ids.
string[]
Restrict the query to documents across multiple groups. Cannot be combined with document_id or group_id.

Response

string
The answer to your question
string
The document used to answer (present only for single-document queries)

Examples

Documents must have status=completed before they can be queried. Use the Check Ingestion Status endpoint to confirm a document is ready.