Is the ECB Exchange Rate API Free? (Yes — Here's the Catch)
Short answer: yes, completely free. The European Central Bank publishes its euro foreign exchange reference rates at no charge, with no API key, no registration, and a licence that permits reuse with attribution. If you came here worried there's a paywall — there isn't, and there never has been.
The honest longer answer is that "free" describes the data, not the integration. The ECB is a central bank, not an API company, and what it publishes is built for statisticians and the press, not for your backend. Here is exactly what you get, and where the real cost hides.
What the ECB publishes, precisely
- ~30 currencies against the euro, one reference rate per currency per TARGET working day.
- Published around 16:00 CET, based on a daily concertation between European central banks around 14:10 CET. The ECB itself stresses these are reference rates, published for information — not rates you can trade at.
- Three delivery channels: a daily XML file (
eurofxref-daily.xml), CSV files (current day, last 90 days, or full history), and the SDMX data API for statistical queries. - History back to January 1999 — the entire life of the euro.
Where the engineering cost hides
1. The formats are not application JSON
The daily file is XML with a namespace scheme that trips up naive parsers. The SDMX API can emit SDMX-JSON, but that is a statistical interchange format — series keys like D.USD.EUR.SP00.A, dimension lookups, observation arrays — not the flat {"USD": 1.0842} your application wants. Either way, you write and own a parser.
2. TARGET closing days are your problem
No rate is published on weekends or on TARGET closing days (Good Friday, Easter Monday, 1 May, Christmas, 26 December, New Year). Ask your own pipeline for "the rate on 1 May" and you have a decision to make — and an edge case to test — that the XML file will not make for you.
3. Everything is quoted against the euro
Need GBP/JPY at the ECB reference rate? You compute it as a cross via EUR, and your audit trail should say so. The file gives you the inputs, not the answer.
4. The list itself moves
Currencies get suspended (the rouble in March 2022) or added. Hard-code the list and it will eventually be wrong.
The same data, as an actual API
None of the above is a criticism of the ECB — publishing impeccable data for 26 years, free, is the mandate working as intended. It just means "free" buys you a file, and the API layer is yours to build. If you'd rather not, AllRatesToday ingests each ECB publication shortly after 16:00 CET and serves it as plain JSON, in the same shape as 34 other central banks:
curl "https://allratestoday.com/api/v1/central-bank/ecb/latest?source=EUR&target=USD" \
-H "Authorization: Bearer YOUR_API_KEY" Or with the dedicated zero-dependency npm package:
npm install ecb-exchange-rate import { getRate, getRatesForDate } from 'ecb-exchange-rate';
// Today's published reference rate
const pair = await getRate('EUR', 'USD', { apiKey: 'art_live_...' });
console.log(pair.rate, pair.rate_date);
// The rate for an invoice date — closing days resolve to the most
// recent published date and are flagged, so audits stay honest.
const day = await getRatesForDate('2026-05-01', { apiKey: 'art_live_...' }); Crosses the ECB never printed (GBP/JPY, say) are computed from the published table and flagged derived: true with the method — the distinction an auditor actually cares about. The latest published table is free (300 requests/month, no credit card); historical dates and time series are on paid plans.
When you should just use the ECB directly
Genuinely: often. A nightly batch job that only ever needs EUR-quoted rates, tolerates XML, and handles holidays once is a fine direct integration — many finance teams have exactly that and it works for years. Go direct when the ECB is your only source and your pair list is stable. Reach for a unified API when you need multiple banks, non-EUR crosses with a clean audit trail, or when the parser you wrote in 2019 breaks at 16:02 on a Friday.
FAQ
Is the ECB exchange rate API free?
Yes — XML, CSV, and SDMX, no key, no paid tier. The cost is the integration work: parsing, holiday handling, and cross-rate computation are yours.
How often does the ECB update exchange rates?
Once per TARGET working day, around 16:00 CET. There is deliberately no intraday feed — a reference rate is fixed once, which is exactly why compliance work uses it.
Does the ECB have an official JSON endpoint?
SDMX-JSON via the data API is as close as it gets, and it is a statistical format rather than application JSON. For flat JSON of the same published values, use a unified API.
Is OANDA an alternative for official rates?
OANDA sells market data, not official reference rates — a different product for a different job. We covered its free-tier question in Is the OANDA API free?
ECB reference rates as clean JSON
The latest published table is free — 300 requests/month, no credit card.
Get your free API key