# ECB Exchange Rates API — Official Euro FX Rates, History (`factpipe/ecb-exchange-rates`) Actor

Official European Central Bank euro reference exchange rates: latest or full daily history since 1999 for 30+ currencies, any base currency via cross rates. No API key. $1 per 1,000 rates.

- **URL**: https://apify.com/factpipe/ecb-exchange-rates.md
- **Developed by:** [Neo B](https://apify.com/factpipe) (community)
- **Categories:** Developer tools, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 rate 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

## ECB Exchange Rates API — Official Euro FX Rates, History

Get the **official European Central Bank euro reference exchange rates** — the benchmark used for invoicing, accounting and VAT conversions across Europe — as clean, flat JSON. Latest rates or full **daily history back to 1999**, for every currency the ECB publishes, with **any base currency** through exact cross rates. Straight from the ECB data API: no key, no scraping, no stale mirrors.

### Quick start

1. Click **Start** with the four prefilled currencies with no dates. It finishes in under a minute.
2. You get the latest official ECB reference rate for USD, GBP, JPY and CHF.
3. That first run costs $0.004, well within Apify's free monthly credit. Then swap in your own input or schedule it.

### What you get

```json
{
  "date": "2026-09-14",
  "base_currency": "EUR",
  "quote_currency": "USD",
  "rate": 1.1551,
  "inverse_rate": 0.86572591,
  "eur_per_base": 1,
  "eur_per_quote": 0.86572591,
  "source": "ECB euro foreign exchange reference rates",
  "source_url": "https://data-api.ecb.europa.eu/service/data/EXR/D.USD.EUR.SP00.A?format=csvdata&detail=dataonly&lastNObservations=1",
  "fetched_at": "2026-09-15T12:00:00.000Z"
}
```

### Use cases

- **Accounting & invoicing**: convert foreign-currency invoices at the official ECB reference rate for the invoice date.
- **Finance dashboards**: daily scheduled run pushes the latest rates to Google Sheets, Slack or your database.
- **Backtesting & analytics**: pull decades of daily history for any currency pair in one run.
- **AI agents**: tiny input, deterministic output — ideal via API or the Apify MCP server.

### Input

| Field | Type | Notes |
|---|---|---|
| `currencies` | string\[] | ISO codes, e.g. `USD`, `GBP`; empty = all |
| `baseCurrency` | string | Default `EUR`; others via cross rates |
| `startDate` / `endDate` | `YYYY-MM-DD` | Leave empty for the latest rates |
| `maxResults` | integer | Cap on charged rows (default 10,000) |

### Pricing (pay per event)

| Event | Price | Meaning |
|---|---|---|
| `rate-result` | **$1.00 per 1,000** ($0.001 each) | One exchange rate row (date + currency pair) delivered. Unknown or discontinued currencies and empty runs are never charged. |

Example: one year of daily rates for 4 currencies (~1,020 rows) costs **about $1.02**. No start fee. You only pay for delivered results.

### Related factpipe Actors

- [EU VAT Number Validation API — VIES Bulk Checker](https://apify.com/factpipe/eu-vat-validation) — EU VAT number validation via VIES
- [EU Tenders Scraper — TED Public Procurement Notices API](https://apify.com/factpipe/eu-ted-tenders-monitor) — EU public procurement tenders

### FAQ

**Do I need an API key?**
No. The ECB data API is open. The Actor needs no key or account.

**How often are rates updated?**
The ECB publishes reference rates once per working day at around 16:00 CET. There are no rates on weekends and TARGET holidays, so those dates are simply absent.

**Can I get USD-based or GBP-based rates?**
Yes. Set `baseCurrency` to any published currency. Cross rates are computed exactly from the two ECB euro rates for the same date.

**What about currencies the ECB stopped publishing?**
Discontinued currencies (for example ARS, or BGN after Bulgaria adopted the euro) are reported as not found in latest-rate mode and never charged. Their history is still available with a date range.

**Can I call it from Python, JavaScript, Make, Zapier or an AI agent?**
Yes. Run it through the Apify API or official Python/JavaScript clients, connect it to Make, Zapier, n8n, Slack or Google Sheets via Apify integrations, or expose it to AI agents through the Apify MCP server. Input is small and output is deterministic flat JSON.

### Reliability

Deterministic code against official sources, automatic retries with backoff, structured failure reporting, daily health checks and issue triage.

# Actor input Schema

## `currencies` (type: `array`):

ISO 4217 codes to quote, e.g. USD, GBP, JPY. Leave empty for all currencies the ECB publishes.

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

Rates are expressed as units of each currency per 1 unit of this base. EUR gives official ECB values; any other code uses exact cross rates via EUR.

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

YYYY-MM-DD. Leave both dates empty for the latest rates.

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

YYYY-MM-DD, inclusive.

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

Cap on charged rate rows.

## Actor input object example

```json
{
  "currencies": [
    "USD",
    "GBP",
    "JPY",
    "CHF"
  ],
  "baseCurrency": "EUR",
  "maxResults": 10000
}
```

# Actor output Schema

## `resultsDatasetUrl` (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 = {
    "currencies": [
        "USD",
        "GBP",
        "JPY",
        "CHF"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("factpipe/ecb-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 = { "currencies": [
        "USD",
        "GBP",
        "JPY",
        "CHF",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("factpipe/ecb-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 '{
  "currencies": [
    "USD",
    "GBP",
    "JPY",
    "CHF"
  ]
}' |
apify call factpipe/ecb-exchange-rates --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,factpipe/ecb-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/wL3rvAFzZkdp3GJgh/builds/AMcG8usEaNvy5xviZ/openapi.json
