If you're building anything with international payments, e-commerce, or travel — you need currency exchange rates. Most APIs charge for this data or require complicated OAuth flows.
ExchangeRate-API gives you free, up-to-date exchange rates with zero signup.
Try It Right Now
curl https://open.er-api.com/v6/latest/USD
Response (truncated):
{
"result": "success",
"base_code": "USD",
"time_last_update_utc": "Wed, 26 Mar 2026 00:00:01 +0000",
"rates": {
"EUR": 0.9234,
"GBP": 0.7891,
"JPY": 149.85,
"CAD": 1.3612,
"AUD": 1.5423,
"CHF": 0.8812,
"CNY": 7.2456
}
}
160+ currencies. Updated daily. No key needed.
Python Example: Currency Converter
import requests
def convert(amount, from_currency, to_currency):
url = f"https://open.er-api.com/v6/latest/{from_currency}"
data = requests.get(url).json()
if data["result"] != "success":
return None
rate = data["rates"][to_currency]
converted = round(amount * rate, 2)
print(f"{amount} {from_currency} = {converted} {to_currency} (rate: {rate})")
return converted
# Examples
convert(100, "USD", "EUR") # 100 USD = 92.34 EUR
convert(1000, "GBP", "JPY") # 1000 GBP = 189,888.50 JPY
convert(50, "EUR", "CAD") # 50 EUR = 73.72 CAD
JavaScript Example: Real-Time Price Display
async function showPriceInLocalCurrency(priceUSD, targetCurrency) {
const res = await fetch(`https://open.er-api.com/v6/latest/USD`);
const data = await res.json();
const rate = data.rates[targetCurrency];
const localPrice = (priceUSD * rate).toFixed(2);
console.log(`$${priceUSD} USD = ${localPrice} ${targetCurrency}`);
return localPrice;
}
// Show product price in different currencies
showPriceInLocalCurrency(29.99, "EUR"); // €27.69
showPriceInLocalCurrency(29.99, "GBP"); // £23.67
showPriceInLocalCurrency(29.99, "JPY"); // ¥4,493
Build a Multi-Currency Price Table
import requests
def price_table(price_usd, currencies=["EUR", "GBP", "JPY", "CAD", "AUD", "CHF", "INR", "BRL"]):
data = requests.get("https://open.er-api.com/v6/latest/USD").json()
rates = data["rates"]
print(f"Price: ${price_usd} USD")
print("-" * 35)
symbols = {"EUR": "€", "GBP": "£", "JPY": "¥", "CAD": "C$", "AUD": "A$", "CHF": "CHF", "INR": "₹", "BRL": "R$"}
for curr in currencies:
converted = round(price_usd * rates[curr], 2)
symbol = symbols.get(curr, curr)
print(f" {symbol} {converted:>10} {curr}")
price_table(49.99)
Pair With IP-API for Auto-Detection
Combine with IP-API to automatically show prices in the visitor's local currency:
import requests
# Map countries to currencies
COUNTRY_CURRENCY = {
"US": "USD", "GB": "GBP", "DE": "EUR", "FR": "EUR",
"JP": "JPY", "CA": "CAD", "AU": "AUD", "IN": "INR",
"BR": "BRL", "CH": "CHF"
}
def auto_price(price_usd, visitor_ip):
# Step 1: Get visitor country
loc = requests.get(f"http://ip-api.com/json/{visitor_ip}").json()
country = loc.get("countryCode", "US")
currency = COUNTRY_CURRENCY.get(country, "USD")
# Step 2: Convert price
rates = requests.get("https://open.er-api.com/v6/latest/USD").json()["rates"]
local_price = round(price_usd * rates.get(currency, 1), 2)
return {"price": local_price, "currency": currency, "country": loc.get("country")}
result = auto_price(29.99, "8.8.8.8")
print(result) # {'price': 29.99, 'currency': 'USD', 'country': 'United States'}
Compared to Alternatives
| Service | Free Tier | Key Required | Currencies | Update Frequency |
|---|---|---|---|---|
| ExchangeRate-API | 1,500 req/mo | No | 160+ | Daily |
| Fixer.io | 100 req/mo | Yes | 170 | Hourly (paid) |
| CurrencyLayer | 100 req/mo | Yes | 168 | Hourly (paid) |
| OpenExchangeRates | 1,000 req/mo | Yes | 170 | Hourly |
| Abstract API | 1 req/sec | Yes | 150 | Daily |
ExchangeRate-API is the simplest: no signup, no key, generous free tier.
More Free APIs (No Key Required)
- IP-API: Free IP Geolocation — Get country, city, ISP for any IP address
- Open-Meteo: Free Weather API — Forecasts and historical weather data, no key needed
Combine all three: detect location → show local weather → display prices in local currency. Zero API keys needed.
Need to process currency data at scale? Check out my data extraction tools on Apify — built for production workloads.
Need a custom financial data pipeline? Email me at spinov001@gmail.com
What currency API do you use in your projects? Let me know in the comments!
Need data from the web without writing scrapers? Check my *Apify actors** — ready-made scrapers for HN, Reddit, LinkedIn, and 75+ more sites. Or email: spinov001@gmail.com*
Top comments (0)