Czech National Bank API

Free to Use Varies (check documentation)

Overview

The Czech National Bank (CNB) publishes official daily exchange rates for 30+ currencies against the Czech Koruna (CZK) as a plain XML file. No authentication, account, or API key is required. This data is authoritative for Czech financial regulations, accounting, and VAT compliance.

💡

Beginner Tip

The endpoint returns XML not JSON. Parse the response with an XML library. The CNB URL provides today's rates at https://www.cnb.cz/en/financial_markets/foreign_exchange_market/exchange_rate_fixing/daily.xml. For a specific date append ?date=YYYY-MM-DD.

Available Data

exchange rate between currencies
conversion result
supported currency list
historical rates
country name and code
population

Example Response

JSON Response
{
  "base": "USD",
  "date": "2025-01-15",
  "rates": {
    "EUR": 0.92,
    "GBP": 0.79,
    "JPY": 149.5,
    "CAD": 1.35
  }
}

Field Reference

Table.@date The date of the exchange rate publication in Czech date format.
Table.Row.Currency Full name of the foreign currency (e.g. US dollar).
Table.Row.Code Three-letter ISO currency code (e.g. USD, EUR).
Table.Row.Rate Exchange rate of the foreign currency in Czech Koruna, using a comma as the decimal separator.

Implementation Example

const url = "https://www.cnb.cz/cs/financni_trhy/devizovy_trh/kurzy_devizoveho_trhu/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

Cannot parse as JSON The CNB API returns XML, not JSON
Use an XML parser such as xml2js in Node.js or ElementTree in Python. The XML structure uses Radek elements for each currency.
404 for English endpoint Using the Czech-language URL path which differs from the English one
Use the English URL: https://www.cnb.cz/en/financial_markets/foreign_exchange_market/exchange_rate_fixing/daily.xml
No data for weekends or holidays The CNB only publishes rates on Czech banking days (weekdays excluding Czech public holidays)
If you query a weekend or Czech holiday, fall back to the previous banking day by decrementing the date.

Matrix Score Breakdown

🌐 Reachability 15/30
⚡ Speed 10/20
🔒 Security 15/15
🛠 Developer XP 20/20
✓ Reliability 7/15
Response Time 837ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →