About Eurostat APIs
Eurostat provides a powerful REST API for accessing a wide range of European statistics in machine-readable formats. The API allows you to query datasets by specifying dataset codes and filters directly in the URL. Data is returned in JSON or other formats for easy integration and visualization.
- API Base URL:
https://ec.europa.eu/eurostat/api/dissemination/statistics/1.0/data/
- Documentation: Eurostat API Documentation
Dataset Example: tour_occ_ninat
The tour_occ_ninat
dataset provides statistics on nights spent at tourist accommodations by country and other dimensions. You can filter the data using URL parameters:
- geo: Country code (e.g.,
DE
for Germany,FR
for France) - unit: Unit of measurement (e.g.,
NR
for number of nights) - c_resid: Country of residence (e.g.,
TOTAL
for all residents) - nace_r2: Type of accommodation (e.g.,
I551
for hotels)
Example URL:
https://ec.europa.eu/eurostat/api/dissemination/statistics/1.0/data/tour_occ_ninat?format=JSON&geo=DE&geo=EL&geo=FR&geo=IT&unit=NR&c_resid=TOTAL&nace_r2=I551&lang=en
Enter a Eurostat API URL below to fetch and display interactive charts based on the latest European statistics.
Eurostat API URL
After entering a valid Eurostat API URL above, the chart will update to visualize the data you requested. You can explore different datasets by changing the URL.
How to Use Filters in Eurostat URLs
To customize your data request, add filter parameters to the API URL. You can specify multiple values for a filter by repeating the parameter (e.g., &geo=DE&geo=FR
for Germany and France). Common filters include:
- time: Year or period (e.g.,
time=2023
) - sex: Gender (e.g.,
sex=M
for male,sex=F
for female) - age: Age group (e.g.,
age=Y15-24
)
Combine filters to refine your query and get exactly the data you need for your analysis or visualization.