# Eurostat Data Normalizer (`wakey7dev/eurostat-normalizer`) Actor

Fetch, normalize, and export official EU statistical data from Eurostat. Converts raw SDMX-JSON into clean, labeled records. 6,000+ datasets: population, GDP, trade, employment, health. No API keys needed.

- **URL**: https://apify.com/wakey7dev/eurostat-normalizer.md
- **Developed by:** [Chris Wakefield](https://apify.com/wakey7dev) (community)
- **Categories:** Business, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

![Chris The Dev](https://raw.githubusercontent.com/chriswakefield87/appstore-screenshot-translator/main/assets/actor-banner.png)

## Eurostat Data Normalizer

Fetch, normalize, and export official EU statistical data from **Eurostat** — the European Union's statistical office. Converts raw SDMX-JSON into clean, labeled records ready for analysis in Excel, Python, or BI tools.

🔹 **6,000+ datasets** — population, GDP, trade, employment, health, education, environment
🔹 **Zero API keys** — free and open data, no registration required
🔹 **Smart normalization** — country codes → full names, codes → human-readable labels
🔹 **Flexible filtering** — filter by country, year range, or download everything

### Input Parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| `datasetCode` | string | ✅ Yes | Eurostat dataset code (e.g. `tps00001` for population, `sdg_08_10` for GDP per capita). Browse datasets at [Eurostat Data Browser](https://ec.europa.eu/eurostat/databrowser/). |
| `countryFilter` | string | No | Comma-separated ISO country codes (e.g. `DE,FR,IT,ES`). Leave empty for all countries. |
| `yearStart` | string | No | Filter from this year onwards (e.g. `2020`). |
| `yearEnd` | string | No | Filter up to this year (e.g. `2024`). |
| `maxResults` | integer | No | Max records to return (1–50000, default: 5000). |
| `includeMetadata` | boolean | No | Include dataset title and source in output (default: true). |

### Popular Dataset Codes

| Code | Description |
|---|---|
| `tps00001` | Population on 1 January |
| `sdg_08_10` | Real GDP per capita |
| `tps00180` | Employment rate (age 20–64) |
| `tec00115` | Unemployment rate |
| `sdg_03_20` | Life expectancy at birth |
| `nrg_ind_ren` | Renewable energy share |
| `sdg_10_41` | Income inequality (Gini coefficient) |
| `tps00223` | Government debt-to-GDP ratio |

### Example Input

```json
{
  "datasetCode": "sdg_08_10",
  "countryFilter": "DE,FR,IT,ES,NL",
  "yearStart": "2015",
  "yearEnd": "2024",
  "maxResults": 1000
}
```

### Example Output (Dataset Item)

```json
{
  "freq_id": "A",
  "freq_label": "Annual",
  "unit_id": "CLV10_EUR_HAB",
  "unit_label": "Chain linked volumes (2010), euro per capita",
  "na_item_id": "B1GQ",
  "na_item_label": "Gross domestic product at market prices",
  "geo_id": "DE",
  "geo_label": "Germany",
  "time_id": "2024",
  "time_label": "2024",
  "value": 37460
}
```

### Use Cases

- **Business Intelligence** — Import EU economic indicators into dashboards
- **Market Research** — Compare GDP, employment, and trade across EU countries
- **Academic Research** — Pull population, health, and education statistics
- **Journalism** — Source official Eurostat data for news stories
- **AI/ML Training** — Build datasets from 6,000+ official EU indicators

### Output

The actor produces three output channels:

1. **Default Dataset** — All normalized records as JSON
2. **OUTPUT** (Key-Value Store) — Human-readable ASCII table
3. **STATS** (Key-Value Store) — Machine-readable run statistics

### Data Source

All data is sourced from the official [Eurostat REST API](https://ec.europa.eu/eurostat/web/main/data/database), published under the European Commission's reuse policy. Eurostat provides free, authoritative statistical data for the EU and its member states.

# Actor input Schema

## `datasetCode` (type: `string`):

The Eurostat dataset code (e.g. tps00001 for population, sdg\_08\_10 for GDP per capita, tps00180 for employment rate). Browse datasets at https://ec.europa.eu/eurostat/databrowser/

## `countryFilter` (type: `string`):

Optional: Filter by 2-letter ISO country codes, comma-separated (e.g. DE,FR,IT,ES). Leave empty for all countries.

## `yearStart` (type: `string`):

Optional: Filter data from this year onwards (e.g. 2020). Leave empty for all years.

## `yearEnd` (type: `string`):

Optional: Filter data up to this year (e.g. 2024). Leave empty for all years.

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

Maximum number of normalized records to return (1-50000). Useful for large datasets.

## `includeMetadata` (type: `boolean`):

Include dataset metadata (title, source, last updated) in output.

## Actor input object example

```json
{
  "datasetCode": "tps00001",
  "maxResults": 5000,
  "includeMetadata": true
}
```

# Actor output Schema

## `results` (type: `string`):

All normalized records as JSON array. Each record has labeled dimensions and values.

## `summary` (type: `string`):

Human-readable ASCII table with the first 50 records and run statistics.

## `stats` (type: `string`):

Machine-readable statistics: record count, dataset info, filter summary.

# 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 = {
    "datasetCode": "tps00001"
};

// Run the Actor and wait for it to finish
const run = await client.actor("wakey7dev/eurostat-normalizer").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 = { "datasetCode": "tps00001" }

# Run the Actor and wait for it to finish
run = client.actor("wakey7dev/eurostat-normalizer").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 '{
  "datasetCode": "tps00001"
}' |
apify call wakey7dev/eurostat-normalizer --silent --output-dataset

```

## MCP server setup

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

```

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/sA60gU91rXVgXsqPz/builds/UbckuGstKphxs3lFe/openapi.json
