---
title: "Api Stats"
method: GET
path: "/api/stats"
---

# Api Stats

`GET /api/stats`

## Request

- Base URL: `https://cuisor.ro`
- URL: `https://cuisor.ro/api/stats`
- Auth: one of:
  - none
  - HTTP bearer
  - API key in header `X-API-Key`

One aggregate over a filtered population. **Returns numbers, never company rows.**

This is what makes an analytical question answerable at all: shipping the matching
companies instead would cost an agent tens of thousands of tokens and then ask it to do
arithmetic over thousands of rows. It is also what keeps §8.5's "never bulk" line
intact while still answering the question — the conclusion is given away, the dataset
is not.

Every response carries `matched_companies` beside `rows_with_metric`. An average
reported without both describes a population the caller did not ask about.

## Query parameters

- `metric` string
- `agg` string
- `group_by` string, nullable
- `year` integer, nullable
- `years` string, nullable: Inclusive range, e.g. 2019-2024
- `caen` string
- `caen_query` string, nullable
- `cui` string: One or more CUIs, comma separated
- `judet` string, nullable
- `status` string, nullable
- `registered_after` string, nullable
- `registered_before` string, nullable
- `min_turnover` number, nullable
- `max_turnover` number, nullable
- `min_employees` integer, nullable
- `max_employees` integer, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/cuisor/apis/cuisor-ro-api.md) · [All operations](https://skmtc.dev/cuisor/apis/cuisor-ro-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cuisor/apis/cuisor-ro-api/revisions/46b3e97da7dd?raw)
