Search Language
The search language filter syntax provides a powerful way to filter API results. Use this query language to narrow down results based on specific field values.
Use the q
query parameter to specify the search language filter syntax.
Each endpoint has a list of supported fields which you will need to consult to determine which fields are available for filtering.
Basic Syntax
q={FIELD}{OPERATOR}"{VALUE}" {AND|OR} {FIELD}{OPERATOR}"{VALUE}" ...
Ensure that the value is enclosed in double quotes.
Examples
name:"John"
created_at>"2023-01-01"
status!:"inactive"
Supported Operators
Operator | Description | Example |
---|---|---|
: | Equals | name:"Smith" |
!: | Not equals | status!:"deleted" |
~ | Contains | tags~"urgent" |
!~ | Does not contain | description!~"draft" |
> | Greater than | price>"50" |
< | Less than | stock<"10" |
>= | Greater than or equal to | rating>="4" |
<= | Less than or equal to | priority<="3" |
Combining Filters
Connect multiple conditions using AND
or OR
:
status:"active" AND created_at>"2023-01-01"
priority:"high" OR due_date<:"2023-12-31"
Relationship Filtering
Access related resources using dot notation:
user.name:"John"
order.items.count>"5"
Notes
- Parentheses grouping is not supported
- All conditions are evaluated left-to-right
- Values must be enclosed in double quotes
Example API Usage
GET /api/channels/listings?q=title:"Chair" AND title:"Table"