Skip to content
Fox photography representing the Public APIs section

Public APIs

Free Currency APIs

Exchange rate APIs you can call without a commercial contract, plus the thing most tutorials skip: what kind of rate you are actually getting.

  • 5 providers
  • Rate types explained
  • Sample responses

The APIs covered on this page

Currency API terms change more often than most categories - several providers have introduced keys or paid tiers at short notice. Confirm current pricing and limits on the provider's documentation before you build.

Frankfurter

Documentation

European Central Bank reference rates, current and historical.

Authentication
None
Pricing
Free, open source, self-hostable
Endpoint
GET /latest

Example request

curl "https://api.frankfurter.app/latest?from=USD&to=EUR,GBP,JPY"

Example response

{
  "amount": 1.0,
  "base": "USD",
  "date": "2026-09-12",
  "rates": { "EUR": 0.9223, "GBP": 0.7867, "JPY": 147.21 }
}

Good for

  • Displaying prices in a visitor's currency
  • Historical rate charts
  • Simple conversion tools

Limitations

  • Updated once per working day, around 16:00 CET
  • No weekend or holiday updates
  • Limited to currencies the ECB publishes

ExchangeRate-API (open access endpoint)

Documentation

Daily rates for a wide set of currencies via a key-free open endpoint.

Authentication
None on the open endpoint; a free key unlocks the standard API
Pricing
Free open endpoint with attribution; paid plans for higher frequency
Endpoint
GET /latest/{base}

Example request

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

Example response

{
  "result": "success",
  "base_code": "USD",
  "time_last_update_utc": "Sat, 12 Sep 2026 00:02:31 +0000",
  "rates": { "EUR": 0.9223, "PKR": 279.15, "AED": 3.6725 }
}

Good for

  • Broad currency coverage including emerging markets
  • Ecommerce price display
  • Budgeting and travel apps

Limitations

  • Open endpoint updates roughly once a day
  • Attribution required on the free tier
  • Not suitable for trading decisions

European Central Bank reference feed

Documentation

The original source that many free APIs wrap, published as XML.

Authentication
None
Pricing
Free public data
Endpoint
GET /eurofxref-daily.xml

Example request

curl "https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml"

Example response

<Cube time="2026-09-12">
  <Cube currency="USD" rate="1.0842"/>
  <Cube currency="GBP" rate="0.8531"/>
</Cube>

Good for

  • Removing a third-party dependency
  • Scheduled server-side jobs
  • Auditable rate sources for finance teams

Limitations

  • XML rather than JSON
  • Euro base only - cross rates must be derived
  • One update per working day

CoinGecko

Documentation

Cryptocurrency prices against fiat currencies.

Authentication
Free tier available; a demo key is required for some plans and endpoints
Pricing
Free tier with rate limits, paid plans above
Endpoint
GET /simple/price

Example request

curl "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd,eur"

Example response

{
  "bitcoin": { "usd": 63840.12, "eur": 58872.44 }
}

Good for

  • Crypto portfolio displays
  • Price tickers
  • Market data dashboards

Limitations

  • Strict rate limits on the free tier
  • Crypto prices move constantly - cache carefully
  • Terms and key requirements have changed before

Commercial exchange rate API with a limited free tier.

Authentication
Free API key required
Pricing
Free tier with a monthly call cap; paid plans for HTTPS and higher volume
Endpoint
GET /latest

Example request

curl "https://data.fixer.io/api/latest?access_key=YOUR_KEY&base=EUR&symbols=USD,GBP"

Example response

{
  "success": true,
  "timestamp": 1789200000,
  "base": "EUR",
  "rates": { "USD": 1.0842, "GBP": 0.8531 }
}

Good for

  • Projects already on a commercial plan
  • Historical time series
  • Business applications needing support

Limitations

  • Free tier restricts base currency and features
  • Key must stay server-side
  • Lower call caps than open alternatives

