TL;DR
The Czech National Bank publishes daily foreign exchange rates for the Czech koruna (CZK) against 150+ global currencies. The data comes in XML format and updates every workday after 14:00 local time. This is the official reference rate used by all Czech banks and financial institutions — authoritative for CZK-denominated transactions.
Quick start: https://www.cnb.cz/cs/financni_trhy/devizovy_trh/kurzy_devizoveho_trhu/denni_kurz.xml
No API key needed — just make a request!
Response Format
The API returns an XML document with a <kurzy> root element containing individual <banka> entries for each currency. Each entry includes: currency code (ISO), amount (units per CZK rate), country, and the exchange rate value. Parse the XML to extract specific currency pairs.
- API URL
https://www.cnb.cz/cs/financni_trhy/devizovy_trh/kurzy_devizoveho_trhu/denni_kurz.xml- Documentation
- CNB Exchange Rates
- Category
- Finance
- Authentication
- Not Required
- Geographic Coverage
- CZ — Czech Republic, but covers 150+ global currencies
How to Use This API
1. Fetch Daily Rates (XML)
https://www.cnb.cz/cs/financni_trhy/devizovy_trh/kurzy_devizoveho_trhu/denni_kurz.xml
2. JavaScript — Parse XML and Find a Rate
async function getRate(currencyCode) {
const resp = await fetch(
'https://www.cnb.cz/cs/financni_trhy/devizovy_trh/kurzy_devizoveho_trhu/denni_kurz.xml'
);
const xmlText = await resp.text();
const parser = new DOMParser();
const xml = parser.parseFromString(xmlText, 'text/xml');
const rows = xml.querySelectorAll('banka');
for (const row of rows) {
if (row.getAttribute('kod') === currencyCode) {
const amount = parseInt(row.getAttribute('mnozstvi'));
const rate = parseFloat(row.getAttribute('kurz').replace(',', '.'));
return { code: currencyCode, rate: rate / amount, unit: amount };
}
}
return null;
}
getRate('USD').then(r =>
console.log(`1 CZK = ${1/r.rate} USD (or ${r.rate} CZK per 1 USD)`));
3. Python — Parse XML Rates
import requests
import xml.etree.ElementTree as ET
resp = requests.get(
'https://www.cnb.cz/cs/financni_trhy/devizovy_trh/kurzy_devizoveho_trhu/denni_kurz.xml'
)
root = ET.fromstring(resp.content)
for banka in root.findall('.//banka'):
code = banka.get('kod')
amount = int(banka.get('mnozstvi'))
rate = float(banka.get('kurz').replace(',', '.'))
print(f"{code}: {amount} unit(s) = {rate} CZK")
# Also available as a JSON-friendly CSV:
# https://www.cnb.cz/en/financial_markets/foreign_exchange_market/exchange_rate_fixing/daily.txt
https://www.cnb.cz/cs/financni_trhy/devizovy_trh/kurzy_devizoveho_trhu/denni_kurz.xml
Frequently Asked Questions
- What format does the API return?
- XML by default. CNB also offers a CSV/text version at
/denni_kurz.txtwhich is easier to parse. Both contain the same data — exchange rates for 150+ currencies against CZK. - How often are rates updated?
- Every workday (Monday to Friday) after 14:00 Prague time (CET/CEST). Weekend and public holiday rates reflect the last available working day.
- Is the API rate limited?
- There are no documented rate limits, but as a government website, it's designed for moderate usage. Caching the XML for a few hours is recommended if you query frequently.
- Can I get historical rates?
- Yes! CNB provides historical daily rates via a different endpoint:
https://www.cnb.cz/en/financial_markets/foreign_exchange_market/exchange_rate_fixing/year.txt?year=2026. You can also query specific dates. - Is there a JSON endpoint?
- The official endpoints return XML or CSV text. However, you can use
/denni_kurz.txtand parse the semicolon-separated values, which is straightforward for most programming languages. - What currencies are tracked?
- 150+ currencies including all major ones: USD, EUR, GBP, CHF, JPY, CNY, RUB, and many emerging market currencies. The exact list varies slightly depending on what CNB tracks.
What You Can Build
- CZK currency converter widget for e-commerce sites targeting Czech customers
- Accounting tool that converts invoices to CZK using official central bank rates
- Travel expense tracker for trips to the Czech Republic
- Historical exchange rate chart for CZK against major currencies
- Euro-calculator for Czech businesses trading with EU partners