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
| Operator | Description | Example value |
|---|---|---|
eq | Equals | "research" |
ne | Not equals | "deleted" |
in | Matches any in list | ["tech", "science"] |
not_in | Excludes values in list | ["spam", "junk"] |
gt | Greater than | 2020 |
gte | Greater than or equal | 2020 |
lt | Less than | 2025 |
lte | Less than or equal | 2025 |
between | Range (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.