Skip to content

ExchangeRate-API API

by exchangerate-api.com

API keyHTTPSCORSCurrency Exchange
Open documentation ↗

Overview

Free currency conversion

ExchangeRate-API is a currency exchange API from exchangerate-api.com. Requests are authenticated with an API key. It is served over HTTPS and allows browser requests (CORS). Its OpenAPI description documents 1 endpoints.

At a glance

Authentication
API key
HTTPS
Yes
CORS
Yes
Base URL
https://api.exchangerate-api.com/v4
Version
4
Endpoints
1
Spec updated
2021-06-21

Make a first request

Replace the placeholders; the documentation says exactly where credentials go.

cURL
curl -X GET "https://api.exchangerate-api.com/v4/latest/BASE_CURRENCY" \
  -H "Accept: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
JavaScript
const response = await fetch("https://api.exchangerate-api.com/v4/latest/BASE_CURRENCY", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY",
  },
});
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    "GET",
    "https://api.exchangerate-api.com/v4/latest/BASE_CURRENCY",
    headers={
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY",
    },
    timeout=30,
)
print(response.json())

Endpoints

MethodPathWhat it does
GET/latest/{base_currency}Returns latest exchange rates in parameter-supplied base currency.

Questions

Does the ExchangeRate-API API need an API key?

Yes. The ExchangeRate-API API uses API key authentication; the documentation explains how to get credentials.

Can I call the ExchangeRate-API API from the browser?

Yes. The ExchangeRate-API API sends CORS headers, so a web page can call it directly with fetch().

Does the ExchangeRate-API API support HTTPS?

Yes, the ExchangeRate-API API is served over HTTPS.

How many endpoints does the ExchangeRate-API API have?

Its OpenAPI description lists 1 endpoint in version 4. All of them are shown on this page.

What are alternatives to the ExchangeRate-API API?

Other Currency Exchange APIs include Bank of Russia, National Bank of Poland, Czech National Bank, API for the Settlement Currency Rate converter, Frankfurter.

Compare alternatives →

Listed from public-apis (MIT), public-apis database (MIT), APIs.guru (CC0).