# ECB Euro Exchange Rates & Currency Converter (`adamplaenitz/ecb-exchange-rates`) Actor

Official euro foreign exchange reference rates of the European Central Bank for 30 currencies: latest rates with daily change, full history since 1999, monthly and yearly averages, cross rates and a currency converter for any date.

- **URL**: https://apify.com/adamplaenitz/ecb-exchange-rates.md
- **Developed by:** [Adam Plänitz](https://apify.com/adamplaenitz) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## ECB Euro Exchange Rates & Currency Converter

**The official euro foreign exchange reference rates of the European Central Bank (ECB) as clean JSON, CSV or Excel: latest rates for about 30 currencies with change to the previous day, the full daily history since 1999, monthly and yearly averages, cross rates for any base currency, and a currency converter for any date.**

*Deutsche Kurzfassung weiter unten.*

### What does it do?

The Actor downloads the complete reference rate history published by the ECB (one file, about 0.6 MB) and returns:

- **Latest rates** – one record per currency with the rate, inverse rate, previous business day's rate and change in %.
- **History** – one record per currency and business day for any period since 4 January 1999, or **monthly / yearly aggregates** (average, minimum, maximum, first and last rate, number of business days) – e.g. yearly average rates for accounting and tax purposes.
- **Currency conversion** – amounts like `100 USD to EUR` or `250 GBP to CHF 2024-03-15`. On weekends and TARGET holidays the last business day before is used, and the record shows which rate date was applied.
- **Cross rates** – with a base currency other than EUR (e.g. USD), all rates are calculated from the ECB euro rates.

Discontinued currencies (e.g. RUB since March 2022, HRK, BGN, legacy currencies) are available for the periods in which the ECB published them.

### Who is it for?

- **Accounting, controlling and tax** – month-end and average rates for foreign-currency invoices and reports.
- **E-commerce and pricing** – a daily feed of reference rates into Google Sheets, a database or a webhook.
- **Analysts and data teams** – long, clean time series without parsing XML or SDMX.
- **Developers** – a scheduled, reliable source for currency tables instead of scraping.

### How to use it

- **Latest rates (default):** mode *Latest*, currencies `USD`, `GBP`, `CHF`, `JPY` (empty = all).
- **Yearly averages 2020–2025:** mode *History*, start `2020-01-01`, end `2025-12-31`, aggregation *Yearly*.
- **Convert invoices:** mode *Convert*, conversions `1250.00 USD to EUR 2025-06-30`, `980 GBP EUR 2025-07-15`.
- **Daily feed:** schedule mode *Latest* on weekdays after 16:30 CET with an integration (Google Sheets, Slack, webhook).

### Input

| Field | Example | Notes |
|---|---|---|
| Mode | `latest` / `history` / `convert` | |
| Currencies | `USD`, `GBP`, `CHF`, `PLN`, `CNY` | empty = all |
| Base currency | `EUR` (default), `USD` | non-EUR base gives cross rates |
| Start date / End date | `2024-01-01`, `1 year` | history mode, default last 30 days |
| Aggregation | `none` / `monthly` / `yearly` | history mode |
| Conversions | `100 USD to EUR`, `250.50 GBP CHF 2024-03-15` | convert mode; amounts like `1,000.50` or `1.000,50` work |
| Max items | `10000` | charged items per run |

Unknown currencies, dates before 1999 or currencies without a rate on the date are returned as free rows with an `error` field.

### Output examples (shortened)

Latest rate:

```json
{
  "date": "2026-11-19",
  "baseCurrency": "EUR",
  "currency": "USD",
  "currencyName": "US dollar",
  "rate": 1.0992,
  "inverseRate": 0.90975255,
  "isCrossRate": false,
  "previousDate": "2026-11-18",
  "previousRate": 1.0968,
  "changePercent": 0.2188,
  "source": "European Central Bank (ECB), euro foreign exchange reference rates",
  "note": "Source: ECB statistics. Reference rates are published for information purposes only; the ECB discourages their use for transactions."
}
```

Conversion:

```json
{
  "input": "250 GBP to CHF 2024-03-16",
  "amount": 250,
  "from": "GBP",
  "to": "CHF",
  "requestedDate": "2024-03-16",
  "rateDate": "2024-03-15",
  "rate": 1.1255122,
  "result": 281.37805,
  "resultRounded": 281.38,
  "isCrossRate": true
}
```

Yearly aggregate: `period`, `periodType`, `average`, `min`, `max`, `first`, `last`, `firstDate`, `lastDate`, `businessDays`. Rates are units of the quoted currency per 1 unit of the base currency. A `RUN-SUMMARY` record in the key-value store lists the latest ECB date and invalid inputs.

### Pricing and speed

See the **Pricing** tab for the current price. Latest rates, historical rates (daily or aggregated) and conversions are charged as separate events; a historical rate costs a fraction of a latest rate. Error rows are free. Latest rates, conversions and aggregated histories take a few seconds; a full daily history of all currencies since 1999 (about 200,000 records) takes several minutes because every record is stored – use monthly or yearly aggregation or a currency list when you do not need every day.

### Data source, terms of use and privacy

- **Source:** [ECB euro foreign exchange reference rates](https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/index.en.html), file `eurofxref-hist.zip` published by the European Central Bank. Rates are usually updated around 16:00 CET on every TARGET working day.
- **Terms:** According to the [ECB disclaimer and copyright notice](https://www.ecb.europa.eu/services/using-our-site/disclaimer/html/index.en.html), information from the ECB website may be used freely provided it is reproduced accurately and the **ECB is cited as the source**; modifications must be stated. Every record carries `source` and `note` fields for this. Cross rates, inverse rates, averages and conversions are **calculated by this Actor** from the ECB euro rates and are not published by the ECB.
- **Information only:** the ECB publishes the reference rates for information purposes only and strongly discourages using them for transactions. The ECB accepts no liability for decisions based on them. Rates the Actor calculates are rounded to 8 significant digits.
- **No personal data** is processed.
- This Actor is an independent tool and is **not affiliated with or endorsed by the European Central Bank**.

### Limits

- Only the about 30 currencies in the ECB reference rate list (no crypto, no intraday or bid/ask rates).
- No rates on weekends and TARGET holidays; conversions fall back to the last business day (up to 10 days back).
- The rates of the current day appear after the ECB publication (around 16:00 CET).

Questions or feature requests? Please open an issue in the **Issues** tab – usually answered within 1–2 working days.

***

### Deutsch (Kurzfassung)

**Die offiziellen Euro-Referenzkurse der Europäischen Zentralbank (EZB): aktuelle Kurse für rund 30 Währungen mit Veränderung zum Vortag, die komplette Tageshistorie seit 1999, Monats- und Jahresdurchschnitte, Kreuzkurse zu jeder Basiswährung und ein Währungsrechner für jedes Datum.**

- Modi: aktuell, Verlauf (täglich oder Monats-/Jahresdurchschnitt), Umrechnung (`100 USD to EUR`, `250 GBP CHF 2024-03-15`; Wochenende/Feiertag → letzter Bankarbeitstag).
- Quelle: EZB (Quellenangabe Pflicht, steht in jedem Datensatz). Referenzkurse dienen laut EZB nur der Information, nicht für Transaktionen. Kreuzkurse, Durchschnitte und Umrechnungen berechnet der Actor. Keine Verbindung zur EZB.

# Actor input Schema

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

latest = latest reference rates with change to the previous business day. history = rates for a period (daily, or monthly/yearly averages). convert = convert amounts between currencies on a given date.

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

ISO codes, e.g. USD, GBP, CHF, JPY, PLN, CNY. Empty = all currencies the ECB currently quotes (about 30); in history mode all currencies with rates in the period.

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

Rates are expressed as units of the currency per 1 unit of the base. EUR = official ECB rates; any other currency (e.g. USD) gives cross rates calculated from the ECB euro rates.

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

History mode: first day (YYYY-MM-DD, earliest 1999-01-04) or relative, e.g. '30 days', '1 year'. Empty = 30 days before the end date.

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

History mode: last day (YYYY-MM-DD) or relative. Empty = today.

## `aggregation` (type: `string`):

History mode: none = one item per business day; monthly / yearly = one item per month or year with average, minimum, maximum, first and last rate.

## `conversions` (type: `array`):

Convert mode: one conversion per line as 'amount FROM to TO \[date]', e.g. '100 USD to EUR', '250.50 GBP CHF 2024-03-15'. Without a date the latest rates are used; on weekends and holidays the last business day before.

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

Upper limit of charged items per run.

## Actor input object example

```json
{
  "mode": "latest",
  "currencies": [
    "USD",
    "GBP",
    "CHF",
    "JPY"
  ],
  "baseCurrency": "EUR",
  "aggregation": "none",
  "conversions": [
    "100 USD to EUR",
    "250 GBP to CHF 2024-03-15"
  ],
  "maxItems": 100000
}
```

# Actor output Schema

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

One item per currency (latest), per currency and day or period (history) or per conversion.

## `summary` (type: `string`):

Mode, latest ECB date, period, invalid inputs and number of items saved.

# 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",
        "CHF",
        "JPY"
    ],
    "conversions": [
        "100 USD to EUR",
        "250 GBP to CHF 2024-03-15"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("adamplaenitz/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",
        "CHF",
        "JPY",
    ],
    "conversions": [
        "100 USD to EUR",
        "250 GBP to CHF 2024-03-15",
    ],
}

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

```

## MCP server setup

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