Search API

Search documents in your collections using hybrid retrieval.

Search Documents

POST
/api/v1/search/query

Search documents in a collection using hybrid retrieval (dense + sparse vectors). Returns ranked results. The search mode and reranking settings are determined by the collection's configuration.

Request Body

collection
required

stringCollection name to search

query
required

stringSearch query text (max 1000 characters)

limit
optional

integerMax results to return (default 10, max 30)

filters
optional

object | nullMetadata filters on indexed fields

include_metadata
optional

booleanInclude metadata in results (default true)

include_images
optional

booleanFetch and include figure images as base64 in metadata.figures[].image_data (default false, adds latency)

Response Fields

results
required

arrayArray of search results with id, text, and metadata

queryId
required

stringUnique query identifier. Use to re-fetch the same results for free within 7 days via GET /api/v1/search/results/{queryId}

latencyMs
required

integerSearch latency in milliseconds

Re-fetch Results

Every search response includes a queryId. Use it to retrieve the same results again without being charged, for up to 7 days after the original search. The request must use the same API key.

GET
/api/v1/search/results/{queryId}

Response

Identical to the original search response, with latencyMs: 0. Includes X-Cache: hit and X-Cache-Expires headers.

Errors

404
optional

Not FoundQuery ID not found or belongs to a different API key

410
optional

GoneCached result has expired (past 7-day window)

Filtering

Use the filters parameter to narrow search results by metadata fields. Two formats are supported and auto-detected based on the top-level keys.

Operators

OperatorDescriptionExample value
eqEquals"research"
neNot equals"deleted"
inMatches any in list["tech", "science"]
not_inExcludes values in list["spam", "junk"]
gtGreater than2020
gteGreater than or equal2020
ltLess than2025
lteLess than or equal2025
betweenRange (inclusive)[2020, 2025]

Simple format

Key-value pairs where each key is a metadata field. Supports exact match, lists, ranges, and negation.

Structured DSL

Boolean combinators (and, or, not) with explicit field conditions. Supports arbitrary nesting.

Date filtering

ISO date strings (YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS) are automatically detected and used for datetime range queries.

Request

Response