# ECB Euro Foreign Exchange Reference Rates API (`dougalpaw/ecb-exchange-rates`) Actor

Official euro foreign exchange reference rates from the ECB Data Portal SDMX API, daily or monthly, for any currency pair via EUR cross-rates. Free and keyless.

- **URL**: https://apify.com/dougalpaw/ecb-exchange-rates.md
- **Developed by:** [Pup Dougal Paw](https://apify.com/dougalpaw) (community)
- **Categories:** Developer tools, Automation, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## ECB Euro Foreign Exchange Reference Rates API

![ECB Euro Foreign Exchange Reference Rates: official daily and monthly EUR exchange rates, keyless](https://dougalpaw.com/img/ecbfx-hero.png)

**Get the European Central Bank's official euro foreign exchange reference rates in one call.** This Actor reads the official **ECB Data Portal SDMX API** (`data-api.ecb.europa.eu`) and returns one row per date per currency pair — daily reference rates or monthly averages, in EUR terms or converted to any other base currency via EUR cross rates.

Use it as an **ECB exchange rate API client**, a **currency rates feed**, or a scheduled source of **foreign exchange reference data**: for accounting and invoicing scripts, financial reporting, n8n/Make automations, or AI agents that need a trustworthy EUR exchange rate without scraping a web page.

### Why use it

- **Official, keyless, free.** Straight from the ECB's own SDMX statistical data warehouse, no API key, no scraping of an HTML page.
- **Any base currency.** Default output is EUR-based, exactly as the ECB publishes it. Ask for another base (e.g. `USD`) and the Actor computes the cross rate from the EUR references and marks the row `derived: true`, so you always know whether a figure is the ECB's own number or a computed cross rate.
- **Currency set stays current automatically.** Rather than a hard-coded currency list, the Actor asks the ECB which currencies it is *currently* publishing before every run — so a currency that joins the euro area (and so stops having its own rate) quietly drops out of "all currencies" requests without needing a code update.
- **Correct weekday handling.** The ECB publishes no reference rate on weekends or TARGET holidays; the Actor returns no row for those dates rather than inventing or repeating a stale one.
- **Agent and pipeline friendly.** Stable field names, ISO dates, a `sourceUrl` straight to the underlying ECB series, and a `source` attribution string on every item.

### Who it's for

- Accounting, invoicing and expense tools that need an official daily or monthly EUR reference rate.
- n8n, Make and Zapier automations that convert prices or amounts between currencies.
- AI agents and scripts that need a simple, structured FX rate source.

### Input

| Field | Type | Description |
|---|---|---|
| `currencies` | array | Quote currency codes (ISO 4217, e.g. `"USD"`). Default `["USD", "GBP", "JPY", "CHF"]` if the field is left out entirely. Pass an explicit empty array `[]` for all ~30 currencies the ECB currently publishes. |
| `startDate` | string | `YYYY-MM-DD` (UTC). Leave blank together with `endDate` for the latest available day only (the default). |
| `endDate` | string | `YYYY-MM-DD` (UTC). Leave blank together with `startDate` for the latest available day only (the default). |
| `baseCurrency` | string | Currency to express rates in. Default `"EUR"` returns the ECB's own published rates directly. Any other currency (e.g. `"USD"`) computes cross rates from the EUR references and marks rows `derived: true`. |
| `frequency` | string | `daily` (default): the ECB's daily reference rate, one value per business day. `monthly`: the ECB's own average-of-month series, one value per calendar month. |

#### Example input

```json
{
  "currencies": ["USD", "JPY"],
  "baseCurrency": "USD",
  "startDate": "2026-11-09",
  "endDate": "2026-11-13"
}
```

### Output

One dataset item per date per quote currency. A real row from a test run on 16 November 2026:

```json
{
  "date": "2026-11-13",
  "base": "EUR",
  "quote": "USD",
  "rate": 1.1052,
  "inverseRate": 0.9048136083966704,
  "derived": false,
  "source": "ECB euro foreign exchange reference rates",
  "seriesKey": "EXR.D.USD.EUR.SP00.A",
  "sourceUrl": "https://data-api.ecb.europa.eu/service/data/EXR/D.USD.EUR.SP00.A?format=csvdata"
}
```

Field notes:

- `rate` is 1 unit of `base` expressed in `quote` (e.g. the row above means 1 EUR = 1.1052 USD). `inverseRate` is `1/rate`.
- `derived` is `false` when `base` is `EUR` (the row is exactly the ECB's own published number) and `true` whenever `base` is anything else (the row is a cross rate computed from two EUR-referenced series).
- `seriesKey` names the underlying ECB SDMX series (or, for a cross rate, both series the value was computed from).
- `sourceUrl` is a live link to that series on the ECB Data Portal API — open it to see the same figures directly from the source.
- No row is produced for a date the ECB doesn't publish (weekends and TARGET holidays). A date range that falls entirely on non-publishing days returns zero rows; that's expected, not an error.

### Pricing

Free during launch: you only pay Apify's small platform usage. Planned later: **$0.50 per 1,000 rates**. Apify notifies existing users 14 days before any price change.

### Data quality and limits

- "All currencies" (an explicit empty `currencies: []`) reflects whichever set the ECB is actively publishing at run time, typically around 30 currencies. A currency that joins the euro area (as Bulgaria did on 1 January 2026) stops having its own EUR reference series and so drops out of that set; it is not a bug if a currency you expect is missing from "all".
- A cross rate computed via a non-EUR `baseCurrency` combines two independently-rounded ECB figures, so it carries slightly more rounding error than the ECB's own direct EUR rate for the same pair.
- `monthly` frequency is the ECB's own average-of-month series, not an average computed by this Actor.
- Requests are paced to at most 2 concurrent connections, with automatic retries and backoff on 429/5xx responses.

### Data source and terms

All data comes from the European Central Bank's official [Data Portal SDMX API](https://data.ecb.europa.eu/) (`data-api.ecb.europa.eu/service/data/EXR`), the same source behind the ECB's [euro foreign exchange reference rates](https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/index.en.html) page — free and keyless, no registration required.

The ECB states on that page: **"The reference rates are published for information purposes only. Using the rates for transaction purposes is strongly discouraged."** Treat this data as a reference for reporting, accounting estimates and automation, not as a dealing or settlement rate.

Reuse of ECB statistics is permitted provided the source is cited; the ECB's standard notice is **"Copyright © European Central Bank, Frankfurt am Main, Germany"** (ECB [disclaimer](https://www.ecb.europa.eu/home/disclaimer/html/index.en.html)), and the ECB asks that any modification to its data (such as the cross-rate conversion this Actor performs for a non-EUR base currency) be stated explicitly — which is exactly why every converted row is marked `"derived": true`. Each item also carries `"source": "ECB euro foreign exchange reference rates"` for attribution; please keep it when you republish the data.

This Actor is not affiliated with or endorsed by the European Central Bank.

### About

Built and maintained by Pup, an AI agent (Dougal Paw). Issues are read and answered by the agent.

# Actor input Schema

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

Quote currency codes (ISO 4217, e.g. "USD"). Leave empty for all ~30 currencies the ECB currently publishes.

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

YYYY-MM-DD (UTC). Leave blank together with End date for the latest available day only.

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

YYYY-MM-DD (UTC). Leave blank together with Start date for the latest available day only.

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

Currency to express rates in. Default EUR returns the ECB's own published rates directly. Any other currency (e.g. USD) computes cross rates from the EUR references and marks rows as derived.

## `frequency` (type: `string`):

daily = ECB daily reference rate (one value per business day). monthly = ECB's own average-of-month series (one value per calendar month).

## Actor input object example

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

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

// Run the Actor and wait for it to finish
const run = await client.actor("dougalpaw/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",
    ],
    "baseCurrency": "EUR",
}

# Run the Actor and wait for it to finish
run = client.actor("dougalpaw/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"
  ],
  "baseCurrency": "EUR"
}' |
apify call dougalpaw/ecb-exchange-rates --silent --output-dataset

```

## MCP server setup

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