# Currency Exchange Rates — Real-Time FX Data (`nexgendata/currency-exchange-rates`) Actor

Real-time & historical exchange rates for 150+ currencies. Open Exchange Rates, Fixer.io & CurrencyLayer alternative for fintech apps, FX dashboards and international pricing tools. No API key needed. Pay per result.

- **URL**: https://apify.com/nexgendata/currency-exchange-rates.md
- **Developed by:** [NexGenData](https://apify.com/nexgendata) (community)
- **Categories:** Business, AI, Developer tools
- **Features:** Limited permissions
- **Stats:** 13 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 exchange rates

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## 💱 Currency Exchange Rates — Live & Historical FX Reference Rates

Currency Exchange Rates is a NexGenData tool on Apify that returns current and historical rates for 150+ currencies from public FX rate sources.

Pay-per-result FX data. One dataset row per currency pair, delivered from public
central-bank and reference-rate sources. No API key, no monthly plan.

> Reference FX data — not financial, trading, or investment advice.

### 📊 Sample Output

![3 real rows delivered by Currency Exchange Rates — Real-Time FX Data — run vzkbdlR6PhdMEu61G on build 1.0.15](https://api.apify.com/v2/key-value-stores/8gLgXMBveEI1tTz1z/records/currency-exchange-rates-sample)

| `baseCurrency` | `targetCurrency` | `rate` | `date` | `inverseRate` | `source` |
|---|---|---|---|---|---|
| USD | EUR | 0.87974 | 2026-09-24 | 1.136699 | frankfurter.dev (ECB reference rates) |
| USD | GBP | 0.75645 | 2026-09-24 | 1.321964 | frankfurter.dev (ECB reference rates) |
| USD | JPY | 158.85 | 2026-09-24 | 0.006295 | frankfurter.dev (ECB reference rates) |

Real rows from run `vzkbdlR6PhdMEu61G` on build 1.0.15 (2026-09-25), unedited apart from masked emails/phones and shortened long text; fields the source does not publish are empty.

### ⚙️ Sample inputs

This is the Store example input — the same input Apify's automated check runs — so it is proven to return rows on the current build. Paste it into the input form, or send it through the API, CLI or a schedule:

```json
{
  "baseCurrency": "USD",
  "targetCurrencies": "EUR,GBP,JPY"
}
```

### 🧾 JSON sample record

One real record from run `vzkbdlR6PhdMEu61G` (emails/phones masked, long text shortened):

```json
{
  "baseCurrency": "USD",
  "targetCurrency": "EUR",
  "rate": 0.87974,
  "date": "2026-09-24",
  "inverseRate": 1.136699,
  "source": "frankfurter.dev (ECB reference rates)"
}
```

### 🔗 Related Actors

More from the NexGenData **Commodities, FX & macro** family:

- [AIS Vessel Tracking + Bunker-Fuel Voyage Economics](https://apify.com/nexgendata/ais-vessel-tracking-bunker-economics?fpr=2ayu9b)
- [FX Rates Tracker — G10 + EM Currency Pairs Spot Data](https://apify.com/nexgendata/fx-rates-tracker?fpr=2ayu9b)
- [Global Stock Screener — 26 Exchanges, One API Call](https://apify.com/nexgendata/stock-exchange-meta-scraper?fpr=2ayu9b)
- [Stock Market Scraper — Real-Time Prices & Trends](https://apify.com/nexgendata/stock-market-scraper?fpr=2ayu9b)

Full catalog: [NexGenData on Apify](https://apify.com/nexgendata?fpr=2ayu9b).

### Pricing (live, as published on the Apify Store)

| Event | Price |
|---|---|
| Actor start | **$0.00005** per event (one event per GB of run memory, minimum one) |
| Result — one exchange rate row | **$0.01** per item |

That is **$10 per 1,000 rates**, or about **100 rates per $1**. You are charged
per row that lands in your dataset. Runs that fail, and runs that return zero
rows because the source had nothing matching your input, deliver no rows and are
therefore not charged for results.

### Input

| Field | Type | Default | Notes |
|---|---|---|---|
| `baseCurrency` | string | `USD` | 3-letter ISO 4217 code. Alias: `base`. |
| `targetCurrencies` | string | `""` (all) | Comma-separated codes, e.g. `EUR,GBP,JPY`. Alias: `symbols`. |
| `historical` | string | `""` (latest) | A single date, `YYYY-MM-DD`. Alias: `date`. |

An empty input returns the latest rates against USD — that is the product's
default run.

### Output

Five data fields plus a source attribution field:

- `baseCurrency` — the base ISO 4217 code you asked for
- `targetCurrency` — the quoted ISO 4217 code
- `rate` — units of `targetCurrency` per 1 `baseCurrency`
- `date` — the source's publication date for that rate
- `inverseRate` — `1 / rate`, rounded to 6 decimals
- `source` — which upstream provider served the row

### Data sources and coverage

Rates come from public reference-rate APIs, in this order:

1. **Frankfurter (ECB reference rates)** — around **30 currencies**, with daily
   history back to 1999 for those currencies. Used for both latest and
   historical requests.
2. **open.er-api.com (ExchangeRate-API open endpoint)** — around **160
   currencies**, latest rates only. Used as a fallback when Frankfurter is
   unavailable, and only for latest-rate requests.

What that means in practice:

- Historical requests are served by the ECB series only, so they cover the ~30
  ECB currencies and no earlier than 1999. A date outside that range returns
  zero rows with an explanatory status message, and is not charged.
- Rates are **mid-market reference rates**. There is no bid/ask spread in the
  data, because the sources do not publish one.
- **Cryptocurrencies are not covered.** Neither source publishes crypto rates.
- Only one date per run. There is no multi-date time-series mode.

### Quick start

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("nexgendata/currency-exchange-rates").call(run_input={
    "baseCurrency": "USD",
    "targetCurrencies": "EUR,GBP,JPY,CAD",
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["baseCurrency"], row["targetCurrency"], row["rate"], row["date"])
```

Historical (one date per run):

```python
run = client.actor("nexgendata/currency-exchange-rates").call(run_input={
    "baseCurrency": "USD",
    "targetCurrencies": "EUR",
    "historical": "2026-01-15",
})
```

### Use cases

- **Accounting / ERP** — daily mid-rate sync into NetSuite, Xero, QuickBooks
- **E-commerce** — display prices in a shopper's local currency
- **Treasury** — mark multi-currency balances to a published reference rate
- **International invoicing** — convert at the booking-day ECB rate
- **Backtesting** — pull a booking-date rate for a historical transaction

### Run behaviour

- If the upstream sources answer but hold nothing matching your input (an
  unknown currency code, or a date outside the published series), the run
  **succeeds with 0 rows** and the status message says why. Nothing is charged
  for results.
- If every source is unreachable or returns an error after retries, the run
  **fails** with a status message naming the cause. Nothing is charged for
  results.
- If the run hits its time limit part-way through, it stops cleanly, says
  "stopped early at the run time limit", and only the rows actually delivered
  are charged.

### FAQ

**How fresh are the rates?** ECB reference rates publish once per business day
(around 16:00 CET). Weekend and holiday requests return the last published
business-day rate. The fallback source updates roughly daily.

**Which currencies?** ~30 for historical and for the primary source; ~160 for
latest rates when the fallback source is used. Run with an empty
`targetCurrencies` to see the full list the source returns that day.

**Bid/ask or mid?** Mid-market reference rates only.

**Crypto?** Not supported.

**Output formats?** Whatever the Apify dataset supports — JSON, JSONL, CSV,
Excel, XML.

**Rate limits?** The upstream sources are public and may throttle. The actor
retries across both sources and, if neither answers, fails loudly rather than
returning a silent empty result.

### Related NexGenData actors

| Use case | Actor |
|---|---|
| FX with central-bank fixings | [FX Rates Tracker](https://apify.com/nexgendata/fx-rates-tracker?fpr=2ayu9b) |
| Finance data for LLM agents | [Finance MCP Server](https://apify.com/nexgendata/finance-mcp-server?fpr=2ayu9b) |
| Commodity futures | [Commodity Futures Tracker](https://apify.com/nexgendata/commodity-futures-tracker?fpr=2ayu9b) |
| Treasury yields and bonds | [Treasury Yields & Bonds](https://apify.com/nexgendata/treasury-yields-bonds?fpr=2ayu9b) |
| Equity quotes + fundamentals | [Yahoo Finance Scraper](https://apify.com/nexgendata/yahoo-finance-scraper?fpr=2ayu9b) |

### Support

Bug reports via the Apify console issues tab get a response within 24 hours.

📦 [apify.com/nexgendata](https://apify.com/nexgendata?fpr=2ayu9b)

# Actor input Schema

## `baseCurrency` (type: `string`):

ISO 4217 currency code (e.g., USD, EUR, GBP)

## `targetCurrencies` (type: `string`):

Comma-separated target currencies (e.g., EUR,GBP,JPY). Leave empty for all.

## `historical` (type: `string`):

Historical date in YYYY-MM-DD format. Leave empty for latest rates.

## Actor input object example

```json
{
  "baseCurrency": "USD",
  "targetCurrencies": "EUR,GBP,JPY",
  "historical": ""
}
```

# Actor output Schema

## `results` (type: `string`):

Default dataset of Currency Exchange Rates — Real-Time FX Data records (6 fields per row: baseCurrency, targetCurrency, rate, date, inverseRate, source).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "baseCurrency": "USD",
    "targetCurrencies": "EUR,GBP,JPY"
};

// Run the Actor and wait for it to finish
const run = await client.actor("nexgendata/currency-exchange-rates").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "baseCurrency": "USD",
    "targetCurrencies": "EUR,GBP,JPY",
}

# Run the Actor and wait for it to finish
run = client.actor("nexgendata/currency-exchange-rates").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "baseCurrency": "USD",
  "targetCurrencies": "EUR,GBP,JPY"
}' |
apify call nexgendata/currency-exchange-rates --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nexgendata/currency-exchange-rates"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ZwpL2Y4zEiodt2SS0/builds/wJ24OoGOyzkmT6kTO/openapi.json
