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: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 |
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 |
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 |
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)
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
Tips#
Field names and operators are not 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)