# EU Eurostat Monitor: Datasets & New Figures (MCP) (`amygraphics/eu-eurostat-monitor`) Actor

Official Eurostat JSON-stat API for AI agents: find any of 6,000+ EU datasets by keyword, fetch filtered datapoints (GDP, inflation, energy, demography...), and monitor datasets for newly published figures. No key. MCP-ready.

- **URL**: https://apify.com/amygraphics/eu-eurostat-monitor.md
- **Developed by:** [Zakaria el bouami](https://apify.com/amygraphics) (community)
- **Categories:** Lead generation, Automation, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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 Eurostat Monitor: Datasets & New Figures (MCP)

The **entire Eurostat statistical database** — 6,000+ official EU datasets (GDP, inflation, unemployment, energy, migration, trade, demography…) — through one clean API-call format. **Find datasets by keyword, fetch filtered datapoints, and get alerted when new figures or revisions drop.** Official JSON-stat API, no key, no login. MCP-compatible and agent-ready.

### Why this is hard (and worth it)

- Eurostat's own API speaks **JSON-stat 2.0**: values stored as a flat dictionary keyed by position across a product of dimensions (freq × unit × indicator × geo × time). Nobody — human or LLM — writes that by hand. This actor decodes it into plain rows: `time, geo, unit, value`.
- Finding the right dataset is its own science: codes like `nama_10_gdp`, `prc_hicp_manr`, `gov_10dd_edpt1`. Search mode scans the full catalogue and gives you codes + titles + freshness.
- **Revisions matter**: Eurostat *rewrites history* (GDP gets revised for years back). Monitor mode catches both new observations and revised values — ask any economist how often that has embarrassed a newsletter.

### Three modes

#### `search` — find the dataset you need

```json
{ "mode": "search", "query": "harmonised inflation monthly", "maxResults": 10 }
```

→ dataset code, official title, last update, data range, value count.

#### `dataset` — datapoints, decoded

```json
{ "mode": "dataset", "datasetCode": "nama_10_gdp", "geo": "DE", "filters": "unit=CP_MEUR&na_item=B1GQ", "timeFrom": "2019", "maxResults": 10 }
```

→ one row per datapoint: `{geo: "DE", time: "2024", value: 4096190, unitLabel: "Current prices, million euro"}`, plus the exact API URL and a Data Browser link.

#### `monitor` — new figures & revision alerts

```json
{ "mode": "monitor", "watchDatasets": ["nama_10_gdp?unit=CP_MEUR&na_item=B1GQ&geo=DE", "prc_hicp_manr?unit=RCH_A&coicop=CP00&geo=FR"], "maxResults": 30 }
```

- **Run 1 = free baseline** across your specs (all geos snapshot at their latest figure).
- **Run 2+** emits only: `new-value` (a newer time period appeared) and **`value-changed` (a revision!)** with old → new in `info`.
- Schedule daily; when Eurostat is quiet, a run costs **$0.001** (just the start).

### How to find dimension values (unit/na_item/geo/…)

Open the dataset in the [Eurostat Data Browser](https://ec.europa.eu/eurostat/databrowser) (every result row links to it), pick your filters, and copy the dimension names into `filters` / watch specs. Popular ones are pre-filled in the examples.

### Recipes

1. **Agent tool (MCP)** — your AI agent answers "German GDP 2024?" or "latest French HICP inflation" with *real* numbers and the API URL. No hallucinated statistics, ever.
2. **Economist bot** — schedule monitor with your indicator list; get a dataset row the morning Eurostat publishes (or silently revises) a figure.
3. **Research data pull** — dataset mode with `timeFrom` + `geo` = clean CSV-ready datapoints for any Eurostat table.

### Data honesty & limits

- Rows come **only** from the official Eurostat statistics API at run time; nothing is synthesized. Missing values (denote `:`, `:` flags) are omitted — documented in the EU methodology.
- `valuesInDataset` shows the slice size *after* your filters so you know what you're sampling from.
- The catalogue snapshot (search mode) is fetched live each run (≈6,000 datasets, ~2 MB text).

### Pricing

| event | price |
|---|---|
| Actor start | $0.001 |
| Eurostat datapoint extracted (dataset row or monitor change) | $0.001 / row |

Search rows are datasets (metadata). Typical runs: keyword search ×10 ≈ **$0.011** · daily monitor, one new figure ≈ **$0.002**.

### MCP / AI-agent usage

```
https://api.apify.com/v2/acts/YOUR_HANDLE~eu-eurostat-monitor/run-sync-get-dataset-items?token=YOUR_TOKEN
```

Input = the JSON examples above. Output = rows as documented. Compatible with per-request agentic payments.

Questions / dataset requests: **Issues** tab on Apify Store.

# Actor input Schema

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

search = find datasets by keyword · dataset = pull datapoints from one dataset · monitor = alert on new/revised figures for your watch specs.

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

(search) Keywords matched against dataset titles + code, e.g. "government debt" or "hicp".

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

(dataset/monitor) Eurostat code from search mode, e.g. nama_10_gdp, prc_hicp_manr, une_rt_m.

## `geo` (type: `string`):

(dataset) Optional: e.g. DE, FR, EU27_2020. Leave empty for all geos (can be big — use maxResults).

## `filters` (type: `string`):

(dataset) Optional dimension filters as query-string: unit=CP_MEUR\&na_item=B1GQ (copy dimension names from the dataset's Data Browser page).

## `timeFrom` (type: `string`):

(dataset) Optional: only datapoints with time >= this (e.g. 2020 or 2024-01).

## `watchDatasets` (type: `array`):

(monitor) List of specs to watch: "code" or "code?unit=X\&geo=Y\&filter=Z". Each run checks the latest figure per geo and alerts on new or revised values. Example: \["nama_10_gdp?unit=CP_MEUR\&na_item=B1GQ\&geo=DE", "prc_hicp_manr?unit=RCH_A\&coicop=CP00\&geo=FR"].

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

Cap rows returned per run (each billed row $0.001).

## `requestDelaySecs` (type: `number`):

Politeness delay between Eurostat requests. Keep >= 0.3.

## Actor input object example

```json
{
  "mode": "search",
  "query": "",
  "datasetCode": "",
  "geo": "",
  "filters": "",
  "timeFrom": "",
  "watchDatasets": [],
  "maxResults": 50,
  "requestDelaySecs": 0.5
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("amygraphics/eu-eurostat-monitor").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("amygraphics/eu-eurostat-monitor").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 amygraphics/eu-eurostat-monitor --silent --output-dataset

```

## MCP server setup

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

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/adJ8i8Ik19WUPXKCc/builds/8vrh9BpsdAQOz9BfJ/openapi.json
