---
title: "get_financial_stats"
method: POST
path: "/tools/get_financial_stats"
tags: ["Tools"]
---

# get_financial_stats

`POST /tools/get_financial_stats`

## Request

- Base URL: `https://compabase.com/api/mcp`
- URL: `https://compabase.com/api/mcp/tools/get_financial_stats`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Precomputed aggregate statistics for a sector, region, PKD branch, or country:
median, p25/p75/p90, winsorized mean, mean, total, n_companies, min/max.
Median and `winsor_mean` are the usual summary stats; raw mean is skewed by outliers. `cost_wages` is PLN-only.

**Example prompts:** “What is the median revenue in PKD section J?”
· “Compare average net profit in mazowieckie vs Poland overall.”

## Request body

- object
  - `dimension_type` 'country' | 'pkd_section' | 'pkd_division' | 'pkd_class' | 'pkd_full' | 'region' | 'county' | 'city': Granularity of the aggregate.
  - `dimension_key` string: Key for the dimension, e.g. `PL`, `J`, `62`, `mazowieckie`. Prefix match applied.
  - `metric` 'revenue_total' | 'profit_net' | 'total_assets' | 'cost_wages': Financial metric. Omit to return all metrics.
  - `currency` 'PLN' | 'EUR' | 'USD': Currency (default PLN). `cost_wages` is PLN-only.

## Response `200`

Aggregate stats

- object

---

[API](https://skmtc.dev/compabase/apis/compabase-mcp.md) · [All operations](https://skmtc.dev/compabase/apis/compabase-mcp/llms.txt) · [OpenAPI document](https://skmtc.dev/compabase/apis/compabase-mcp/revisions/43169ccbb0f7?raw)
