Skip to content
DDataNest

Currency · 4 min read

How to use the Currency Exchange Rates API in Python & JavaScript

Exchange rates change daily and every app eventually needs them. The Currency Exchange Rates API gives you ECB-official rates and conversion from one clean endpoint.

By DataNest · Published May 2026

What the Currency Exchange Rates API does

ECB official reference exchange rates with conversion, historical lookups, time-series trends, a supported-currency catalog and curated popular pairs with daily change. Clean JSON, free tier, no key juggling. Responses are JSON, the API runs behind the RapidAPI gateway for auth and rate limiting, and there's a free tier for prototyping.

When to use it

currency converters
e-commerce pricing
fintech & invoicing

The example request

GET https://currency-exchange-rates-by-datanest.p.rapidapi.com/convert?from=USD&to=INR&amount=100

Example JSON response

An illustrative response body — run the live demo for the real thing.

{
  "status": "success",
  "data": {
    "from": "USD",
    "to": "INR",
    "amount": 100,
    "rate": 96.35,
    "result": 9635,
    "date": "2026-05-18"
  }
}

Common parameters

Every request also needs your RapidAPI auth headers.

ParameterInRequiredExample
basequeryYesUSD
symbolsqueryYesEUR,GBP,INR
x-rapidapi-keyheaderYesYOUR_RAPIDAPI_KEY
x-rapidapi-hostheaderYescurrency-exchange-rates-by-datanest.p.rapidapi.com

Step by step

1. Subscribe and get your key

Open the Currency Exchange Rates API on RapidAPI, subscribe to the free BASIC plan, and copy your X-RapidAPI-Key.

2. Call the endpoint

The example call for this API is shown above. The quick-start snippets below send exactly that request in cURL, Python and Node so you get a real response on the first try.

3. Try it without code first

The Currency Exchange Rates page has a live "Try it" panel — change the input, run it, and inspect the real JSON before you integrate.

4. Integrate and cache

Call it from your backend and cache responses where it makes sense. Most responses change slowly, so even a daily cache keeps you well within the free tier.

Quick-start code

curl --request GET \
  --url 'https://currency-exchange-rates-by-datanest.p.rapidapi.com/latest?base=USD&symbols=EUR%2CGBP%2CINR' \
  --header 'x-rapidapi-host: currency-exchange-rates-by-datanest.p.rapidapi.com' \
  --header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY'

What you can build

Currency converter

Add a live converter to a travel, e-commerce or fintech app with one call.

Multi-currency pricing

Show prices in the visitor's local currency using daily ECB rates.

FX trend widget

Chart 30-day rate history for any pair from the timeseries endpoint.

Wrapping up

If your project needs currency converters, the Currency Exchange Rates API removes the part nobody enjoys building. It's one of 25 in the DataNest collection — grab a free key and make your first call.

Currency Exchange Rates updates

New Currency Exchange Rates guides and endpoint updates, occasionally.