# 💱 Forex Exchange Intelligence - FX Rates (ECB) (`benthepythondev/forex-exchange-intelligence`) Actor

Track real-time currency exchange rates from the European Central Bank. Get forex rates for USD, EUR, GBP, JPY, CHF, and 30+ world currencies. Historical rate lookup, currency conversion, and cross-rate calculations.

- **URL**: https://apify.com/benthepythondev/forex-exchange-intelligence.md
- **Developed by:** [Ben](https://apify.com/benthepythondev) (community)
- **Categories:** Developer tools, Other, Business
- **Stats:** 14 total users, 4 monthly users, 96.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## 💱 Forex Exchange Intelligence — Real-Time & Historical Currency Rates From the ECB

Pull **currency exchange rates from the European Central Bank** — real-time, historical, or
across a full date range — as clean, structured data with **inverse (cross) rates** on every
pair. It covers **USD, EUR, GBP, JPY, CHF and 30+ world currencies**, all from an official,
free, central-bank source with no API key and no subscription. Whether you're converting
invoices, localizing e-commerce prices, or building an FX trend dashboard, this actor turns
ECB reference rates into ready-to-use records. Export to JSON/CSV/Excel, run on a schedule,
call via API, or connect to Make, Zapier or n8n.

### 💱 What is the Forex Exchange Intelligence?

It turns the ECB's official reference rates into a structured dataset. Pick a base currency
(and optionally a list of target currencies, a single historical date, or a start/end date
range) and it returns one clean record per rate — the conversion rate, the inverse rate, and
the date it applies to. Run it once for today's rates, look up any past business day, or pull
a multi-month time series to build your own FX history. No paid forex API, no rate-limit
headaches — just authoritative data you can drop straight into apps, spreadsheets, or BI tools.

#### What data does it extract?

- **Base currency** (`base_currency`) — the currency you're converting from
- **Target currency** (`target_currency`) — the currency you're converting to
- **Exchange rate** (`rate`) — units of target per 1 unit of base
- **Inverse rate** (`inverse_rate`) — the reverse conversion, pre-calculated
- **Rate date** (`date`) — the ECB business day the rate applies to
- **Extraction timestamp** (`extracted_at`) — when the record was pulled

### ⬇️ Input

Run it three ways — latest rates, a single historical date, or a full date range:

| Field | Description |
|-------|-------------|
| `baseCurrency` | Base currency code, e.g. `USD`, `EUR`, `GBP`, `JPY`, `CHF` (default `USD`) |
| `targetCurrencies` | List of target currency codes to return (leave empty for all available) |
| `historicalDate` | Get rates for one specific date (`YYYY-MM-DD`) |
| `dateRange` | Set `true` to pull a range instead of a single date |
| `startDate` / `endDate` | Range bounds (`YYYY-MM-DD`) when `dateRange` is on |
| `maxResults` | Cap the run (1–1000, default 100) |

#### Example input

```json
{
  "baseCurrency": "EUR",
  "targetCurrencies": ["USD", "GBP", "JPY", "CHF"],
  "dateRange": true,
  "startDate": "2026-01-01",
  "endDate": "2026-05-01",
  "maxResults": 100
}
```

### ⬆️ Output

Every rate is one clean row (view as a **table**, or export **JSON / CSV / Excel**):

```json
{
  "base_currency": "EUR",
  "target_currency": "USD",
  "rate": 1.0842,
  "inverse_rate": 0.922339,
  "date": "2026-05-01",
  "extracted_at": "2026-06-26T15:30:00.000000"
}
```

### 💡 Use cases

- **💸 Fintech & accounting apps:** convert invoices, payments and transactions using authoritative reference rates.
- **🛒 E-commerce localization:** show prices in the shopper's currency with up-to-date FX, refreshed on a schedule.
- **🏦 Treasury & finance teams:** track currency exposure and movements across a date range.
- **📊 BI & backtesting:** build FX trend dashboards or pull historical rates to validate financial models.

### ❓ FAQ

**Where does the exchange-rate data come from?** The European Central Bank's official
reference rates, served via a free public API. The data is authoritative and central-bank
sourced.

**Do I need an API key?** No. There's no key, no login and no subscription — just pick a base
currency and run.

**How do I get the latest rates?** Leave `historicalDate` and `dateRange` empty. The actor
returns the most recent published rates for your base currency.

**Can I get rates for a specific past date?** Yes — set `historicalDate` to any `YYYY-MM-DD`
and you'll get that day's snapshot.

**Can I pull a whole date range?** Yes — set `dateRange: true` with `startDate` and `endDate`
to get a full time series, ideal for trend charts and history databases.

**Which currencies are supported?** USD, EUR, GBP, JPY, CHF, CAD, AUD, NZD, CNY, INR and 30+
others. Leave `targetCurrencies` empty to return every available currency for your base.

**What's the inverse rate?** It's the reverse conversion (target → base), pre-calculated on
every record so you don't have to do the math.

**Are weekend rates available?** The ECB publishes on business days only, around 16:00 CET.
Weekends and holidays carry the most recent business-day rate.

**Can I run it on a schedule or via API?** Yes — schedule recurring runs in Apify, call it via
the API/SDK, or connect it to Make, Zapier or n8n to keep your own FX history up to date.

**Is this legal?** It uses the ECB's publicly available reference-rate data, which is published
for public use. You remain responsible for compliant downstream use in financial applications.

### 🔗 You might also like

- **[Yahoo Finance Scraper](https://apify.com/benthepythondev/yahoo-finance-scraper)** — stocks & financial data
- **[CoinGecko Crypto Intelligence](https://apify.com/benthepythondev/coingecko-crypto-intelligence)** — crypto prices & market data
- **[Crypto Intelligence](https://apify.com/benthepythondev/crypto-intelligence)** — cryptocurrency market data
- **[Stock Sentiment Intelligence](https://apify.com/benthepythondev/stock-sentiment-intelligence)** — market sentiment signals

***

**Keywords:** forex scraper, currency exchange rates, ECB rates API, exchange rate API, foreign exchange data, currency converter, historical exchange rates, FX data, USD EUR GBP rates, cross rates, currency conversion API, free forex API, European Central Bank rates, fintech currency data, exchange rate history.

### Workflow and data quality

For best results, run this actor as part of a repeatable data pipeline rather than a one-off scrape. Start with a focused input, export the dataset to CSV or JSON, and keep a stable unique field such as URL, ID, domain, package name or title as your deduplication key. Schedule the same task daily or weekly when you need monitoring, then compare each new dataset with the previous run to identify fresh records, removed records and changed fields.

The output is designed to be practical for business workflows: spreadsheets, dashboards, enrichment steps, alerts, CRM imports and lightweight internal APIs. Null values mean the source did not provide that field, not that the actor guessed. For larger projects, combine this actor with related Apify scrapers and use the shared URL/company/domain fields to build a richer dataset without manual copy-paste work.

# Actor input Schema

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

Base currency code (e.g., USD, EUR, GBP)

## `targetCurrencies` (type: `array`):

List of target currencies to get rates for (leave empty for all)

## `historicalDate` (type: `string`):

Get rates for a specific date (YYYY-MM-DD format, leave empty for latest)

## `dateRange` (type: `boolean`):

Get rates for a date range (requires start and end dates)

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

Start date for range (YYYY-MM-DD)

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

End date for range (YYYY-MM-DD)

## `maxResults` (type: `integer`):

Maximum number of rate entries to return

## Actor input object example

```json
{
  "baseCurrency": "USD",
  "targetCurrencies": [],
  "dateRange": false,
  "maxResults": 100
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("benthepythondev/forex-exchange-intelligence").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("benthepythondev/forex-exchange-intelligence").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 '{}' |
apify call benthepythondev/forex-exchange-intelligence --silent --output-dataset

```

## MCP server setup

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

```

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/qyF4pTV5wzWX04rzI/builds/0qF2xl8usqJVIf6fc/openapi.json
