syrto_aggregate_companies returns statistical summaries (count, average, median, min, max) for companies matching your filters. Use it to understand market segments - e.g. “average revenue of medium manufacturing companies in Veneto” or “how many large companies are in sector C”.
Use this tool to
- Count companies matching a set of criteria
- Get average, median, or range statistics for a metric across a segment
- Benchmark a company against its market segment
- Break one population down by sector, area or size band in a single call
- Get portfolio statistics over an explicit list of companies
Arguments
integer
required
Fiscal year to aggregate.
string[]
required
1-10 metric slugs to compute statistics for. Use
syrto_search_metric_definitions or syrto_list_available_metrics to find valid slugs.Example: ["revenues_from_sales_and_services", "ebitda"]object
A single structured filter object narrowing which companies are aggregated. It takes exactly the same sections as
syrto_search_companies: company_ids, anagraphic, state_aids, people, financial, and radar. Omit it to aggregate over every company for the year.All set filters combine with AND, both within a section and across sections. See Search companies for each section’s fields, or fetch the catalog at runtime with syrto_get_search_filter_docs.The location filters nuts, lau and country_code count companies by their registered headquarters. To count them by where they have a registered branch instead, use anagraphic.has_branch_in.An invalid filters object returns an error naming the bad field.string[]
Break the aggregate down by these keys instead of returning one figure for the whole filter set - one aggregate per group, in one call. Give 1 to 3 keys, each named once; two keys is a cross-tab, so
["nace_section", "nuts1"] is sector by macro-region.filters and group_by compose: filter to the population you care about, then group it along the axis you want it split by. At most 200 groups come back, largest first, with the true total in the response - fewer than that when 200 groups would not fit one response. A combination with too many distinct groups is refused; coarsen a key or narrow the population.string[]
Additional statistics on top of the count / average / median / min / max every response carries. Omit for the compact default.
sum comes back null for a percentage, a rate, a day count, an adimensional ratio or a radar score, with the metrics named in warning. Asking for anything here also adds each metric’s uom (unit of measure). It costs response size, which under group_by means fewer groups fit - ask for what you will read.string
"en" for English (default) or "it" for Italian.Returns
object[]
One entry per requested year, each containing:
integer
Total number of companies matching the filters.This is not the
count inside employee_stats or metric_stats: those say how many of these companies have a value for that particular field, so a metric only half the population reports has a much smaller one. Divide by whichever is the right denominator for the question.object
Employee count statistics across matching companies:
count- number of companies with employee dataaverage,median,minimum,maximum- statistical summaries
object[]
One entry per requested metric slug, each with:
name- human-readable metric name (use this for display, notslug)slug- internal identifierstats.count- number of companies with data for this metricstats.average,stats.median,stats.minimum,stats.maximum- statistical summariesuom- unit of measure,nullwhen the metric is adimensional (a ratio, index or radar score). Present only whenextra_statswas used
extra_stats, each stats block also carries the subset you asked for: p10 / p90, std_dev, and sum. A statistic you did not ask for is absent; sum present but null means it was asked for and withheld as meaningless for that metric.object
Radar score statistics across matching companies:
efficiency_avg,efficiency_median- Efficiency score summaries (0–100)size_avg,size_median- Size score summaries (0–100)
integer
Only with a
company_ids filter, and beside the years list rather than inside each year entry: the number of IDs supplied, to compare against each year’s company_count.It detects row loss only. A shortfall means some IDs matched no row for the year, or failed the other supplied criteria - the API cannot say which.With group_by
The same per-year statistics arrive once per group instead of once for the whole population, and the response carries these in place of years:
string[]
The keys the breakdown used, echoed back.
integer
How many groups the population has. Compare it with the length of
groups, which is capped at the largest 200 and by response size below that - so a rich extra_stats selection can itself be why fewer groups came back. warning says so, and names the cheapest lever.object[]
Each with
key - one entry per requested key, its value null when the companies in that group have no value for it, such as no NACE code - and its own years list.company_ids_requested is carried on this shape too, beside groups. The groups’ company_count values summing to less than it is the breakdown’s row-loss signal.Precision
count, sum, average, minimum and maximum are exact at any population size.
Above roughly 8,000 contributing values, p10, p90 and median are sample estimates that move a few percent between identical calls - quote them rounded. warning says when this applies.
Beside result, the response carries the fields every tool returns. On this tool display_title is always Syrto AI and subtitle is not set.