Financial Literature

Eurostat

Eurostat API — GDP, unemployment and prices for every EU member state, one dataset code each

When the question is cross-country inside the EU — which economies are growing, where unemployment is falling, national HICP components — or you want the flash estimates the moment Eurostat publishes them.

macropriceslabourEuropean Unioneuro area
Asset classesmacro · prices · labour
Frequencymonthly → annual
History1995 → today
Limit · costNo key · fair use
KeyNo key
Formats · pull withjson · csv · sdmx · tsv — python, excel
LicenceEurostat data are free to reuse with attribution (© European Union, Eurostat).
RedistributeWith attribution; check series notes
Best for“Compare inflation or unemployment across EU countries” · “Euro-area flash GDP and HICP on release day”
When to use it

Reach for it when…

When the question is cross-country inside the EU — which economies are growing, where unemployment is falling, national HICP components — or you want the flash estimates the moment Eurostat publishes them.

Not for: Monetary data (ECB), daily anything (Eurostat is monthly at best), non-EU countries (OECD, IMF, World Bank).

How to read it

Units, revisions, traps

Units. Depends on the dataset: HICP as annual rate (prc_hicp_manr) or index (prc_hicp_midx); GDP as chain-linked volumes or growth rates; unemployment as a percent of the labour force.

Revisions. Flash estimates are revised at the second and third releases; national accounts are revised for years.

  • The JSON-stat format needs unpacking; the SDMX-CSV endpoint is easier in pandas.
  • Filters are dimension=value pairs in the query string; the order of dimensions in the SDMX key follows the dataset's structure, not the alphabet.
  • geo=EA means the euro area at current composition; EA19/EA20 fix the membership.

Classic mistake: Averaging national inflation rates instead of using the euro-area aggregate, which is weighted.

How to use it in your own work

Three recipes

Each recipe: Python · Excel · Sheets, with how to read the result. Python recipes run under pandas; recipe 1 is re-run by the weekly check where the source allows it.

How to use it in your own work

Copy the snippet, change the series id, read the result the way the footer says. Replace YOUR_…_KEY with your own key where one is needed.

Recipe 1Euro-area HICP, annual rate, as CSV

# SDMX 2.1 endpoint with a CSV format: HICP all-items annual rate, euro area
import pandas as pd
u = ("https://ec.europa.eu/eurostat/api/dissemination/sdmx/2.1/data/prc_hicp_manr/M.RCH_A.CP00.EA"
     "?format=SDMX-CSV&startPeriod=2020-01")
df = pd.read_csv(u)
s = df.set_index(pd.PeriodIndex(df.TIME_PERIOD, freq="M").to_timestamp())["OBS_VALUE"]
print(s.tail(6))
How to read the resultCompare with the ECB's own ICP series — same number, different portal; use whichever you already pull from.

Recipe 2Unemployment across member states

# monthly unemployment rate, seasonally adjusted, total, all countries
import pandas as pd
u = ("https://ec.europa.eu/eurostat/api/dissemination/sdmx/2.1/data/une_rt_m/M.SA.TOTAL.PC_ACT.T."
     "?format=SDMX-CSV&lastTimePeriod=1")
df = pd.read_csv(u)
print(df[["geo", "TIME_PERIOD", "OBS_VALUE"]].sort_values("OBS_VALUE"))
How to read the resultThe spread between the lowest and highest rates is the euro area's structural story; a country's change over 12 months is the cyclical one.

Recipe 3Real GDP growth, quarter on quarter, by country

import pandas as pd
u = ("https://ec.europa.eu/eurostat/api/dissemination/sdmx/2.1/data/namq_10_gdp/Q.CLV_PCH_PRE.SCA.B1GQ."
     "?format=SDMX-CSV&lastTimePeriod=2")
df = pd.read_csv(u)
print(df.pivot(index="geo", columns="TIME_PERIOD", values="OBS_VALUE").dropna())
How to read the resultQuarter-on-quarter, not annualised — multiply by roughly four to compare with the US SAAR convention.

Series → question map

The ids we use from Eurostat API, each with the question it answers. The catalog's compare view reads the concept tags behind these rows.

SeriesAnswersRegionConcept
prc_hicp_manr · CP00 · EAWhat is euro-area inflation?euro areacpi
une_rt_m · TOTALWhere is unemployment falling in the EU?European Unionunemployment
namq_10_gdp · B1GQWhich EU economies are growing?European Uniongdp
ei_bsco_mConsumer confidence, monthlyEuropean Unionsentiment

Compare with

Same question, different source: ECB Data Portal, BLS API, OECD Data Explorer. The compare view lines up coverage, frequency, history and access side by side and lists what the combination makes possible.

Open compare: Eurostat API · ECB Data Portal · BLS API →

Questions readers ask

Do I need a key for Eurostat?

No. The API is open; be gentle with bulk pulls.

JSON or CSV?

The default JSON is JSON-stat, which needs a helper to flatten. The SDMX 2.1 endpoint with format=SDMX-CSV reads straight into pandas.

Where do dataset codes come from?

The database tree at ec.europa.eu/eurostat/web/main/data/database; the code is in brackets after each dataset name (e.g. prc_hicp_manr).

From the paper

Educational only — we explain, we never advise · snippet licence: public domain · corrections to [email protected], fixed within a day and logged in the changelog.