# EU Statistics API: Eurostat + ECB Series, Flat JSON (`shadow-tools/eu-statistics-eurostat-ecb`) Actor

Eurostat datasets and ECB exchange rates / SDMX series as flat rows, one per observation: dimension labels, period, value, status flags, unit, update date. Search the catalogue, filter by country and period. Official open APIs, unofficial tool, no personal data.

- **URL**: https://apify.com/shadow-tools/eu-statistics-eurostat-ecb.md
- **Developed by:** [Shadow Tools](https://apify.com/shadow-tools) (community)
- **Categories:** Automation, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 statistical observations

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## EU Statistics API: Eurostat + ECB Series, Flat JSON

**What it does.** Reads statistical series from two official open APIs, the **Eurostat** dissemination API and the **ECB Data Portal** (SDMX) API, and returns them as **flat rows** (one row per observation) that you can use directly as JSON, CSV or Excel: dataset, one column per dimension (code + label), period, value, status flag, unit, last update, source credit. Missing values are **never filled in or interpolated**; status flags (provisional, estimated, break in series...) are kept.

**When an AI agent or a script should call it:** you need a European statistic (unemployment, inflation, GDP, population...) or an ECB euro exchange rate as structured rows, with the official dataset code and update date, instead of a number remembered by a model.

> Unofficial, independent tool. Not affiliated with or endorsed by Eurostat, the European Commission or the European Central Bank. The icon uses a ring of stars only as a visual hint for "EU statistics".

### Three modes

| mode | use it to | minimal input |
|---|---|---|
| `searchDatasets` | find a dataset code by keyword (Eurostat catalogue + ECB dataflows) | `{"mode":"searchDatasets","query":"unemployment rate"}` |
| `getSeries` | read observations of a Eurostat dataset (filters by country, unit, any dimension, period) or of an ECB series | `{"dataset":"une_rt_m","geo":["FR"],"unit":["PC_ACT"],"filters":{"s_adj":"SA","age":"TOTAL","sex":"T"},"lastPeriods":12}` |
| `ecbRates` | ECB euro foreign exchange reference rates by currency and period | `{"mode":"ecbRates","currency":["USD","GBP"],"lastPeriods":5}` |

An **empty input** returns the default example: Eurostat monthly unemployment rate, France, last 12 months (11 rows: the latest month is not yet published, and the run note says so).

#### ECB series (any dataflow)

`{"mode":"getSeries","source":"ecb","dataset":"ICP","seriesKey":"M.U2.N.000000.4.ANR","lastPeriods":3}`. The key is the SDMX key of the dataflow (dimensions separated by dots, `+` for several values, empty = all). Note that the ECB itself discontinued the ICP flow after December 2025 (the sample shows its last values); pick a current flow with `searchDatasets` (`"source":"ecb"`).

### Input fields (see the form for details)

`mode`, `source` (eurostat / ecb / all), `query`, `dataset`, `geo`, `unit`, `filters` (any other dimension: `{"sex":"T"}`), `seriesKey`, `currency`, `startPeriod`, `endPeriod`, `lastPeriods`, `sortOrder` (newest-first by default, so a row limit keeps the latest values), `maxResults` (default 20, max 100000).
Validation errors read like `Field lastPeriods invalid: expected an integer between 1 and 1000, got 0, example 12.`

### Output (flat rows)

Real row (Eurostat, 8 Nov 2026):

```json
{
  "source": "eurostat", "dataset": "une_rt_m",
  "freq": "M", "freqLabel": "Monthly",
  "s_adj": "SA", "s_adjLabel": "Seasonally adjusted data, not calendar adjusted data",
  "age": "TOTAL", "ageLabel": "Total", "sex": "T", "sexLabel": "Total",
  "geo": "FR", "geoLabel": "France",
  "period": "2026-09", "value": 8.5, "flag": null, "flagLabel": null,
  "unit": "PC_ACT", "unitLabel": "Percentage of population in the labour force",
  "lastUpdate": "2026-11-05T23:00:00+0100",
  "attribution": "Source: Eurostat, dataset UNE_RT_M (https://doi.org/10.2908/UNE_RT_M), accessed 2026-11-08. Reuse authorised under Commission Decision 2011/833/EU. Data reformatted into flat rows (modified) by an independent service; ...",
  "extractedAt": "2026-11-08T12:32:09.088Z"
}
```

Real row (ECB exchange rate):

```json
{ "source": "ecb", "dataset": "EXR", "freq": "D", "currency": "GBP", "currencyLabel": "UK pound sterling",
  "currency_denom": "EUR", "exr_type": "SP00", "exr_suffix": "A", "period": "2026-11-06", "value": 0.83415,
  "flag": "A", "flagLabel": "Normal value", "unit": "GBP", "confidentiality": "F",
  "seriesKey": "D.GBP.EUR.SP00.A", "seriesTitle": "Pound sterling/Euro ECB reference exchange rate",
  "lastUpdate": "2026-11-08T13:25:38.267+01:00", "attribution": "Source: European Central Bank (ECB), ECB Data Portal, dataflow EXR, ..." }
```

Column rules: dimensions become columns named after their code (`geo`, `sex`, `currency`...), each with a `<code>Label` column; a dimension that clashes with a fixed column name is prefixed `dim_`. `flag`/`flagLabel` carry the source status (Eurostat `p` provisional, `b` break in series, `e` estimated, `u` low reliability, `d` definition differs...; ECB OBS_STATUS). A position with a flag but no value is delivered as `value: null` with its flag. Positions with neither are not delivered; the run **SUMMARY** reports how many (`missingCells`).
The run SUMMARY (key-value store) also has `totalMatching`, `capped`, a plain-language `note`, `datasetUpdatedAt`, and the disclaimer.

### Limits and honest caveats

- **ecbRates without a period** returns the latest observation of each currency; a few currencies are discontinued and come back with an old date (see `period` on each row; the run note counts them).
- **Row limit:** `maxResults` (default 20). When more rows match, the note says how many. Very large selections are refused with a message asking for filters (the Eurostat API answers asynchronously above its own size limit, and this Actor refuses responses above 12 MB): add `geo`, `unit`, other `filters` and `lastPeriods`.
- **Countries (licence):** Eurostat's copyright notice excludes data for countries other than EU Member States, EFTA Member States and official EU acceding/candidate countries from commercial reuse. This paid Actor therefore keeps only rows whose `geo`/`reporter` code is clearly one of those (or an EU/euro-area/EFTA aggregate, or a NUTS region of such a country) and drops the rest, **fail-closed**: unknown codes are dropped. That includes the United Kingdom, Japan, the United States, China... (the run note lists the dropped codes). Datasets attributed to other organisations than Eurostat, or not stating their source, are refused for the same reason. Eurostat's explicit trade-data exceptions are applied too: in datasets with a `reporter` dimension, rows declared by Switzerland or Liechtenstein are dropped, and Austrian-declared rows at the 8-digit product level (a `product` code of 8 digits) as well; partner countries are not filtered, because the notice allows reuse of third-country data declared by an EU Member State.
- **Latest period:** official statistics are published with a lag; the newest month may be empty for a country.
- **ECB data portal certificate:** the ECB endpoint works from Node.js (tested); some other environments (e.g. Python on Windows) fail to verify its certificate chain. The Actor never disables certificate verification; if the ECB host cannot be verified, ECB modes fail with a clear message and `searchDatasets` with `source: all` still returns the Eurostat part.
- Eurostat figures are revised; use `lastUpdate` and the flags. Exchange rates are for information only; using the ECB rates for transactions is strongly discouraged by the ECB.

### Licence and attribution (read from the official pages on 8 Nov 2026)

**Eurostat** (https://ec.europa.eu/eurostat/web/main/help/copyright-notice): "Reuse of statistical data, metadata, publications, and other dissemination tools published on this website for commercial or non-commercial purposes is authorised provided the source is acknowledged. The reuse policy of the European Commission is implemented by the Decision of 12 December 2011" (Commission Decision 2011/833/EU, https://eur-lex.europa.eu/eli/dec/2011/833/oj). Conditions applied here: source acknowledged on every row (dataset code, DOI link, access date); "When reuse involves ... modifications to the data ... this must be stated clearly to the end user" and "A disclaimer regarding the non-responsibility of Eurostat shall be included" (both in every row's `attribution` and in the SUMMARY disclaimer); the country and third-party-data exceptions above.
**ECB** (https://www.ecb.europa.eu/services/using-our-site/disclaimer/html/index.en.html, the "Disclaimer & Copyright" page that the ECB Data Portal footer links to): "users of this website may make free use of the information obtained directly from it subject to the following conditions: 1. When such information is distributed or reproduced, it must appear accurately and the ECB must be cited as the source. 2. Where the information is incorporated in documents that are sold (regardless of the medium), the natural or legal person publishing the information must inform buyers, both before they pay any subscription or fee and each time they access the information taken from this website, that the information may be obtained free of charge through this website. 3. If the information is modified by the user (e.g. by seasonal adjustment of statistical data or calculation of growth rates) this must be stated explicitly. 4. When linking to this website from business sites or for promotional purposes, this website must load into the browser's entire window". Applied here: the ECB is cited as source on every ECB row; every row and this page say the same information is free at https://data.ecb.europa.eu (condition 2); the data is only reformatted (no calculation); the rows say "modified" (condition 3); no framing. The ECB disclaimer also states that the ECB "accepts no responsibility or liability" for the reference rates and that they are published for information purposes only. The page speaks of "this website"; the Data Portal footer links to this same page and the API is the Portal's programmatic access, which is the basis of this reading (it is not an explicit API licence).

### Price

Pay per event: **`stat-observation`: 0.002 USD per delivered row** (one observation or one catalogue entry), plus Apify's default start event (0.00005 USD). The run cost cap is respected: the Actor delivers only what the cap lets it bill, then stops cleanly. Platform usage is small (about 0.0003 USD for a 20-row run).

### Privacy / GDPR by design

- The sources are **aggregate official statistics and exchange rates**; this Actor does not query any microdata and has no field for a person's name, address, e-mail or phone number.
- What the code really does: the output vocabulary is closed: fixed columns (source, dataset, period, value, flag, unit, update date, attribution...) plus the dimension codes and labels of the dataset (classification names such as "Total", "Males", "Germany"). **Free-text fields of the sources are not delivered** (the ECB observation comment `OBS_COM` is dropped on purpose). A unit test scans the output for contact-like patterns.
- A fail-closed filter keeps only rows of countries/aggregates clearly allowed by Eurostat's reuse conditions (see above): this is a licence filter, not a personal-data filter; unknown = dropped.
- Nothing about requesters is stored by the Actor: no input is written anywhere except the run's own dataset and key-value store in your Apify account, no cookies, no tracking, and the requests to Eurostat/ECB carry only a generic Actor User-Agent (`apify-actor/0.1 (open-data reuse; contact via Apify Store issues)`), not your identity.

### For AI agents

Call `searchDatasets` first with English keywords, read the `dataset` code of the best hit, then call `getSeries` with that code, `geo`, `lastPeriods` and, if the answer has several series, the dimension filters visible in the columns of a first small call (`lastPeriods: 1`). Always quote `period`, `unit` and `flag`; do not infer a value for a missing period.

### Support

Use the Issues tab of the Actor; replies within 14 days.

# Actor input Schema

## `mode` (type: `string`):

Pick one. "searchDatasets" = use first when you do not know the dataset code: keyword -> code, title, last update, period covered. "getSeries" = use to read observations of a Eurostat dataset (give dataset + filters + period) or of an ECB series (source ecb, dataset + seriesKey). "ecbRates" = use for euro foreign exchange reference rates (ECB), by currency and period. Allowed values: getSeries, searchDatasets, ecbRates. Default: getSeries.

## `source` (type: `string`):

Which provider, e.g. "eurostat". Allowed values: eurostat, ecb, all. In searchDatasets: all (default) searches both catalogues. In getSeries: eurostat (default) or ecb (then dataset + seriesKey are required). Ignored in ecbRates.

## `query` (type: `string`):

Keywords, e.g. "unemployment rate" or "HICP inflation" or a code prefix like "une\_". English; every word must appear in the dataset title or code. Used only in searchDatasets mode.

## `dataset` (type: `string`):

Eurostat dataset code, e.g. "une_rt_m" (monthly unemployment), "nama_10_gdp" (GDP), "prc_hicp_manr" (inflation); or, with source ecb, the ECB dataflow id, e.g. "ICP". Find codes with mode searchDatasets. Required in getSeries unless the whole input is empty.

## `geo` (type: `array`):

Eurostat geo codes as a list, e.g. \["FR", "DE"] or \["EU27_2020"] for the EU aggregate (Greece is "EL"). Shortcut for filters.geo. Only EU, EFTA, EU-candidate countries and aggregates are delivered (Eurostat reuse conditions). Empty = all countries of the dataset.

## `unit` (type: `array`):

Eurostat unit codes as a list, e.g. \["PC_ACT"] (percent of active population), \["CP_MEUR"] (current prices, million euro). Shortcut for filters.unit. Empty = all units of the dataset.

## `filters` (type: `object`):

JSON object mapping a dimension code to a value or a list of values, e.g. {"sex": "T", "age": "TOTAL", "s_adj": "SA"}. Any dimension of the dataset can be filtered (the output columns show the dimension codes). Several values in a list match any of them. Leave empty for no filter on other dimensions (more rows).

## `seriesKey` (type: `string`):

SDMX series key of the ECB dataflow: dimension values separated by dots, "+" for several values, empty part = all, e.g. "M.U2.N.000000.4.ANR" for the dataflow ICP. Required when source is ecb in getSeries; for exchange rates use mode ecbRates instead.

## `currency` (type: `array`):

3-letter ISO currency codes quoted against the euro, as a list, e.g. \["USD", "GBP", "JPY"]. Used only in ecbRates mode. Empty = every currency the ECB publishes (about 30). Rates are for information only, not for transactions.

## `startPeriod` (type: `string`):

First period to return, e.g. "2025", "2025-Q3", "2025-10" or "2025-10-31" (match the frequency of the data). Do not combine with lastPeriods.

## `endPeriod` (type: `string`):

Last period to return, same format as startPeriod, e.g. "2025-12". Empty = up to the latest published. Do not combine with lastPeriods.

## `lastPeriods` (type: `integer`):

Return only the latest N periods (months, quarters or years according to the data), an integer between 1 and 1000, e.g. 12. Counted per dataset (Eurostat) or per series (ECB); the very latest period can be empty when not yet published. In ecbRates the default is 1 (latest day). Do not combine with startPeriod/endPeriod.

## `sortOrder` (type: `string`):

Order of periods inside each series, e.g. "newest-first". Allowed values: newest-first (default; the latest values are kept when maxResults cuts the list), oldest-first.

## `maxResults` (type: `integer`):

Maximum number of rows returned (observations, or catalogue entries in searchDatasets), an integer between 1 and 100000, e.g. 20. Each row is one billed event. Large datasets are refused with a message asking for filters. Default: 20.

## Actor input object example

```json
{
  "mode": "getSeries",
  "query": "unemployment rate",
  "dataset": "une_rt_m",
  "geo": [
    "FR",
    "DE"
  ],
  "unit": [
    "PC_ACT"
  ],
  "filters": {
    "sex": "T",
    "age": "TOTAL",
    "s_adj": "SA"
  },
  "seriesKey": "M.U2.N.000000.4.ANR",
  "currency": [
    "USD",
    "GBP"
  ],
  "startPeriod": "2024-01",
  "endPeriod": "2025-12",
  "lastPeriods": 12,
  "sortOrder": "newest-first",
  "maxResults": 20
}
```

# Actor output Schema

## `observations` (type: `string`):

One row per observation: dimensions, period, value, status flag, unit, last update.

## `catalogue` (type: `string`):

Dataset codes, titles, last update and period covered (searchDatasets mode).

## `dataset` (type: `string`):

Every field of every row, downloadable as JSON, CSV or Excel.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("shadow-tools/eu-statistics-eurostat-ecb").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("shadow-tools/eu-statistics-eurostat-ecb").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call shadow-tools/eu-statistics-eurostat-ecb --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,shadow-tools/eu-statistics-eurostat-ecb"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Htj9HZkF6zfNScyw8/builds/Rv16gIxfpmnZM7yMi/openapi.json
