Filtering

Narrow search results by metadata fields using the filters parameter. Two formats are supported: a simple key-value format and a structured DSL with boolean combinators. The API auto-detects the format based on 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 name. Supports exact match, list membership, range operators, and negation.

Exact match

Range

Any-of list

Pass an array to match any value in the list (equivalent to in).

Negation

Structured DSL

Use boolean combinators (and, or, not) with explicit field conditions for complex filtering logic. Supports arbitrary nesting.

Basic AND condition

OR condition

Nested combinators

Combinators can be nested to build complex expressions. This example matches documents from 2020-2025 that are either in the tech/science categories or have "published" status.

NOT combinator

Use not to exclude results matching a condition.

Date Filtering

ISO date strings (YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS) are automatically detected and used for datetime range queries. No special syntax is needed -- just pass the date string as a value.

Date range with gte/lte

Date range with between

The filters parameter is part of the Search API request body. See the full endpoint reference for more details.