Filters
Filters narrow search results to documents matching specific field values. Pass them as a JSON object in the filters query parameter on the search endpoint.
Filter types
Section titled “Filter types”String filter
Section titled “String filter”Match documents where a field equals a specific value:
curl "https://search-api-elysia-production.up.railway.app/collections/search?q=&filters=%7B%22country%22%3A%22Scotland%22%7D"{ "country": "Scotland" }Array filter
Section titled “Array filter”Match documents where a field equals any of the given values (OR logic):
curl "https://search-api-elysia-production.up.railway.app/collections/search?q=&filters=%7B%22country%22%3A%5B%22Scotland%22%2C%22Wales%22%5D%7D"{ "country": ["Scotland", "Wales"] }Boolean filter
Section titled “Boolean filter”Match documents where a boolean field is true or false:
curl "https://search-api-elysia-production.up.railway.app/collections/search?q=&filters=%7B%22hasImage%22%3Atrue%7D"{ "hasImage": true }Range filter
Section titled “Range filter”Match documents where a numeric field falls within a range. Both min and max are optional:
curl "https://search-api-elysia-production.up.railway.app/collections/search?q=&filters=%7B%22population%22%3A%7B%22min%22%3A10000%2C%22max%22%3A500000%7D%7D"{ "population": { "min": 10000, "max": 500000 } }You can use just min or just max for open-ended ranges:
{ "elevation": { "min": 1000 } }Combining filters
Section titled “Combining filters”Multiple filters can be combined in a single object. All filters are applied with AND logic:
{ "country": "Scotland", "hasImage": true, "population": { "min": 5000 }}