Skip to main content
The filters parameter lets you specify numeric, facet, and tag filters using an SQL-like syntax with support for boolean operators and parentheses.

Usage

  • All filterable attributes must be listed in attributesForFaceting, except for _tags, which is always available.
  • You can combine filters using AND, OR, and NOT, and group expressions with parentheses.
  • Use quotes for:
    • Attribute names or values with spaces.
    • Values that conflict with keywords (AND, OR, NOT).
    • Values that contain single (') or double (") quotes.

Filter types

  • Facet filters Syntax: facet:value
    Example: category:Book
    → Matches records where category is Book
    Facet names are case-sensitive, facet values aren’t.
  • Boolean filters Syntax: facet:true or facet:false
    Example: isEnabled:true
    → Matches records where isEnabled is true or "true"
  • Numeric comparisons Syntax: facet <operator> value
    Operators: <, <=, =, !=, >=, >
    Example: price > 12.99
  • Numeric ranges Syntax: facet:low TO high
    Example: price:5.99 TO 100
    → Includes both bounds.
  • Tag filters Syntax: _tags:value or value
    Example: published
    → Matches records where _tags is published.
    Tag matching is case-sensitive.
  • Array attributes A filter matches if it matches any element in the array. Example: genres:thriller matches genres: ["fiction", "thriller", "sci-fi"].
  • Nested attributes You can filter nested fields if they’re declared in attributesForFaceting. Example: authors.mainAuthor:"John Doe".

Examples

Apply filters on a search query

Current API clients

Complex filters

Current API clients

Attributes with spaces

Current API clients

Attributes conflicting with keywords

Current API clients

Attributes with single quotes

Current API clients

Attributes with double quotes

Current API clients

Last modified on April 27, 2026