# Currency Exchange Rates: ECB Latest & Historical (`pankajbhatia/currency-exchange-rates-ecb`) Actor

Official European Central Bank reference exchange rates for 30 currencies: latest, any date since 1999, or a daily time series, with any base currency and amount conversion. Fast, cheap and reliable for finance sheets, ecommerce and reports.

- **URL**: https://apify.com/pankajbhatia/currency-exchange-rates-ecb.md
- **Developed by:** [Pankaj Bhatia](https://apify.com/pankajbhatia) (community)
- **Categories:** Business, E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## Currency Exchange Rates: ECB Latest & Historical

Get official **European Central Bank (ECB) reference exchange rates** for about 30 major currencies: the **latest** rates, rates on **any date since 1999**, or a daily **time series**. Use any base currency (USD, EUR, GBP, INR, JPY and more) and optionally convert an amount. Data is served by the free Frankfurter API, which publishes the ECB's daily reference rates. No login, no API key.

### Who is it for?

- **Finance and accounting teams** converting invoices and reports at official rates.
- **Ecommerce stores** updating multi-currency prices on a schedule.
- **Analysts and spreadsheet users** who need clean historical FX data.
- **Developers and automations** (Make, Zapier, n8n) that need a reliable rates step.

### How to use it

1. Set **base currencies** (e.g. USD) and **target currencies** (leave empty for all).
2. Pick a **mode**: Latest, One date, or Time series (start/end date or last N days).
3. Optionally set an **amount** to convert.
4. Click **Start**, or schedule it daily after the ECB update (around 16:00 CET).

### Input example

```json
{"baseCurrencies": ["USD"], "targetCurrencies": ["EUR", "GBP", "INR"], "mode": "timeseries", "lastDays": 30}
```

### Output example

```json
{"date": "2026-10-23", "baseCurrency": "EUR", "currency": "JPY", "currencyName": "Japanese Yen", "amount": 100, "value": 17551, "rate": 175.51, "inverseRate": 0.00569768, "source": "European Central Bank reference rates via Frankfurter"}
```

One row per date and currency, so time series drop straight into a spreadsheet or chart.

### How much does it cost?

Pay-per-event: a very small fee **per rate** returned, plus a tiny per-run start fee, with no subscription and no separate platform usage costs. For example, 1,000 rates cost about $0.30. Unsupported currencies are **not charged**. Set **Maximum cost per run** to cap your spending.

### Use it through the API, integrations or AI agents

Run it from the Apify API, on a schedule, or connect it to Make, Zapier, n8n or Google Sheets. AI agents can find and call it through the Apify MCP server. Output is clean JSON with the same fields on every run.

### FAQ

**Is it legal?** Yes. The ECB publishes its euro reference rates for public information, and Frankfurter is a free, open-source API that serves them without an API key.

**Which currencies are supported?** The ECB list: AUD, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR, ILS, INR, ISK, JPY, KRW, MXN, MYR, NOK, NZD, PHP, PLN, RON, SEK, SGD, THB, TRY, USD and ZAR. Others return a free error row.

**Are these trading rates?** No. They are official daily reference rates (one per working day), ideal for accounting and reporting, not live trading.

### More tools from this developer

- [SAM.gov Contract Opportunities Finder & Bid Alerts](https://apify.com/pankajbhatia/sam-gov-contract-opportunities): federal contract opportunities and bid alerts
- [Sitemap & URL Extractor](https://apify.com/pankajbhatia/sitemap-url-extractor): get every URL of a website from its sitemaps
- [Website to Markdown for AI & RAG](https://apify.com/pankajbhatia/website-to-markdown): turn web pages into clean Markdown for LLMs
- [Tech Stack Detector](https://apify.com/pankajbhatia/tech-stack-detector): find what any website is built with
- [Apple App Store Reviews Scraper](https://apify.com/pankajbhatia/app-store-reviews): App Store reviews and ratings for any app
- [ATS Jobs Scraper](https://apify.com/pankajbhatia/ats-jobs-scraper): jobs from Greenhouse, Lever, Ashby, Workable and more
- [Website Screenshot](https://apify.com/pankajbhatia/website-screenshot): full-page, mobile and PDF screenshots in bulk
- [PDF to Text & Markdown Extractor](https://apify.com/pankajbhatia/pdf-text-extractor): extract text from PDFs for AI and search
- [Domain WHOIS, DNS & SSL Checker](https://apify.com/pankajbhatia/domain-whois-dns-ssl-checker): bulk domain, DNS, email security and SSL checks
- [SEO Meta Tags & On-Page Audit](https://apify.com/pankajbhatia/seo-meta-tags-checker): bulk on-page SEO audit with fixes
- [Bulk URL Status & Broken Link Checker](https://apify.com/pankajbhatia/url-status-broken-link-checker): status codes, redirect chains and broken links
- [RSS & Atom Feed Reader](https://apify.com/pankajbhatia/rss-feed-reader): merge and filter many news feeds
- [Hacker News Scraper](https://apify.com/pankajbhatia/hacker-news-scraper): HN stories, comments and Who is hiring jobs
- [Academic Paper Search](https://apify.com/pankajbhatia/academic-paper-search): papers from Crossref, arXiv and PubMed
- [SEC EDGAR Filings & Financials](https://apify.com/pankajbhatia/sec-edgar-filings-financials): 10-K, 10-Q, 8-K filings and company financials
- [Apple Podcasts Scraper](https://apify.com/pankajbhatia/apple-podcasts-scraper): podcast details and full episode lists
- [App Store Top Charts & App Search](https://apify.com/pankajbhatia/app-store-top-charts): top free, paid and grossing app rankings
- [ClinicalTrials.gov Scraper](https://apify.com/pankajbhatia/clinicaltrials-gov-scraper): search and export clinical trials
- [USAspending Federal Awards](https://apify.com/pankajbhatia/usaspending-federal-awards): who won federal contracts and grants
- [Grants.gov Opportunities](https://apify.com/pankajbhatia/grants-gov-opportunities): open and forecasted federal grants
- [Weather Forecast & Alerts](https://apify.com/pankajbhatia/weather-forecast-alerts): 9-day forecasts for any city, plus U.S. alerts
- [EU TED Tenders Scraper](https://apify.com/pankajbhatia/ted-eu-tenders-scraper): European public procurement notices
- [Bulk Domain Availability Checker](https://apify.com/pankajbhatia/bulk-domain-availability-checker): check which domains are free to register
- [Product Recalls Scraper](https://apify.com/pankajbhatia/product-recalls-fda-cpsc-nhtsa): FDA, CPSC and NHTSA vehicle recalls
- [Federal Register Scraper](https://apify.com/pankajbhatia/federal-register-documents): U.S. rules, notices and comment deadlines
- [npm & PyPI Package Stats](https://apify.com/pankajbhatia/npm-pypi-package-stats): downloads, versions and licenses for packages
- [Open Library Books Scraper](https://apify.com/pankajbhatia/open-library-books-scraper): book search and ISBN lookup
- [UK Contracts Finder Scraper](https://apify.com/pankajbhatia/uk-contracts-finder-scraper): UK public tenders and contract awards
- [Wikipedia Scraper](https://apify.com/pankajbhatia/wikipedia-scraper): articles, full text and page views

# Actor input Schema

## `baseCurrencies` (type: `array`):

Convert from these currencies, e.g. USD, EUR, GBP.

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

Convert to these currencies (empty = all 30).

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

Latest rates, one past date, or a time series.

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

For One date mode: YYYY-MM-DD (since 1999-01-04).

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

For Time series mode: YYYY-MM-DD (optional).

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

For Time series mode: YYYY-MM-DD (optional, default today).

## `lastDays` (type: `integer`):

For Time series mode when no start date is given.

## `amount` (type: `number`):

Amount to convert (1 = plain rate).

## Actor input object example

```json
{
  "baseCurrencies": [
    "USD"
  ],
  "targetCurrencies": [
    "EUR",
    "GBP",
    "JPY",
    "INR",
    "CAD"
  ],
  "mode": "latest",
  "lastDays": 30,
  "amount": 1
}
```

# Actor output Schema

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

One row per date and currency with rate, inverse rate and converted amount.

# 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 = {
    "baseCurrencies": [
        "USD"
    ],
    "targetCurrencies": [
        "EUR",
        "GBP",
        "JPY",
        "INR",
        "CAD"
    ],
    "lastDays": 30,
    "amount": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("pankajbhatia/currency-exchange-rates-ecb").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 = {
    "baseCurrencies": ["USD"],
    "targetCurrencies": [
        "EUR",
        "GBP",
        "JPY",
        "INR",
        "CAD",
    ],
    "lastDays": 30,
    "amount": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("pankajbhatia/currency-exchange-rates-ecb").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 '{
  "baseCurrencies": [
    "USD"
  ],
  "targetCurrencies": [
    "EUR",
    "GBP",
    "JPY",
    "INR",
    "CAD"
  ],
  "lastDays": 30,
  "amount": 1
}' |
apify call pankajbhatia/currency-exchange-rates-ecb --silent --output-dataset

```

## MCP server setup

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

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/R6yOVHZwr4W65RUhr/builds/iBxoR6TurChvRSV87/openapi.json
