---
title: "/screen/aggregate"
method: POST
path: "/v1/screen/aggregate"
tags: ["Screening"]
---

# /screen/aggregate

`POST /v1/screen/aggregate`

## Request

- Base URL: `https://api.companydata.dk` (the document declares no server; this is the origin it was published from)
- URL: `https://api.companydata.dk/v1/screen/aggregate`
- Auth: HTTP bearer

Group the companies matching a set of screening filters by a dimension
(industry, municipality, company type, reporting class or CDS rating)
and get per-group counts, optionally with sums and averages of up to 3
key figures.

Groups are sorted by company count and capped at 100
(`meta.truncated` is true when more groups exist). Keys are codes;
resolve display names via `/v1/industries` and `/v1/municipalities`.

## Request body

- ScreenAggregateRequest: Request body for POST /v1/screen/aggregate.
  - `filters` ScreenFilters, required: Screening criteria. All given filters are combined with AND. At least one filter beyond `statuses` must be set.
    - `industry_codes` string[]: DB07 industry codes, 2-6 digits. Codes shorter than 6 digits match as prefixes: `47` matches every retail code. Matches primary or secondary industry.
    - `company_types` string[]: Company type codes, e.g. A/S, ApS, ENK
    - `statuses` string[]: Company statuses to include. Defaults to active companies only. Valid values: active, dissolved, under_bankruptcy, liquidation.
    - `founded` DateRange: Inclusive date range. At least one bound must be set.
      - `from` string, date, nullable: Inclusive start date
      - `to` string, date, nullable: Inclusive end date
    - `municipality_codes` string[]: Municipality codes
    - `postal_codes` string[]: Postal codes
    - `region_codes` string[]: Region codes (resolved to the region's municipalities)
    - `geo` GeoRadius: Circular geographic area (same bounds as /v1/companies geo search).
      - `lat` number, required: Latitude of center
      - `lng` number, required: Longitude of center
      - `radius` integer, required: Radius in meters (50-50000)
    - `employees` NumericRange: Inclusive min/max range. At least one bound must be set.
      - `min` number, nullable: Inclusive lower bound
      - `max` number, nullable: Inclusive upper bound
    - `financials` object: Key figure ranges, e.g. `{"equity_ratio": {"min": 0.15}}`. Valid keys: revenue, gross_profit, operating_profit, profit_loss, equity, total_assets, equity_ratio, current_ratio, return_on_equity, profit_margin, revenue_growth, gross_profit_growth, equity_growth. Amounts in DKK; ratios and growth rates as fractions. Note that most small companies (reporting class B) do not publish revenue, only gross profit. A company only matches a metric filter if its latest annual report contains that metric.
    - `reporting_classes` string[]: Reporting classes (regnskabsklasse) to include: A, B, C, D
    - `financial_period_end_after` string, date, nullable: Only match companies whose latest annual report period ends on or after this date (freshness guard)
    - `late_filings` NumericRange: Inclusive min/max range. At least one bound must be set.
      - `min` number, nullable: Inclusive lower bound
      - `max` number, nullable: Inclusive upper bound
    - `auditor_changes` NumericRange: Inclusive min/max range. At least one bound must be set.
      - `min` number, nullable: Inclusive lower bound
      - `max` number, nullable: Inclusive upper bound
    - `has_overdue_filing` boolean, nullable: Active companies whose next expected annual report has passed its statutory deadline without being published
    - `has_going_concern` boolean, nullable: The latest report carries a going concern emphasis from the auditor
    - `has_qualified_opinion` boolean, nullable: The latest auditor opinion is not unqualified
    - `cds_score` NumericRange: Inclusive min/max range. At least one bound must be set.
      - `min` number, nullable: Inclusive lower bound
      - `max` number, nullable: Inclusive upper bound
    - `cds_ratings` string[]: CDS rating buckets to include: excellent, good, moderate, high_risk, critical
    - `has_phone` boolean, nullable: Company has a phone number
    - `has_email` boolean, nullable: Company has an email address
    - `has_website` boolean, nullable: Company has a website
    - `has_properties` boolean, nullable: Company owns properties
    - `property_area` NumericRange: Inclusive min/max range. At least one bound must be set.
      - `min` number, nullable: Inclusive lower bound
      - `max` number, nullable: Inclusive upper bound
    - `property_zones` string[]: Planzone of owned properties: byzone, landzone and/or sommerhusomraade. Matches companies owning at least one property in any selected zone.
    - `has_flood_risk_properties` boolean, nullable: Company owns at least one property with elevated flood risk (in a cloudburst depression or flooded at a storm surge of 3 m or less, per Klimadatastyrelsen's DHM models)
    - `has_poor_energy_label` boolean, nullable: Company owns at least one property whose current energy label is D, E, F or G (per Energistyrelsen's EMOData register)
    - `auditor_cvrs` string[]: Companies whose current registered auditor is one of these audit firms (CVR numbers)
    - `contact_role_categories` string[]: Companies with an enriched contact person in any of these role categories (management, sales, marketing, it, hr, finance, operations, procurement, customer_service). Sourced from the company's own website.
    - `has_livestock` boolean, nullable: Company has at least one active livestock herd in CHR. Companies with a CHR marketing protection are excluded.
    - `livestock_species_codes` integer[]: CHR species (dyreart) codes, e.g. 12=Kvæg, 15=Svin, 13=Får. Matches companies with at least one active herd of any selected species. Implies the CHR marketing protection exclusion.
    - `exclude_advertising_protected` boolean, nullable: Exclude companies with CVR advertising protection (reklamebeskyttelse). Required when results are used for direct marketing.
  - `group_by` 'industry' | 'industry_division' | 'municipality' | 'company_type' | 'reporting_class' | 'cds_rating', required: Grouping dimensions for POST /v1/screen/aggregate.
  - `metrics` FinancialMetric[]: Up to 3 key figures to sum and average per group. Companies without the figure are excluded from that figure's sum/avg (but still counted).

## Response `200`

Successful Response

- ScreenAggregateResponse
  - `data` AggregateBucket[], required
    - `key` string, nullable: Group key (code); null groups companies missing the dimension
    - `count` integer, required
    - `metrics` object: Per requested metric: {"sum": ..., "avg": ...}
  - `meta` ScreenAggregateMeta, required
    - `groups` integer, required
    - `truncated` boolean, required: True when more than 100 groups matched

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/companydata/apis/companydata-dk-api.md) · [All operations](https://skmtc.dev/companydata/apis/companydata-dk-api/llms.txt) · [OpenAPI document](https://skmtc.dev/companydata/apis/companydata-dk-api/revisions/1cc6c361ae64?raw)
