Exchangeratesapi.io API

Currency Exchange / API Key Intermediate HTTPS CORS
Varies by plan (check documentation)

Overview

Exchangeratesapi.io provides real-time and historical foreign exchange rates for 170+ currencies, returned as JSON. Access requires a free API key from exchangeratesapi.io. It supports base currency conversion, endpoint filtering, and time-series queries, making it versatile for financial applications and e-commerce multi-currency pricing.

💡

Beginner Tip

Sign up at exchangeratesapi.io to get your free API key. The free plan restricts the base currency to EUR and allows up to 1000 requests per month. Pass your key as a query parameter: ?access_key=YOUR_KEY.

Available Data

exchange rate between currencies
conversion result
supported currency list
historical rates

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

base The base currency for the exchange rates (EUR on the free plan).
date The date the rates were collected.
rates Key-value pairs of currency codes to their exchange rate relative to the base currency.
timestamp Unix timestamp of when the rates were last updated.
success True if the API request was processed successfully.

Implementation Example

const url = "https://exchangeratesapi.io/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
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

Base currency is not EUR on free plan The free tier only supports EUR as the base currency
Use EUR as your base and convert to your target currency mathematically, or upgrade to a paid plan for arbitrary base currency support.
401 Unauthorized Missing or invalid access_key parameter
Include ?access_key=YOUR_KEY in every request. Get your key from the exchangeratesapi.io dashboard after sign-up.
429 Too Many Requests Exceeded the monthly request limit on the free plan (1000 requests)
Cache exchange rates on your server and refresh only when needed. Upgrade for higher limits.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 5/20
🔒 Security 15/15
🛠 Developer XP 17/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS YES
Difficulty Intermediate
Verified: 2026-04-04

Alternatives to Exchangeratesapi.io

Technical alternatives for different use cases.

ECB-sourced rates with simple REST interface

Better For

170+ currency support and historical data depth

Trade-off

European-focused apps using ECB reference rates

Free alternative with similar ECB-backed data

Better For

Free currency data without API key requirements

Trade-off

Guaranteed data freshness and update frequency

Simpler API with ECB rates, free tier available

Better For

Historical rates and time-series data

Trade-off

Basic currency conversion on a budget

Open-source ECB rate API, self-hostable

Better For

Self-hosting for data sovereignty requirements

Trade-off

Non-European currency pair coverage

Similar APIs

View All →