The query system is built around two fundamental components:
Every query must include at least one domain in the domains
array. Filters are optional but powerful tools to refine your search.
The following fields are available for filtering:
continent
- Geographic region (e.g., "North America", "Europe")company_size
- Employee count ranges (e.g., "11-50", "51-100")country
- Specific countries (e.g., "United States", "United Kingdom")last_funding_type
- Latest funding round (e.g., "Series A", "Seed")More filters are on the roadmap in near future
The most basic way to filter is by specifying values for one or more fields:
{
"domains": ["chattermill.com"],
"filters": {
"continent": ["Europe"],
"company_size": ["11-50"]
}
}
In simple filters, multiple values for the same field are treated as OR conditions, while different fields are treated as AND conditions.
The query system supports two logical operators:
$or
- Match any of the conditions$and
- Match all of the conditionsThese can be used explicitly through the operator
field in more complex queries.
The most basic query matches companies by a single criterion:
{
"domains": ["example.com"],
"filters": {
"continent": ["Europe"]
}
}
Adding multiple parameters creates an implicit AND condition:
{
"domains": ["example.com"],
"filters": {
"continent": ["Europe"],
"company_size": ["11-50"],
"country": ["Germany"]
}
}
To match any of several conditions, use the $or
operator:
{
"domains": ["example.com"],
"filters": {
"operator": "$or",
"conditions": {
"continent": ["Europe", "North America"],
"company_size": ["11-50", "51-100"]
}
}
}
For explicit AND conditions, use the $and
operator:
{
"domains": ["example.com"],
"filters": {
"operator": "$and",
"conditions": {
"continent": ["Europe"],
"company_size": ["11-50"],
"last_funding_type": ["Series A"]
}
}
}
The most complex queries can combine AND and OR conditions at different levels:
{
"domains": ["example.com"],
"filters": {
"operator": "$and",
"conditions": [
{
"operator": "$or",
"conditions": {
"continent": ["Europe", "North America"]
}
},
{
"operator": "$or",
"conditions": {
"company_size": ["11-50", "51-100"]
}
}
]
}
}
This query finds companies that are:
The API includes robust validation that will:
If validation fails, you'll receive a 400 response with detailed error messages and suggestions for correction.
{
"status": "error",
"message": "Invalid filter configuration",
"details": {
"continent": {
"error": "Invalid continent value",
"received": "Invalid continent: united kingdom",
"valid_options": [
"North America",
"South America",
"Europe",
"Asia",
"Africa",
"Oceania",
"Antarctica"
]
}
},
"data": {}
}
Remember: