# Eurostat EU Statistics Search (`ryanclinton/eurostat-eu-statistics`) Actor

Pull structured macroeconomic and demographic data from [Eurostat](https://ec.europa.eu/eurostat), the official statistical office of the European Union.

- **URL**: https://apify.com/ryanclinton/eurostat-eu-statistics.md
- **Developed by:** [Ryan Clinton](https://apify.com/ryanclinton) (community)
- **Categories:** AI, Developer tools
- **Stats:** 6 total users, 0 monthly users, 91.2% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 data fetcheds

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Eurostat EU Statistics Search

Pull structured macroeconomic and demographic data from [Eurostat](https://ec.europa.eu/eurostat), the official statistical office of the European Union. This Apify actor queries the Eurostat REST API, decodes the JSON-stat 2.0 response format, and delivers clean, flat records covering GDP, unemployment, inflation, population, trade, and thousands of other indicators across all EU member states, EFTA countries, and candidate nations -- no API key required.

Five built-in dataset presets handle the most commonly requested statistics with optimized dimension filters so you get meaningful results out of the box. For advanced use, enter any of the thousands of Eurostat dataset codes via the custom dataset field and the actor will fetch, decode, and flatten the multi-dimensional response into analysis-ready records.

---

### Why use Eurostat EU Statistics?

Eurostat publishes the most authoritative economic and social statistics for Europe, but working with its API directly means wrestling with JSON-stat 2.0 -- a compact, positional multi-dimensional format that requires non-trivial index decomposition to decode. This actor handles all of that parsing for you and returns simple JSON records with country names, indicator labels, time periods, and numeric values ready for dashboards, spreadsheets, or downstream pipelines.

Running on Apify gives you scheduled monitoring without managing infrastructure. Set up a daily or weekly schedule to track GDP trends, unemployment shifts, or inflation movements across the EU. Every run stores results in a versioned dataset you can query via API, export to CSV, or push to Google Sheets automatically.

The Eurostat API is completely free and open -- no registration, no API key, no rate limits for reasonable usage. Combined with Apify's free tier ($5/month in credits), you can run hundreds of data pulls per month at zero cost. Each run takes under 15 seconds and uses minimal memory, making it one of the most cost-effective ways to programmatically access official EU statistics.

Whether you are building a European economic dashboard, conducting academic research on EU convergence, benchmarking national performance for a consulting report, or feeding macroeconomic context into an AI pipeline, this actor provides the cleanest path from Eurostat's database to your workflow.

---

### Key features

- **Five pre-configured dataset presets** -- GDP (`nama_10_gdp`), unemployment rate (`une_rt_a`), HICP inflation (`prc_hicp_aind`), population (`demo_pjan`), and EU trade (`ext_lt_maineu`), each with optimized dimension filters applied automatically
- **Custom dataset support** -- Query any of the thousands of Eurostat dataset codes by entering the code directly (e.g., `irt_st_a` for interest rates, `earn_mw_cur` for minimum wages, `tps00001` for total population)
- **Country filtering** -- Filter by one or more ISO 2-letter codes (comma-separated), including EU-specific codes like `EL` for Greece and aggregate codes like `EU27_2020`, `EA20`, `EU15`, and `EEA31_2020`
- **Time range control** -- Narrow results to a specific year range using `sinceTimePeriod` and `untilTimePeriod` parameters mapped from simple start/end year inputs
- **Automatic JSON-stat 2.0 decoding** -- Converts positional row-major indexed multi-dimensional data into flat records using index decomposition with precomputed multipliers
- **Human-readable labels** -- Maps 50+ country codes to full names (including EFTA, candidate countries, and global partners like JP, CN, US) and resolves indicator and unit codes to their descriptive labels
- **Configurable result limits** -- Return between 1 and 5,000 data points per run, with batch pushing in groups of 1,000 for efficient memory usage
- **Detailed run summaries** -- Logs country breakdowns, period ranges, value statistics (min/max), and dimension information for debugging custom dataset queries
- **Zero authentication** -- No API key, no registration, no external credentials needed

---

### How to use

#### Using the Apify Console

1. Go to the [Eurostat EU Statistics](https://apify.com/ryanclinton/eurostat-eu-statistics) actor page on Apify.
2. Click **Start** to open the input configuration.
3. Select a **Dataset** from the dropdown -- choose from GDP, Unemployment Rate, Inflation/HICP, Population, or EU Trade.
4. Optionally enter a **Custom Dataset Code** to override the dropdown with any valid Eurostat table code. Find codes at the [Eurostat Data Browser](https://ec.europa.eu/eurostat/databrowser).
5. Enter one or more **Country Codes** separated by commas (e.g., `DE, FR, IT, ES`). Leave blank to retrieve all available countries.
6. Set a **Start Year** and/or **End Year** to narrow the time range (e.g., `2018` to `2023`).
7. Adjust **Max Results** if needed (default 100, maximum 5,000).
8. Click **Start** and wait for the run to complete (typically 5--15 seconds).
9. View results in the **Dataset** tab. Export to JSON, CSV, Excel, or connect via the Apify API.

#### Using the API

```bash
curl "https://api.apify.com/v2/acts/ryanclinton~eurostat-eu-statistics/runs" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
    "dataset": "nama_10_gdp",
    "country": "DE, FR, IT, ES",
    "startYear": "2020",
    "endYear": "2023",
    "maxResults": 500
  }'
````

After the run completes, fetch results from the default dataset:

```bash
curl "https://api.apify.com/v2/acts/ryanclinton~eurostat-eu-statistics/runs/last/dataset/items?token=YOUR_API_TOKEN"
```

***

### Input parameters

| Name | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `dataset` | Select | No | `nama_10_gdp` | Pre-configured dataset: GDP (`nama_10_gdp`), Unemployment (`une_rt_a`), Inflation/HICP (`prc_hicp_aind`), Population (`demo_pjan`), or EU Trade (`ext_lt_maineu`) |
| `customDataset` | String | No | -- | Any valid Eurostat dataset code. Overrides the dropdown selection. Find codes at [ec.europa.eu/eurostat/databrowser](https://ec.europa.eu/eurostat/databrowser) |
| `country` | String | No | -- | Comma-separated ISO 2-letter country codes. Supports EU aggregates (`EU27_2020`, `EA20`, `EU15`, `EEA31_2020`). Use `EL` for Greece. Leave empty for all countries |
| `startYear` | String | No | -- | Start year for data range (e.g., `2015`). Maps to Eurostat's `sinceTimePeriod`. Leave empty for earliest available |
| `endYear` | String | No | -- | End year for data range (e.g., `2023`). Maps to Eurostat's `untilTimePeriod`. Leave empty for latest available |
| `maxResults` | Integer | No | `100` | Maximum data points to return (1--5,000). Results are pushed in batches of 1,000 |

**Example input (JSON):**

```json
{
    "dataset": "une_rt_a",
    "country": "EL, ES, IT, PT",
    "startYear": "2015",
    "endYear": "2023",
    "maxResults": 200
}
```

**Tips:**

- When using a custom dataset code, check the run log if you get empty results -- the actor prints all available dimension names and sample codes so you can troubleshoot filter requirements.
- For Greece, Eurostat uses `EL` rather than the ISO standard `GR`. Both are accepted by this actor, but `EL` is the Eurostat convention.
- Omit both `startYear` and `endYear` to get the full historical range available for a dataset. Be aware this may return many data points -- increase `maxResults` accordingly.

***

### Output

Each run produces a dataset of flat JSON records. Here is a realistic example for an unemployment rate query filtered to Southern European countries:

```json
[
    {
        "country": "EL",
        "countryName": "Greece",
        "indicator": "Y15-74",
        "indicatorName": "From 15 to 74 years",
        "period": "2023",
        "value": 11.1,
        "unit": "Percentage of active population",
        "dataset": "une_rt_a",
        "extractedAt": "2026-02-19T14:30:12.456Z"
    },
    {
        "country": "ES",
        "countryName": "Spain",
        "indicator": "Y15-74",
        "indicatorName": "From 15 to 74 years",
        "period": "2023",
        "value": 12.1,
        "unit": "Percentage of active population",
        "dataset": "une_rt_a",
        "extractedAt": "2026-02-19T14:30:12.456Z"
    },
    {
        "country": "IT",
        "countryName": "Italy",
        "indicator": "Y15-74",
        "indicatorName": "From 15 to 74 years",
        "period": "2022",
        "value": 8.1,
        "unit": "Percentage of active population",
        "dataset": "une_rt_a",
        "extractedAt": "2026-02-19T14:30:12.456Z"
    },
    {
        "country": "PT",
        "countryName": "Portugal",
        "indicator": "Y15-74",
        "indicatorName": "From 15 to 74 years",
        "period": "2022",
        "value": 6.0,
        "unit": "Percentage of active population",
        "dataset": "une_rt_a",
        "extractedAt": "2026-02-19T14:30:12.456Z"
    }
]
```

| Field | Type | Description |
|-------|------|-------------|
| `country` | String | ISO 2-letter country code as used by Eurostat (e.g., `DE`, `EL`, `EU27_2020`) |
| `countryName` | String | Full country or aggregate name (e.g., "Germany", "Euro area (20)") |
| `indicator` | String | Indicator dimension code from the dataset (e.g., `B1GQ` for GDP, `Y15-74` for age group) |
| `indicatorName` | String | Human-readable label for the indicator (e.g., "Gross domestic product at market prices") |
| `period` | String | Time period -- typically a year (`2023`) but some datasets use quarters (`2023Q2`) or months |
| `value` | Number | The statistical value. Units vary by dataset (millions of EUR, percentages, index values, population counts) |
| `unit` | String | Unit of measurement label (e.g., "Current prices, million euro", "Percentage of active population") |
| `dataset` | String | The Eurostat dataset code that was queried (e.g., `nama_10_gdp`, `une_rt_a`) |
| `extractedAt` | String | ISO 8601 timestamp of when the data was extracted from the API |

***

### Use cases

- **European economic dashboards** -- Pull GDP, unemployment, and inflation data on a schedule to power live dashboards tracking EU economic performance across member states
- **Academic research** -- Retrieve multi-year time series for econometric analysis, EU convergence studies, or comparative policy research without manual data downloads
- **Consulting benchmarks** -- Compare national economic indicators across EU countries for market entry analysis, investment reports, or competitive positioning studies
- **Inflation monitoring** -- Track HICP annual average index values across Euro area countries to monitor price stability and divergence from ECB targets
- **Trade analysis** -- Analyze EU import patterns with main trading partners using the `ext_lt_maineu` dataset to identify supply chain dependencies and trade flow shifts
- **Demographic planning** -- Access population data from `demo_pjan` to support workforce planning, market sizing, or social policy analysis across EU regions
- **AI and ML pipelines** -- Feed structured macroeconomic context into machine learning models, LLM-based research agents, or automated report generation systems
- **Journalism and data storytelling** -- Extract official EU statistics for fact-checking, data-driven articles, or interactive visualizations comparing economic outcomes across European nations
- **Regulatory compliance** -- Monitor economic thresholds relevant to EU regulatory frameworks such as Maastricht criteria (deficit, debt, inflation convergence)
- **Investment research** -- Track leading indicators across European markets to inform portfolio allocation, sector analysis, or country risk assessments

***

### API & integration

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run_input = {
    "dataset": "prc_hicp_aind",
    "country": "DE, FR, IT, ES, NL",
    "startYear": "2020",
    "endYear": "2023",
    "maxResults": 500,
}

run = client.actor("ryanclinton/eurostat-eu-statistics").call(run_input=run_input)

dataset_items = client.dataset(run["defaultDatasetId"]).list_items().items
for item in dataset_items:
    print(f"{item['countryName']} ({item['period']}): {item['value']} -- {item['unit']}")
```

#### JavaScript

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

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

const run = await client.actor('ryanclinton/eurostat-eu-statistics').call({
    dataset: 'demo_pjan',
    country: 'DE, PL, RO, BG',
    startYear: '2018',
    endYear: '2023',
    maxResults: 200,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.log(`${item.countryName} (${item.period}): ${item.value.toLocaleString()}`);
});
```

#### cURL

```bash
## Start the actor run
curl "https://api.apify.com/v2/acts/ryanclinton~eurostat-eu-statistics/runs" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
    "dataset": "ext_lt_maineu",
    "country": "EU27_2020",
    "startYear": "2019",
    "endYear": "2023",
    "maxResults": 100
  }'

## Fetch results (after run completes)
curl "https://api.apify.com/v2/acts/ryanclinton~eurostat-eu-statistics/runs/last/dataset/items?token=YOUR_API_TOKEN&format=json"
```

This actor integrates with all standard Apify platform connections including **Zapier**, **Make** (formerly Integromat), **Google Sheets**, **Slack**, and **GitHub Actions**. Use webhooks to trigger downstream workflows whenever a run completes, or chain it with other actors in an Apify pipeline.

***

### How it works

1. **Input parsing** -- The actor reads your configuration and determines which dataset to query. If a `customDataset` code is provided, it overrides the dropdown selection. Country codes are split on commas and normalized to uppercase.

2. **URL construction** -- A request URL is built against `https://ec.europa.eu/eurostat/api/dissemination/statistics/1.0/data/{datasetCode}`. For preset datasets, optimized dimension filters are appended automatically (e.g., `unit=CP_MEUR&na_item=B1GQ` for GDP). Country codes become repeated `geo=` parameters. Time ranges map to `sinceTimePeriod` and `untilTimePeriod`.

3. **API request** -- A single HTTP GET request is made to the Eurostat REST API. The response is in JSON-stat 2.0 format -- a compact representation where values are stored in a flat object keyed by positional index.

4. **JSON-stat 2.0 decoding** -- The actor decomposes each flat index into per-dimension coordinates using row-major order with precomputed multipliers. For each value, it identifies the geographic entity, time period, indicator, and unit by mapping coordinates back to category codes and labels.

5. **Record assembly** -- Decoded coordinates are combined with human-readable country names (from an internal map of 50+ codes), indicator labels, and unit descriptions into flat `StatisticOutput` records.

6. **Batch output** -- Records are pushed to the Apify dataset in batches of 1,000 for efficient memory usage, up to the configured `maxResults` limit.

7. **Summary logging** -- The actor logs a breakdown of results by country, the period range covered, and min/max value statistics to help you verify the output at a glance.

```
                    ┌─────────────────────┐
                    │   Input Parameters  │
                    │  dataset, country,  │
                    │  startYear, endYear │
                    └─────────┬───────────┘
                              │
                              v
                    ┌─────────────────────┐
                    │  Build Eurostat URL │
                    │  + preset filters   │
                    │  + geo= params      │
                    │  + time range       │
                    └─────────┬───────────┘
                              │
                              v
                    ┌─────────────────────┐
                    │  HTTP GET Request   │
                    │  Eurostat REST API  │
                    └─────────┬───────────┘
                              │
                              v
                    ┌─────────────────────┐
                    │ JSON-stat 2.0       │
                    │ Index Decomposition │
                    │ (row-major decode)  │
                    └─────────┬───────────┘
                              │
                              v
                    ┌─────────────────────┐
                    │  Flat Record Output │
                    │  country, indicator │
                    │  period, value, unit│
                    └─────────┬───────────┘
                              │
                              v
                    ┌─────────────────────┐
                    │  Apify Dataset      │
                    │  (batches of 1,000) │
                    └─────────────────────┘
```

***

### Performance & cost

| Metric | Details |
|--------|---------|
| **Run time** | 5--15 seconds typical. Larger result sets or complex custom datasets may take up to 30 seconds |
| **Memory** | 256 MB (minimum Apify allocation). The actor processes data in memory with batch output to stay within limits |
| **API calls** | Exactly 1 HTTP request to Eurostat per run. No pagination, no retries needed for standard queries |
| **Cost per run** | Approximately $0.001--$0.005 in Apify platform credits (well under one cent per run) |
| **Free tier capacity** | ~2,500 runs/month on the Apify Free plan ($5/month credits). Enough for daily monitoring of multiple indicators |
| **External API cost** | $0 -- the Eurostat API is completely free and requires no API key or registration |

***

### Limitations

- **Preset filters only for 5 datasets** -- The actor auto-applies optimized dimension filters for `nama_10_gdp`, `une_rt_a`, `prc_hicp_aind`, `demo_pjan`, and `ext_lt_maineu`. Custom dataset codes are fetched without preset filters, which may return empty or overly broad results if the dataset requires specific dimension values.
- **Maximum 5,000 results per run** -- The actor caps output at 5,000 data points. For larger extractions, run multiple queries with different country or time range filters.
- **No custom dimension filters** -- When using custom dataset codes, you cannot specify arbitrary dimension filters (e.g., filtering by sex, age group, or NACE activity) beyond what the presets provide. The actor fetches whatever the API returns for the given dataset code and country/time filters.
- **Annual and simple period data** -- The five preset datasets are annual. Some Eurostat datasets use quarterly, monthly, or other period formats. The actor handles these but the period field format will vary (e.g., `2023Q2`, `2023M06`).
- **Eurostat API availability** -- The actor depends on the Eurostat REST API being online. During Eurostat maintenance windows or heavy load periods, requests may fail or timeout.
- **Country code conventions** -- Eurostat uses `EL` for Greece rather than the ISO 3166 standard `GR`. The actor maps both, but some custom datasets may use non-standard codes that are not in the built-in country name map.
- **No time series aggregation** -- The actor returns raw data points. Calculations like year-over-year growth rates, moving averages, or cross-country comparisons must be done downstream.

***

### Responsible use

- **Cite Eurostat as the source** -- When publishing or redistributing data obtained through this actor, credit Eurostat as the original data provider in accordance with their [copyright policy](https://ec.europa.eu/eurostat/about-us/policies/copyright). Eurostat data is generally free to reuse with attribution.
- **Respect fair use of the API** -- Although the Eurostat API has no formal rate limits, avoid excessive automated querying (hundreds of concurrent requests) that could degrade the service for other users. The actor makes exactly one request per run.
- **Do not misrepresent statistical data** -- Present extracted values with their correct units, time periods, and contextual metadata. Stripping unit or indicator information from results before publication can lead to misleading conclusions.
- **Understand data revisions** -- Eurostat regularly revises published statistics. Data extracted today may differ from the same query run in the future due to methodological updates or late-arriving national submissions. Always note the extraction date when using the data.
- **Check dataset-specific footnotes** -- Some Eurostat data carries flags (estimated, provisional, confidential). The actor does not currently surface status flags from the JSON-stat response. For critical applications, cross-check against the [Eurostat Data Browser](https://ec.europa.eu/eurostat/databrowser) directly.

***

### FAQ

**Q: Do I need an API key to use this actor?**
**A:** No. The Eurostat REST API is completely free and open. No registration, authentication, or API key is required.

**Q: What countries are covered?**
**A:** All 27 EU member states, 4 EFTA countries (Iceland, Liechtenstein, Norway, Switzerland), 9 candidate/associated countries (Albania, Bosnia and Herzegovina, Georgia, Moldova, Montenegro, North Macedonia, Serbia, Turkey, Ukraine), and selected global partners (UK, US, Japan, China). EU aggregate codes like `EU27_2020` (EU-27), `EA20` (Euro area), `EU15` (original 15 members), and `EEA31_2020` (EEA-31) are also supported.

**Q: Can I query any Eurostat dataset, not just the five presets?**
**A:** Yes. Enter any valid dataset code in the `customDataset` field. You can find dataset codes at the [Eurostat Data Browser](https://ec.europa.eu/eurostat/databrowser) -- the code appears in the URL when you open a dataset (e.g., `irt_st_a` for short-term interest rates, `earn_mw_cur` for minimum wages).

**Q: Why am I getting empty results for a custom dataset?**
**A:** Many Eurostat datasets require specific dimension filter values to return data. The actor only auto-applies filters for the five preset datasets. Check the run log -- it prints all available dimension names and sample category codes so you can understand what filters the dataset expects. Try a different dataset or use one of the presets.

**Q: How often is Eurostat data updated?**
**A:** It varies by dataset. GDP (`nama_10_gdp`) is typically updated quarterly, unemployment (`une_rt_a`) monthly, population (`demo_pjan`) annually, and HICP inflation (`prc_hicp_aind`) monthly or annually depending on the table. Check the [Eurostat release calendar](https://ec.europa.eu/eurostat/news/release-calendar) for specific schedules.

**Q: What is JSON-stat 2.0 and why does it matter?**
**A:** JSON-stat 2.0 is the compact data format Eurostat's API returns. Instead of flat rows, it stores values in a positional array indexed across multiple dimensions (country, time, indicator, unit, etc.). The actor decodes this using row-major index decomposition -- converting positional indices back into human-readable dimension coordinates -- so you get flat records instead of raw positional data.

**Q: Can I use EU aggregate codes like EU27\_2020?**
**A:** Yes. Pass aggregate codes in the `country` field just like regular country codes. Common aggregates include `EU27_2020` (all 27 member states), `EA20` (20 Euro area countries), `EA19` (19 Euro area pre-Croatia), `EU15` (original 15 members), `EU28` (pre-Brexit 28), and `EEA31_2020` (European Economic Area).

**Q: How do I compare data across datasets (e.g., GDP vs. unemployment)?**
**A:** Run the actor separately for each dataset and join the results by `country` and `period` in your analysis tool. Each output record includes the `dataset` field so you can distinguish which query produced which values.

**Q: Why does Greece show as `EL` instead of `GR`?**
**A:** Eurostat uses `EL` for Greece (from the Greek name "Ellada") rather than the ISO 3166-1 standard `GR`. The actor accepts both codes in the input and maps both to "Greece" in the output, but the `country` field in results will reflect whatever code Eurostat returns (typically `EL`).

**Q: What is the maximum amount of data I can extract?**
**A:** Each run can return up to 5,000 data points. For larger extractions, split your query across multiple runs using different country groups or time ranges, then combine the datasets.

**Q: Can I schedule this actor to run automatically?**
**A:** Yes. Use Apify's built-in scheduler to run the actor daily, weekly, or on any cron schedule. Each run stores results in a new dataset that you can access via the API or push to integrations like Google Sheets or Slack.

***

### Related actors

| Actor | Description | Link |
|-------|-------------|------|
| OECD Economic Statistics | Search OECD statistics for economic indicators across 38 member countries. Pairs well with Eurostat for EU-vs-OECD comparisons | [OECD Economic Statistics](https://apify.com/ryanclinton/oecd-statistics-search) |
| World Bank Development Indicators | Access development indicators for 200+ countries. Compare EU metrics against global benchmarks | [World Bank Indicators](https://apify.com/ryanclinton/world-bank-indicators) |
| FRED Economic Data Search | Query the Federal Reserve Economic Database for US and international economic time series. Ideal for transatlantic analysis | [FRED Economic Data](https://apify.com/ryanclinton/fred-economic-data) |
| IMF Economic Data | Search IMF databases for global macroeconomic statistics including World Economic Outlook forecasts | [IMF Economic Data](https://apify.com/ryanclinton/imf-economic-data) |
| ECB Exchange Rates | Retrieve European Central Bank exchange rates for EUR against major currencies. Complements Eurostat trade data | [ECB Exchange Rates](https://apify.com/ryanclinton/ecb-exchange-rates) |
| BLS US Economic Data | Search the Bureau of Labor Statistics for US employment, prices, and productivity data for cross-Atlantic benchmarking | [BLS Economic Data](https://apify.com/ryanclinton/bls-economic-data) |

# Actor input Schema

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

Select a common Eurostat dataset to query

## `customDataset` (type: `string`):

Override the dropdown with any Eurostat dataset code (e.g. irt\_st\_a, earn\_mw\_cur). Find codes at ec.europa.eu/eurostat/databrowser

## `country` (type: `string`):

EU country code(s), comma-separated. E.g. DE, FR, IT, ES, PL, NL, EU27\_2020. Leave empty for all available.

## `startYear` (type: `string`):

Start year for data (e.g. 2015). Leave empty for earliest available.

## `endYear` (type: `string`):

End year for data (e.g. 2023). Leave empty for latest available.

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

Maximum number of data points to return

## Actor input object example

```json
{
  "dataset": "nama_10_gdp",
  "country": "DE",
  "startYear": "2020",
  "maxResults": 100
}
```

# Actor output Schema

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

No description

# 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 = {
    "dataset": "nama_10_gdp",
    "country": "DE",
    "startYear": "2020",
    "maxResults": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("ryanclinton/eurostat-eu-statistics").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 = {
    "dataset": "nama_10_gdp",
    "country": "DE",
    "startYear": "2020",
    "maxResults": 100,
}

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

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

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

```

## CLI example

```bash
echo '{
  "dataset": "nama_10_gdp",
  "country": "DE",
  "startYear": "2020",
  "maxResults": 100
}' |
apify call ryanclinton/eurostat-eu-statistics --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ryanclinton/eurostat-eu-statistics",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Eurostat EU Statistics Search",
        "description": "Pull structured macroeconomic and demographic data from [Eurostat](https://ec.europa.eu/eurostat), the official statistical office of the European Union.",
        "version": "1.0",
        "x-build-id": "fcsNwtxGPGYSQPyzp"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ryanclinton~eurostat-eu-statistics/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ryanclinton-eurostat-eu-statistics",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/ryanclinton~eurostat-eu-statistics/runs": {
            "post": {
                "operationId": "runs-sync-ryanclinton-eurostat-eu-statistics",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/ryanclinton~eurostat-eu-statistics/run-sync": {
            "post": {
                "operationId": "run-sync-ryanclinton-eurostat-eu-statistics",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "dataset": {
                        "title": "Dataset",
                        "enum": [
                            "nama_10_gdp",
                            "une_rt_a",
                            "prc_hicp_aind",
                            "demo_pjan",
                            "ext_lt_maineu"
                        ],
                        "type": "string",
                        "description": "Select a common Eurostat dataset to query",
                        "default": "nama_10_gdp"
                    },
                    "customDataset": {
                        "title": "Custom Dataset Code",
                        "type": "string",
                        "description": "Override the dropdown with any Eurostat dataset code (e.g. irt_st_a, earn_mw_cur). Find codes at ec.europa.eu/eurostat/databrowser"
                    },
                    "country": {
                        "title": "Country Code(s)",
                        "type": "string",
                        "description": "EU country code(s), comma-separated. E.g. DE, FR, IT, ES, PL, NL, EU27_2020. Leave empty for all available."
                    },
                    "startYear": {
                        "title": "Start Year",
                        "type": "string",
                        "description": "Start year for data (e.g. 2015). Leave empty for earliest available."
                    },
                    "endYear": {
                        "title": "End Year",
                        "type": "string",
                        "description": "End year for data (e.g. 2023). Leave empty for latest available."
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum number of data points to return",
                        "default": 100
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
