ECB Data Portal API
Free European Central Bank Data Portal API with no key: official exchange rates, interest rates, inflation and euro area economic statistics. Tested.
Endpoint tested and returned HTTP 200 on 20 Aug 2026
What is the ECB Data Portal API?
The ECB Data Portal API is the European Central Bank's free, key-free API providing official euro area statistics — reference exchange rates, policy interest rates, inflation, monetary aggregates and banking data.
This is the primary source. Most free forex APIs, including Frankfurter and VATComply, ultimately derive their euro rates from here, so going directly removes a layer of intermediation for anything that must be defensible.
It speaks SDMX, the international statistical data exchange standard, which is powerful but genuinely unfamiliar: series are addressed by dot-separated keys like `D.USD.EUR.SP00.A`, and the JSON structure separates observations from their dimension labels. Expect to spend time on the first integration.
Quick facts
- Base URL
https://data-api.ecb.europa.eu/service/data- Authentication
- No API key required.
- Rate limit
- No published hard limit; fair use expected.
- Pricing
- Free official ECB data.
- CORS
- Not enabled — call it from your server
- Official docs
- Read the docs
How to use the ECB Data Portal API
Every request below was executed against the live API on 20 Aug 2026, and the response shown is the real body it returned — not an illustration.
1. Fetch the official USD/EUR reference rate
GET https://data-api.ecb.europa.eu/service/data/EXR/D.USD.EUR.SP00.A?lastNObservations=1&format=jsondata
curl 'https://data-api.ecb.europa.eu/service/data/EXR/D.USD.EUR.SP00.A?lastNObservations=1&format=jsondata'const res = await fetch("https://data-api.ecb.europa.eu/service/data/EXR/D.USD.EUR.SP00.A?lastNObservations=1&format=jsondata");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://data-api.ecb.europa.eu/service/data/EXR/D.USD.EUR.SP00.A?lastNObservations=1&format=jsondata", timeout=20)
res.raise_for_status()
print(res.json()){
"header": {
"id": "cade5132-8827-4851-8936-f3b1d6df2190",
"test": false,
"prepared": "2026-08-19T23:57:59.737+02:00",
"sender": {
"id": "ECB"
}
},
"dataSets": [
{
"action": "Replace",
"validFrom": "2026-08-19T23:57:59.737+02:00",
"series": {
"0:0:0:0:0": {
"attributes": [
0,
null,
0,
null,
null,
null,
null,
null,
null,
0,
null,
null,
0,
null,
0,
null,
0,
0,
0,
0
],
"observations": {
"0": [
1.1605,
0,
0,
null,
null
]
}
}
}
}
],
"structure": {
"links": [
{
"title": "Exchange Rates",
"rel": "dataflow",
"href": "https://data-api.ecb.europa.eu:443/service/dataflow/ECB/EXR/1.0"
}
],
"name": "Exchange Rates",
"dimensions": {
"series": [
{
"id": "FREQ",
"name": "Frequency",
"values": [
{
"id": "D",
"name": "Daily"
}
]
},
{
"id": "CURRENCY",
"name": "Currency",
"values": [
{
"id": "USD",
"name": "US dollar"
}
]
},
{
"id": "CURRENCY_DENOM",Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
<dataflow>/<key> | path | Required | Dataset and series key, dot-separated. EXR/D.USD.EUR.SP00.A |
format | string | Optional | jsondata, csvdata or genericdata. jsondata |
lastNObservations | integer | Optional | Return only the most recent N points. 1 |
startPeriod / endPeriod | string | Optional | Date range. 2026-01-01 |
Response fields
headerobject- Response metadata including the preparation timestamp and sender.
dataSets[].seriesobject- Observations keyed by dimension position, not by name.
structure.dimensionsobject- The labels needed to interpret those positional keys.
structure.dimensions.observationarray- Time periods for each observation index.
What you can build with the ECB Data Portal API
- Use official ECB rates where provenance must be defensible
- Chart euro area inflation and interest rates
- Support regulatory or accounting reporting
- Analyse monetary policy data at source
Common errors and how to fix them
Observations keyed by numbers
SDMX separates values from their dimension labels.
Fix: Join dataSets[].series against structure.dimensions to map positional keys to real dates and currencies.
404 on the series key
Series keys are strict dot-separated dimension codes.
Fix: Browse the ECB Data Portal to find the exact key; D.USD.EUR.SP00.A is the daily USD reference rate.
Enormous responses
Full series span decades.
Fix: Use lastNObservations or an explicit date range.
ECB Data Portal API — frequently asked questions
Is the ECB API free?
Yes, completely free with no API key. It is the European Central Bank's official data service.
Why is the response structure so unusual?
It uses SDMX, the international statistical data exchange standard. Observations are keyed positionally and you join them against a separate dimensions structure to get dates and labels.
Should I use this or Frankfurter?
Frankfurter is far simpler and derives its rates from here. Use the ECB directly when provenance matters — regulatory reporting, audited accounts — and Frankfurter when you just need a clean conversion.
How do I find the right series key?
Browse the ECB Data Portal, which shows the dot-separated key for each series. D.USD.EUR.SP00.A is the daily US dollar reference rate.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
CSV to JSON Converter
Convert CSV to a JSON array of objects online. Header-row detection, comma/semicolon/tab delimiters and pretty-printed output — 100% in your browser.
Percentage Calculator
Calculate what X% of a number is, what percent one number is of another, and percentage increase or decrease between two values — instantly and free.
Alternatives to ECB Data Portal API
If ECB Data Portal does not fit, these finance & crypto apis cover similar ground. Every one was called before publishing, and each links to its own reference page with a working curl command and the response it returned.
| API | What it does | Auth | CORS | Last verified |
|---|---|---|---|---|
| CoinGecko | Free cryptocurrency price API covering 10,000+ coins. Live prices, market cap and volume in any currency, no API key on the public tier. Tested curl example. | No key | Yes | 19 Aug 2026 |
| Binance Public API | Binance public market data API needs no API key: live ticker prices, order books, klines and 24h stats for every trading pair. Tested curl example and response. | No key | Yes | 19 Aug 2026 |
| Coinbase Exchange Rates | Coinbase public exchange rates API with no key: convert any cryptocurrency to 100+ fiat currencies in a single request. Tested curl example and live JSON. | No key | Yes | 19 Aug 2026 |
| Frankfurter | Free currency exchange rate API with no key, built on European Central Bank data. Latest and historical rates, time series and conversion. Tested curl example. | No key | Yes | 19 Aug 2026 |
| Elering Nord Pool Prices | Free Elering API with no key: Nord Pool day-ahead electricity prices for Estonia, Finland, Latvia and Lithuania in EUR/MWh at 15-minute resolution. Tested example. | No key | No | 21 Aug 2026 |
| Energy-Charts | Free Fraunhofer ISE Energy-Charts API with no key: European day-ahead power prices, generation by source, installed capacity and cross-border flows as JSON. Tested example. | No key | No | 21 Aug 2026 |
ECB Data Portal is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 20 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.