Aggregate counts — group by dimension(s) with filters
Returns COUNT(*) bucketed by one or two categorical dimensions with optional column filters and an optional date range. No search scoring — pure SQL GROUP BY.
Use cases: NACE distribution by country, org size breakdown, top keywords for a sector, monthly registration trends.
Dimensions (group_by / group_by_secondary): continent, country, country_code, state, state_code, region, region_code, district, district_code, municipality, municipality_code, nace_code, organization_type, organization_size, employee_class, revenue_class, summary_keywords (unnested), company_register_date, created_at.
summary_keywords is automatically unnested — each keyword in the array counts as its own bucket.
Date dimensions use DATE_TRUNC and are ordered chronologically (ASC). All other dimensions are ordered by count DESC.
Monthly request quotas apply by API key tier.
Authorizations
Body
Primary dimension to group by. Omit for a single total COUNT(*). Allowed values — Geographic: continent, country, country_code, state, state_code, region, region_code, district, district_code, municipality, municipality_code. Classification: nace_code, organization_type, organization_size, employee_class, revenue_class. Source: source. Array (unnested per keyword): summary_keywords. Registrations (unnested per registration via the registries jsonb): company_register_court, company_register_date. A company with multiple registrations contributes one row per registration. Date (requires date_trunc): company_register_date, created_at.
Optional second dimension — produces a 2D breakdown. Requires group_by to be set. Allowed values — Geographic: continent, country, country_code, state, state_code, region, region_code, district, district_code, municipality, municipality_code. Classification: nace_code, organization_type, organization_size, employee_class, revenue_class. Source: source. Array (unnested per keyword): summary_keywords. Registrations (unnested per registration via the registries jsonb): company_register_court, company_register_date. A company with multiple registrations contributes one row per registration. Date (requires date_trunc): company_register_date, created_at.
Response
Aggregation buckets with count per group, plus query metadata.