BYTETOOLS

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.

No API key requiredHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-20

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 2026-08-20, 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
curl 'https://data-api.ecb.europa.eu/service/data/EXR/D.USD.EUR.SP00.A?lastNObservations=1&format=jsondata'
JavaScript (fetch)
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);
Python (requests)
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())
Response — HTTP 200 (truncated)
{
  "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

ParameterTypeRequiredDescription
<dataflow>/<key>pathRequiredDataset and series key, dot-separated. EXR/D.USD.EUR.SP00.A
formatstringOptionaljsondata, csvdata or genericdata. jsondata
lastNObservationsintegerOptionalReturn only the most recent N points. 1
startPeriod / endPeriodstringOptionalDate 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

ECB Data Portal is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-20; always check the official documentation before relying on this API in production, as terms and limits can change.