ExchangeRate-API

Finance API · Works globally · Based on ECB and other financial sources · Real-time rates

TL;DR

ExchangeRate-API provides real-time and historical foreign exchange rates through a free, open endpoint that requires zero authentication. Data is sourced from the European Central Bank and other financial institutions. The free tier supports fetching latest rates against any base currency (EUR, USD, GBP, etc.) and covers 160+ world currencies. Unlike many finance APIs that require paid subscriptions, this one simply works with a GET request.

Quick start: https://open.er-api.com/v6/latest/USD

No API key needed — just make a request!

How to Use This API

1. Latest Rates Against USD

Get all exchange rates with USD as the base currency:

https://open.er-api.com/v6/latest/USD

Each rate includes the currency code, value, and last-updated timestamp.

2. Historical Rates (Old API Pattern)

While latest is the primary free endpoint, previous versions supported date-based queries for historical data. Check documentation for updates.

3. JavaScript — Fetch Rates for EUR

// Get live exchange rates with EUR as base
fetch('https://open.er-api.com/v6/latest/EUR')
  .then(res => res.json())
  .then(data => {
    console.log('Base:', data.base_code);
    console.log('USD:', data.rates.USD);
    console.log('GBP:', data.rates.GBP);
    console.log('JPY:', data.rates.JPY);
    console.log('Last updated:', data.time_last_update_utc);
  })
  .catch(err => console.error('Error:', err));

4. Python — Currency Converter

import requests

def convert(amount, from_cur, to_cur):
    resp = requests.get(f'https://open.er-api.com/v6/latest/{from_cur}')
    data = resp.json()
    rate = data['rates'][to_cur]
    return amount * rate

# Convert 50 USD to EUR
result = convert(50, 'USD', 'EUR')
print(f'50 USD = {result:.2f} EUR')
Try it yourself: https://open.er-api.com/v6/latest/USD

Frequently Asked Questions

Do I need an API key?
No. The free open endpoint at open.er-api.com requires no key or registration. Just make a GET request.
How many currencies are supported?
The API covers 160+ currencies including major (USD, EUR, GBP, JPY, AUD, CAD, CHF) and minor/exotic currencies.
What base currencies can I use?
Any supported currency code works as the base. Try /v6/latest/GBP for GBP-based rates, /v6/latest/JPY for yen-based rates, etc.
How often are rates updated?
Exchange rates are updated once every 24 hours on working days, sourced from the European Central Bank and other financial data providers.
Does it support historical rates?
The free open endpoint focuses on latest rates. Historical date queries may be available through the main exchangerate-api.com service with API key.
What response format does it return?
The API returns JSON with base_code, rates (object of currency:value pairs), time_last_update_utc, and time_next_update_utc.

API Details

API URL
https://open.er-api.com/v6
Documentation
exchangerate-api.com
Category
Finance
Authentication
Not Required
Geographic Coverage
Global — all 160+ world currencies

What You Can Build