Exchange rate data: what you are actually getting

The rate returned by a free API is almost never the rate anyone pays. Understanding which rate you have is the difference between a useful conversion feature and a support queue full of confused customers.

Reference rates versus market rates

Most free APIs serve reference rates: an official snapshot published once a day by a central bank, most commonly the European Central Bank at around 16:00 Central European Time. They are accurate, authoritative and completely static until the next publication. Market rates, by contrast, move continuously during trading hours and are what a bank or broker actually quotes. Real-time market data is a licensed product, which is why it is not available for free.

The gap between the two is usually small for major pairs and can be significant for thinly traded currencies. Neither is the rate a consumer gets, because retail providers add a spread of anywhere from a fraction of a percent to several percent on top.

Where this matters in practice

  • Displaying an approximate price in a visitor's currency - reference rates are fine, with a clear "approximate" label.
  • Charging in multiple currencies - use your payment processor's rate, not a public API, or you will book a loss on every transaction.
  • Accounting and reporting - use the official rate your jurisdiction specifies for the relevant date.
  • Anything resembling trading - free APIs are unsuitable, and their terms usually say so explicitly.

Caching is not optional

If the data updates once per working day, fetching it on every page view wastes your quota and adds latency for no benefit. Fetch once per day on a schedule, store the result, and serve from your own store. This also protects you from an upstream outage - a rate from yesterday displayed with its date is far better than an error message.

Crypto is the exception. Those prices genuinely move by the second, so the caching question becomes a trade-off between freshness and rate limits. A ten to thirty second cache is usually a reasonable compromise for a display-only ticker.

Handling the arithmetic correctly

Never store money as a floating point number. The classic demonstration is that 0.1 plus 0.2 does not equal 0.3 in binary floating point, and those errors accumulate across a ledger. Store amounts as integers in the smallest unit - cents, paise, satoshi - or use a decimal library, and round only at the point of display.

Also handle currencies that are not two decimal places. The Japanese yen has none, several Middle Eastern currencies have three, and code that assumes two will produce wrong totals in all of them.

Converting between arbitrary pairs

Euro-based feeds like the ECB one require a cross-rate calculation: to convert USD to GBP, divide the EUR-to-GBP rate by the EUR-to-USD rate. The arithmetic is simple but the rounding is not - round once at the end, not at each step, or the error compounds. APIs that accept a base parameter do this for you, which is one practical reason to prefer them.

Plan for the day the API is down

Currency data is a dependency that fails quietly. If the fetch throws and nothing handles it, a price either disappears from the page or falls back to a hard-coded number that is months old. Store every successful response with its timestamp, serve the stored copy when the request fails, and show the date alongside the figure so nobody mistakes stale data for live data. If the stored rate is older than your tolerance - a few days, usually - it is better to hide the converted price entirely than to display a number you no longer trust.

Related resources

The evaluation checklist in Public APIs for Developers applies here in full. For a non-financial worked example of consuming a daily-updating API, see Free Weather APIs, and the Percentage Calculator is handy when you are reasoning about the spread between two rates.

Frequently asked questions

Why does my converted amount differ from what my bank charges?

Free APIs return reference or mid-market rates. Banks and payment providers add a spread and sometimes a fixed fee, so the customer rate is always less favourable than the published one.

Which currency API needs no API key?

Frankfurter and the ExchangeRate-API open endpoint both document key-free access, and the European Central Bank publishes its daily reference rates as a public XML feed.

Keep going

Related resources

Hand-picked pages that pair well with this one.

Public APIs

Public APIs for Developers

Where to find public APIs, how to judge one before you build on it, and five reliable starting points.

Open

Public APIs

Free Weather APIs

Weather data sources with free tiers, compared on keys, limits, forecast range and commercial terms.

Open

Quick Tools

Percentage Calculator

Work out a percentage of a number, what one number is as a percentage of another, and percentage change.

Open