# Currency Exchange Rates Scraper - Live & Historical FX by Date (`ninhothedev/currency-exchange-scraper`) Actor

$0.9/1K 🔥 Fast currency exchange scraper! Live & historical FX rates for 30+ currencies. No key needed. JSON, CSV, Excel or API in seconds. Enter currency pairs & pull thousands of rates for finance & billing ⚡

- **URL**: https://apify.com/ninhothedev/currency-exchange-scraper.md
- **Developed by:** [ninhothedev](https://apify.com/ninhothedev) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 1,000 results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Currency Exchange Rates Scraper (multi-source: Frankfurter + ECB)

**Get clean live & historical currency exchange rates: latest rates, single-day historical, and full time-series across 30+ currencies (ECB reference rates). As JSON, CSV or Excel. Free, no API key, no proxy.**

> **Multi-source by design.** Rates are fetched through a host fallback chain (Frankfurter → ECB) and the first host that answers wins, so an outage at any single provider no longer fails your run. See [Data sources & reliability](#-data-sources--reliability).

### 💵 Pricing

**Pay per result — $0.0003 per item (~$0.30 / 1,000).** No subscription, no proxy needed. You only pay for the data you scrape, and new Apify accounts include free monthly credits so you can test it for **$0**.

### 🔎 What can it extract?

- **Latest** exchange rates for any base currency
- **Historical** rates on any single past day
- **Time-series** of rates across a date range (one series per currency)
- 30+ currencies (USD, EUR, GBP, JPY, CHF, AUD, CAD, CNY, …)
- Powered by European Central Bank (ECB) reference rates, reached through **four independent hosts** with automatic failover
- A `source` field on every row telling you which host served it

### 🚀 How do I use it?

1. Click **Try for free**.
2. Choose a **mode** (latest / historical / timeseries) and set the input (see examples below).
3. Click **Start** and download results as JSON, CSV or Excel — or pull them via the API / schedule them daily.

### ⚙️ Input examples

Latest USD rates for EUR, GBP, JPY:

```json
{
  "mode": "latest",
  "base": "USD",
  "symbols": ["EUR", "GBP", "JPY"]
}
```

Historical (single day):

```json
{
  "mode": "historical",
  "base": "EUR",
  "symbols": ["USD"],
  "date": "2024-01-02"
}
```

Time-series (date range):

```json
{
  "mode": "timeseries",
  "base": "USD",
  "symbols": ["EUR", "GBP"],
  "startDate": "2024-01-01",
  "endDate": "2024-01-31"
}
```

### 📦 Output examples

`latest` / `historical` — one item per target currency:

```json
{
  "base": "USD",
  "target": "EUR",
  "rate": 0.87673,
  "amount": 1.0,
  "date": "2026-06-29",
  "source": "frankfurter-dev",
  "scraped_at": "2026-06-30T08:30:00+00:00"
}
```

`timeseries` — one item per currency, with a `series[]` array:

```json
{
  "base": "USD",
  "target": "EUR",
  "start_date": "2024-01-01",
  "end_date": "2024-01-31",
  "series": [
    { "date": "2024-01-02", "rate": 0.91274 },
    { "date": "2024-01-03", "rate": 0.91583 }
  ],
  "scraped_at": "2026-06-30T08:30:00+00:00"
}
```

### 🎯 Use cases

- **Ecommerce pricing** — convert and localize prices, keep multi-currency catalogs in sync
- **Finance** — monitor FX movements, build dashboards and alerts
- **Accounting** — book invoices and expenses at the correct daily rate
- **Analytics** — feed clean rate time-series into BI tools, models and reports

### 🔌 Data sources & reliability

Every row carries a **`source`** field naming the host that actually answered.

#### What happened (and what was fixed)

`api.frankfurter.dev` sits behind Cloudflare and began returning **HTTP 522** (*origin connection timed out*) to datacenter IP ranges, including Apify's runners, while still serving **200** to residential connections. A 522 is an edge-to-origin failure, so retrying the same host does not help.

**The fix is a host fallback chain, not a proxy.** The same ECB reference rates are published by several independent hosts, so the actor walks them in order and uses the first that answers:

| # | Host | `source` | Notes |
|---|---|---|---|
| 1 | `api.frankfurter.dev` | `frankfurter-dev` | canonical Frankfurter host |
| 2 | `api.frankfurter.app` | `frankfurter-app` | legacy host; terminates on a **different** Cloudflare edge, so it can succeed when #1's edge is failing |
| 3 | `data-api.ecb.europa.eu` | `ecb-sdmx` | the ECB SDMX API — the original source Frankfurter republishes, with no Cloudflare in front |
| 4 | `ecb.europa.eu/.../eurofxref-daily.xml` | `ecb-xml` | ECB daily reference XML (latest mode only) |

Which host won is logged on every run, and if all four fail the run **fails loudly** with each host's actual HTTP status rather than returning an empty dataset.

#### One schema, whichever host answers

The ECB tiers publish **EUR-denominated rates only**. Rather than pushing a different shape, the actor performs the cross-rate rebasing locally — `rate(base → target) = eurRate(target) / eurRate(base)` — so an ECB-served row is byte-identical in structure to a Frankfurter-served one and your `base` currency keeps working. Verified live: for `USD → EUR/GBP/JPY` the Frankfurter and ECB paths agree to within Frankfurter's own 5-decimal rounding.

#### How this differs from `ecb-exchange-rates-scraper`

The account also ships [ECB Exchange Rates Scraper](https://apify.com/ninhothedev/ecb-exchange-rates-scraper), which is a straight mirror of the ECB's published EUR reference rates. **This actor is the multi-source convenience tool**, and stays that way:

| | This actor | `ecb-exchange-rates-scraper` |
|---|---|---|
| Base currency | **any** (cross-rates computed for you) | EUR only |
| Modes | latest, historical single day, **time-series ranges** | latest reference rates |
| Hosts | 4, with automatic failover | ECB only |
| Best for | apps, billing and analytics that need arbitrary pairs and ranges | a faithful, single-source ECB mirror |

The ECB hosts are a **resilience tier** here, not the product.

### 💰 How much will it cost?

You pay only the per-result price (no proxy cost):
100 → ~$0.03 · 1,000 → ~$0.30 · 10,000 → ~$3

### 🆚 Why this one

| Feature | This actor | Others |
|---|---|---|
| Latest + historical + time-series | ✅ | latest only |
| Multi-host failover (survives a provider outage) | ✅ | ❌ |
| Any base currency (cross-rates computed) | ✅ | EUR/USD only |
| 30+ ECB reference currencies | ✅ | partial |
| No API key, no proxy | ✅ | sometimes |
| Pay per result, free to test | ✅ | subscription |

### 🔗 Related actors

- [CoinGecko Crypto Scraper](https://apify.com/ninhothedev/coingecko-crypto-scraper) — crypto prices & market data
- [Binance Crypto Scraper](https://apify.com/ninhothedev/binance-crypto-scraper) — crypto trading data
- [Yahoo Finance Scraper](https://apify.com/ninhothedev/yahoo-finance-scraper) — stocks & tickers
- [Shopify Store Scraper](https://apify.com/ninhothedev/shopify-store-scraper) — ecommerce products & prices

### ❓ FAQ

**API key or proxy?** No — neither is needed. **Which rates?** ECB reference rates, fetched via Frankfurter with automatic failover to the ECB's own API. **What is the `source` field?** The host that served that row. **What if a provider is down?** The actor tries the next host automatically; it only fails if all four are unreachable. **Weekends/holidays?** ECB does not publish on those days; the API returns the most recent working-day rate. **All currencies?** Leave `symbols` empty to get every available currency.

### 🛟 Support

Found a bug or need an extra field? Open an issue on the actor — fixes and new fields ship fast.

### Legal & privacy

Data via the free Frankfurter API and the European Central Bank's public SDMX API and daily reference XML. All are ECB reference rates. No personal data is collected.

***

**Keywords:** currency scraper, exchange rates, forex, fx rates, currency converter, historical exchange rates, ECB rates, frankfurter, multi-source failover, ecommerce pricing, finance, accounting, analytics, JSON CSV Excel

# Actor input Schema

## `mode` (type: `string`):

What to fetch: 'latest' (today's rates), 'historical' (rates on a single past day), or 'timeseries' (rates over a date range).

## `base` (type: `string`):

The base currency (3-letter ISO code, e.g. USD, EUR, GBP). One unit of this currency is converted to each target currency.

## `symbols` (type: `array`):

Target currencies as 3-letter ISO codes, e.g. \["EUR","GBP","JPY"]. Leave empty to return ALL available currencies.

## `date` (type: `string`):

Used only when mode=historical. The single day to fetch rates for, in YYYY-MM-DD format, e.g. 2024-01-02.

## `startDate` (type: `string`):

Used only when mode=timeseries. Start of the date range in YYYY-MM-DD format, e.g. 2024-01-01.

## `endDate` (type: `string`):

Used only when mode=timeseries. End of the date range in YYYY-MM-DD format, e.g. 2024-01-31.

## `maxItems` (type: `integer`):

Maximum number of dataset items (one per target currency) to produce.

## Actor input object example

```json
{
  "mode": "latest",
  "base": "USD",
  "symbols": [
    "EUR",
    "GBP",
    "JPY"
  ],
  "date": "2024-01-02",
  "startDate": "2024-01-01",
  "endDate": "2024-01-31",
  "maxItems": 200
}
```

# Actor output Schema

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

No description

# 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 = {
    "base": "USD",
    "symbols": [
        "EUR",
        "GBP",
        "JPY"
    ],
    "date": "2024-01-02",
    "startDate": "2024-01-01",
    "endDate": "2024-01-31",
    "maxItems": 200
};

// Run the Actor and wait for it to finish
const run = await client.actor("ninhothedev/currency-exchange-scraper").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 = {
    "base": "USD",
    "symbols": [
        "EUR",
        "GBP",
        "JPY",
    ],
    "date": "2024-01-02",
    "startDate": "2024-01-01",
    "endDate": "2024-01-31",
    "maxItems": 200,
}

# Run the Actor and wait for it to finish
run = client.actor("ninhothedev/currency-exchange-scraper").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 '{
  "base": "USD",
  "symbols": [
    "EUR",
    "GBP",
    "JPY"
  ],
  "date": "2024-01-02",
  "startDate": "2024-01-01",
  "endDate": "2024-01-31",
  "maxItems": 200
}' |
apify call ninhothedev/currency-exchange-scraper --silent --output-dataset

```

## MCP server setup

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

```

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/hNl0tVwLWG6963XSs/builds/Zx6mK7yQsN2n1KsIe/openapi.json
