# Eurostat on Onekey > 2 endpoints for Eurostat (2 stable, 0 beta), 1 credit each. Category: Government & public data. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Page: https://onekey.dev/platforms/eurostat Reference (Markdown): https://onekey.dev/docs/api/eurostat.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 2 mapped Eurostat endpoints return each: - `entity.name` (string): 2 - plus 13 platform-specific fields under `ext.` ## Endpoints ### eurostat.consumer_spend Household consumption spending by purpose (COICOP category) for up to 10 European countries plus the EU27 aggregate, annual, as a JSON-stat cube. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/eurostat/consumer_spend?geo=DE%2BFR%2BEU27_2020&coicop=CP01&start=2020` with header `x-api-key: YOUR_API_KEY` - Parameters: - `geo` (string, optional, default EU27_2020): Reporting country codes joined by + (URL-encode it as %2B), up to 11: two-letter Eurostat codes (DE, FR, EL for Greece...) and/or EU27_2020 / EA20, e.g. DE%2BFR%2BEU27_2020 - `coicop` (string, optional, default TOTAL): COICOP 1999 purpose code, e.g. TOTAL, CP01 (food and non-alcoholic beverages), CP07 (transport), CP11 (restaurants and hotels), CP111 (catering) - `unit` (string, optional, default CP_MEUR): Unit of measure: CP_MEUR (current prices, million euro), CP_MNAC (million national currency), CP_EUR_HAB / CP_NAC_HAB (per capita), PC_TOT (share of total), PC_GDP (share of GDP), CLV20_MEUR / CLV15_MEUR (chain-linked volumes), CLV_PCH_PRE (volume change on previous year), PD20_EUR (price index 2020=100) - `start` (string, optional, default 2015): First year (YYYY) - `end` (string, optional, default 2100): Last year (YYYY); the default 2100 means the latest year published - Fields returned: `entity.name`, `ext.updated`, `ext.dimensions`, `ext.size`, `ext.values`, `ext.flags`, `ext.geo`, `ext.time`, `ext.coicop`, `ext.unit` - Reference: https://onekey.dev/docs/api/eurostat/consumer_spend.md ### eurostat.tourism_spend Tourism trip spending by residents of up to 10 European countries plus the EU27 aggregate, by trip purpose, duration and destination, annual, as a JSON-stat cube. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/eurostat/tourism_spend?geo=DE%2BFR%2BEU27_2020&purpose=PER_HOL&start=2020` with header `x-api-key: YOUR_API_KEY` - Parameters: - `geo` (string, optional, default EU27_2020): Reporting country codes joined by + (URL-encode it as %2B), up to 11: two-letter Eurostat codes (DE, FR, EL for Greece...) and/or EU27_2020, e.g. DE%2BFR%2BEU27_2020 - `purpose` (string, optional, default TOTAL): Trip purpose: TOTAL, PER (personal), PER_HOL (holidays and leisure), PER_VFR (visiting friends and relatives), PER_OTH (other personal), PROF (professional, business) - `destination` (string, optional, default WORLD): Main destination: WORLD (all), DOM (domestic), FOR (abroad), EU27_2020_FOR (other EU27 countries), NEU27_2020_FOR (outside the EU27) - `duration` (string, optional, default N_GE1): Trip length: N_GE1 (1 night or more), N1-3 (1 to 3 nights), N_GE4 (4 nights or more) - `measure` (string, optional, default TOTAL): Measure (euro): TOTAL (total spending), AVG_TRP (average per trip), AVG_NGT (average per night) - `start` (string, optional, default 2015): First year (YYYY) - `end` (string, optional, default 2100): Last year (YYYY); the default 2100 means the latest year published - Fields returned: `entity.name`, `ext.updated`, `ext.dimensions`, `ext.size`, `ext.values`, `ext.flags`, `ext.geo`, `ext.time`, `ext.purpose`, `ext.destination`, `ext.duration`, `ext.measure` - Reference: https://onekey.dev/docs/api/eurostat/tourism_spend.md ## Sample request ```bash curl "https://api.onekey.dev/v1/eurostat/consumer_spend?geo=DE%2BFR%2BEU27_2020&coicop=CP01&start=2020" \ -H "x-api-key: YOUR_API_KEY" ```