Filter your API requests to get exactly the data you need. Add a filter parameter to GET requests that supports it to narrow down results.Quick Start: Filter results by adding conditions to your request.
Eg:?filter=city:equals:Amsterdam- This returns only locations in Amsterdam.
How It Works#
Each filter has three parts separated by colons:field - The property you want to filter by (like city, rating, or status)
operator - How you want to compare (like equals, gt for greater than, lte for less than or equal to)
value - The value you're looking for
Available Operators#
Different field types support different operators. Each endpoint's filter parameter lists the fields you can filter on and their type:Text Fields (String)#
| Operator | What it does | Example |
|---|
equals | Exactly matches | city:equals:Oslo |
contains | Contains text | name:contains:Restaurant |
startsWith | Starts with text | city:startsWith:New |
endsWith | Ends with text | email:endsWith:@example.com |
in | Matches any of the listed values | city:in:Oslo|Amsterdam |
Number Fields (Integer, Decimal)#
| Operator | What it does | Example |
|---|
equals | Exactly equals | rating:equals:5 |
gt | Greater than | rating:gt:3 |
gte | Greater than or equal to | rating:gte:4 |
lt | Less than | price:lt:100 |
lte | Less than or equal to | price:lte:50 |
in | Equals any of the listed values | rating:in:4|5 |
Date Fields#
| Operator | What it does | Example |
|---|
equals | Exact date match | created:equals:2024-01-15 |
gt | After date | created:gt:2024-01-01 |
gte | On or after date | created:gte:2024-01-01 |
lt | Before date | created:lt:2024-12-31 |
lte | On or before date | created:lte:2024-12-31 |
Boolean Fields (True/False)#
| Operator | What it does | Example |
|---|
equals | Matches boolean value | active:equals:true |
Literal Fields (Fixed Values)#
Some fields, such as status, only accept a fixed set of values. Each endpoint's filter parameter lists the allowed values.| Operator | What it does | Example |
|---|
equals | Matches one of the allowed values | status:equals:active |
in | Matches any of the listed values | status:in:active|scheduled |
Values must match one of the allowed values exactly. Any other value, or any other operator, returns an error.Matching One of Several Values#
Use the in operator to match any value from a list. Separate the values with a pipe (|).GET /posts?filter=status:in:active|draft
This returns posts that are either active or draft.in is available on text, number and literal fields.
A list can hold up to 100 values.
Values can't be empty, so active||draft and active| return an error.
A value can't contain a pipe (|) or a comma (,).
Multiple Filters#
Combine multiple filters with commas.GET /users?filter=email:endsWith:@gmail.com,createdAt:gt:2024-12-01
This returns users with a gmail address created after dec 1st, 2024All conditions must be met. (AND logic used)
Filtering a Field More Than Once#
You can use the same field in several filters. This is how you filter on a range:GET /users?filter=createdAt:gte:2024-01-01,createdAt:lt:2024-02-01
This returns users created in January 2024. Every filter on the field must match, just like filters on different fields.Common Examples#
Find locations whose name starts with "Store":GET /locations?filter=name:startsWith:Store
Find locations created in a date range:GET /locations?filter=createdAt:gte:2024-01-01T00:00:00.000Z,createdAt:lte:2024-12-31T23:59:59.999Z
Combine multiple filters (locations with "Restaurant" created this year):GET /locations?filter=name:contains:Restaurant,createdAt:gte:2025-01-01T00:00:00.000Z
GET /users?filter=lastName:contains:Smith
Find users with a specific email:GET /users?filter=email:equals:john@example.com
Find users with Gmail addresses:GET /users?filter=email:endsWith:@gmail.com
Find users with one of several email addresses:GET /users?filter=email:in:john@example.com|jane@example.com
Tips#
Field names and operators are case-sensitive
Use exact field names as they appear in the API response
All filters are combined with AND logic (all conditions must match)
Invalid filters will return an error message explaining what went wrong
Error Handling#
The API validates all filters automatically. You'll get a clear error message if:You use a field name that doesn't exist
You use an invalid operator
The value type doesn't match (e.g., using text where a number is expected)