Currencylayer API

⭐ Beginner's Pick Currency Exchange / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

Currencylayer provides reliable exchange rate and currency conversion data for over 168 world currencies using an easy-to-use REST API. It is commonly used for financial applications, e-commerce sites, and travel apps that need accurate currency conversion. A free tier is available with a limited number of monthly API calls and an API key is required.

💡

Beginner Tip

The free Currencylayer plan allows 100 API calls per month and only supports USD as the base currency; upgrade to a paid plan if you need other base currencies or more requests. Always cache exchange rates locally since they do not change minute-to-minute, which saves your API quota.

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

success Indicates whether the API request was successful
source The base currency used for the exchange rates (e.g., USD)
timestamp Unix timestamp of when the exchange rates were last updated
quotes Key-value pairs of currency codes to exchange rates (e.g., USDEUR: 0.91)

Implementation Example

const url = "https://currencylayer.com/";
// 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

101 Invalid access key The access_key parameter is missing or incorrect
Sign up at currencylayer.com to get a free access key and pass it as the access_key query parameter
105 Access restricted / base currency not allowed Free plan only supports USD as the source currency
Use USD as your source currency on the free tier, or upgrade to a paid plan to use other base currencies
106 No results for given query Requesting a currency code that Currencylayer does not support
Consult the list of supported currencies in the Currencylayer docs and use the correct 3-letter ISO currency codes

Matrix Score Breakdown

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

Partially tested on Apr 5, 2026

Technical Specifications

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

Alternatives to Currencylayer

Technical alternatives for different use cases.

Broader currency coverage beyond forex pairs

Better For

Real-time forex WebSocket streaming

Trade-off

Multi-currency conversion beyond forex majors

More established provider with 170+ fiat currencies

Better For

Combined fiat and crypto rates in one API

Trade-off

Production apps needing proven reliability

Free with no API key required for basic currency conversion

Better For

Free currency conversion without signup

Trade-off

Real-time forex rates for trading applications

ECB-sourced rates with simple REST interface

Better For

European-focused apps using ECB reference rates

Trade-off

170+ currency support and historical data depth

Same parent company (apilayer) with similar data quality

Better For

Users already in the apilayer ecosystem

Trade-off

Unique features - very similar to Currencylayer

Similar APIs

View All →