# European Central Bank API

> European Central Bank workflow and API: euro exchange rates, convert currency and key interest rates. Returns rates, page url, currency code and currency…

European Central Bank data from ecb.europa.eu: euro exchange rates, convert currency and key interest rates.

- Page: https://fous.com/workflows/european-central-bank
- Handle: `@european-central-bank`
- Category: [Finance](https://fous.com/workflows/category/finance)
- Source website: https://ecb.europa.eu
- Last verified: Sep 30, 2026
- Fous is not affiliated with European Central Bank.

## Methods

### Convert currency

Operation `convert_currency`, version 1. 1 credit per call.

Convert an amount between currencies using the ECB euro reference rates, including euro and cross-currency conversions. Dates without a published rate use the latest preceding rate; only currencies with an ECB rate on that date are available. Reference rates are informational, not transaction rates.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `date` | string | no | `"2026-09-26"` | Requested rate date in YYYY-MM-DD, for example 2026-09-26. Defaults to the latest published day; non-publication dates use the preceding published rate. |
| `amount` | number | yes | `250` | Amount of money to convert, for example 250. |
| `to_currency` | string | yes | `"GBP"` | Currency name or three-letter code to convert to, for example GBP or pound sterling. |
| `from_currency` | string | yes | `"US dollar"` | Currency name or three-letter code to convert from, for example US dollar or USD. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "amount",
    "from_currency",
    "to_currency"
  ],
  "properties": {
    "date": {
      "type": "string",
      "format": "date",
      "examples": [
        "2026-09-26"
      ],
      "description": "Requested rate date in YYYY-MM-DD, for example 2026-09-26. Defaults to the latest published day; non-publication dates use the preceding published rate."
    },
    "amount": {
      "type": "number",
      "examples": [
        250
      ],
      "description": "Amount of money to convert, for example 250."
    },
    "to_currency": {
      "type": "string",
      "title": "To",
      "examples": [
        "GBP"
      ],
      "description": "Currency name or three-letter code to convert to, for example GBP or pound sterling."
    },
    "from_currency": {
      "type": "string",
      "title": "From",
      "examples": [
        "US dollar"
      ],
      "description": "Currency name or three-letter code to convert from, for example US dollar or USD."
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "amount": 250,
      "to_currency": "GBP",
      "from_currency": "US dollar"
    },
    {
      "date": "2026-09-26",
      "amount": 100,
      "to_currency": "Japanese yen",
      "from_currency": "euro"
    },
    {
      "date": "2026-09-28",
      "amount": 10,
      "to_currency": "EUR",
      "from_currency": "GBP"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `rate` | number | `0.753955` | Units of the To currency per one unit of the From currency, rounded to six decimal places. |
| `page_url` | string | `"https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/index.en.html"` | ECB euro reference rates page. |
| `rate_date` | string | `"2026-09-28"` | Date of the ECB reference rates actually used. |
| `converted_amount` | number | `188.49` | Converted amount, rounded to two decimal places. |
| `to_currency_code` | string | `"GBP"` | Three-letter code of the destination currency. |
| `to_currency_name` | string | `"Pound sterling"` | Name of the destination currency. |
| `from_currency_code` | string | `"USD"` | Three-letter code of the source currency. |
| `from_currency_name` | string | `"US dollar"` | Name of the source currency. |

**Example input**

```json
{
  "amount": 250,
  "to_currency": "GBP",
  "from_currency": "US dollar"
}
```

**Example output**

```json
{
  "rate": 0.753955,
  "page_url": "https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/index.en.html",
  "rate_date": "2026-09-28",
  "converted_amount": 188.49,
  "to_currency_code": "GBP",
  "to_currency_name": "Pound sterling",
  "from_currency_code": "USD",
  "from_currency_name": "US dollar"
}
```

### Get euro exchange rates

Operation `get_euro_exchange_rates`, version 1. 1 credit per call.

Get official ECB euro exchange reference rates for a day, or the latest published day. Returns the previous published day for weekends, holidays and dates before publication; currencies not published on that day cannot be returned.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `date` | string | no | `"2026-09-26"` | Day to look up, for example 2026-09-26. Defaults to the latest published day. |
| `currencies` | array | no |  | Currency names or codes, for example ["US dollar", "JPY"]. Defaults to every currency published on the rate date. |

**Input schema**

```json
{
  "type": "object",
  "properties": {
    "date": {
      "type": "string",
      "format": "date",
      "description": "Day to look up, for example 2026-09-26. Defaults to the latest published day.",
      "examples": [
        "2026-09-26",
        "2000-01-08"
      ]
    },
    "currencies": {
      "type": "array",
      "items": {
        "type": "string",
        "examples": [
          "US dollar",
          "JPY",
          "Cypriot pound"
        ],
        "description": "Use the same format as these example values: \"US dollar\", \"JPY\", \"Cypriot pound\"."
      },
      "default": [],
      "description": "Currency names or codes, for example [\"US dollar\", \"JPY\"]. Defaults to every currency published on the rate date.",
      "examples": [
        [
          "US dollar",
          "JPY"
        ],
        [
          "Cypriot pound",
          "USD"
        ]
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "date": "2026-09-26",
      "currencies": [
        "US dollar",
        "JPY"
      ]
    },
    {},
    {
      "date": "2000-01-08",
      "currencies": [
        "Cypriot pound",
        "USD"
      ]
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `rates` | array |  | Exchange rates in ECB order. |
| `rates[].page_url` | string | `"https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/eurofxref-graph-usd.en.htm` | ECB page for this currency. |
| `rates[].currency_code` | string | `"USD"` |  |
| `rates[].currency_name` | string | `"US dollar"` |  |
| `rates[].units_per_euro` | number | `1.1403` | Units of this currency for 1 euro. |
| `rate_date` | string | `"2026-09-25"` | Date of the published rates. |

**Example input**

```json
{
  "date": "2026-09-26",
  "currencies": [
    "US dollar",
    "JPY"
  ]
}
```

**Example output**

```json
{
  "rates": [
    {
      "page_url": "https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/eurofxref-graph-usd.en.html",
      "currency_code": "USD",
      "currency_name": "US dollar",
      "units_per_euro": 1.1403
    },
    {
      "page_url": "https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/eurofxref-graph-jpy.en.html",
      "currency_code": "JPY",
      "currency_name": "Japanese yen",
      "units_per_euro": 179.7
    }
  ],
  "rate_date": "2026-09-25"
}
```

### Get key interest rates

Operation `get_key_interest_rates`, version 1. 1 credit per call.

Get the ECB’s current deposit, main refinancing, and marginal lending rates and their effective date. Optionally include earlier rate changes, newest first; rates not shown for an earlier change are null.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `max_results` | integer | no | `100` | Maximum number of earlier changes to return when history is included. Example: 10. |
| `include_history` | boolean | no | `true` | Include earlier changes to the ECB’s key rates, newest first. Example: true. |

**Input schema**

```json
{
  "type": "object",
  "properties": {
    "max_results": {
      "type": "integer",
      "default": 10,
      "maximum": 100,
      "minimum": 1,
      "description": "Maximum number of earlier changes to return when history is included. Example: 10.",
      "x-fous-developer": true,
      "examples": [
        100,
        4
      ]
    },
    "include_history": {
      "type": "boolean",
      "default": false,
      "description": "Include earlier changes to the ECB’s key rates, newest first. Example: true.",
      "examples": [
        true
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {},
    {
      "max_results": 100,
      "include_history": true
    },
    {
      "max_results": 4,
      "include_history": true
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `history` | array |  | Earlier rate changes, newest first, when requested. |
| `history[].page_url` | string | `"https://www.ecb.europa.eu/stats/policy_and_exchange_rates/key_ecb_interest_rates/html/index.en.html"` | ECB page showing this change. |
| `history[].effective_date` | string | `"2026-06-17"` | Date these rates took effect (YYYY-MM-DD). |
| `history[].deposit_facility_rate_percent` | number or null | `2.25` | Annual interest rate in percent, or null if this rate is not shown for this change. |
| `history[].marginal_lending_facility_rate_percent` | number or null | `2.65` | Annual interest rate in percent, or null if this rate is not shown for this change. |
| `history[].main_refinancing_operations_rate_percent` | number or null | `2.4` | Annual interest rate in percent, or null if this rate is not shown for this change. |
| `page_url` | string | `"https://www.ecb.europa.eu/stats/policy_and_exchange_rates/key_ecb_interest_rates/html/index.en.html"` | ECB page showing the rates. |
| `effective_date` | string | `"2026-09-16"` | Date current rates took effect (YYYY-MM-DD). |
| `deposit_facility_rate_percent` | number | `2.5` | Annual interest rate, in percent (2.0 means 2.0%). |
| `marginal_lending_facility_rate_percent` | number | `2.9` | Annual interest rate, in percent (2.0 means 2.0%). |
| `main_refinancing_operations_rate_percent` | number | `2.65` | Annual interest rate, in percent (2.0 means 2.0%). |

**Example input**

```json
{}
```

**Example output**

```json
{
  "page_url": "https://www.ecb.europa.eu/stats/policy_and_exchange_rates/key_ecb_interest_rates/html/index.en.html",
  "effective_date": "2026-09-16",
  "deposit_facility_rate_percent": 2.5,
  "marginal_lending_facility_rate_percent": 2.9,
  "main_refinancing_operations_rate_percent": 2.65
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@european-central-bank",
  "visibility": "public",
  "operation": "convert_currency",
  "version": 1,
  "input": {
    "amount": 250,
    "to_currency": "GBP",
    "from_currency": "US dollar"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@european-central-bank\",\n  \"visibility\": \"public\",\n  \"operation\": \"convert_currency\",\n  \"version\": 1,\n  \"input\": {\n    \"amount\": 250,\n    \"to_currency\": \"GBP\",\n    \"from_currency\": \"US dollar\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@european-central-bank",
  "visibility": "public",
  "operation": "convert_currency",
  "version": 1,
  "input": {
    "amount": 250,
    "to_currency": "GBP",
    "from_currency": "US dollar"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@european-central-bank","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## FAQ

### Is Fous affiliated with European Central Bank?

No. Fous is not affiliated with European Central Bank. This workflow reads the public ecb.europa.eu website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a European Central Bank account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from ecb.europa.eu when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 30, 2026.

## Related

- [XE API](https://fous.com/workflows/xe.md): XE returns currency conversions and mid-market rates, including current displayed rates for information and published historical daily rates for available UTC dates.
- [US Treasury API](https://fous.com/workflows/us-treasury.md): US Treasury provides official daily interest rates and national debt figures for requested or latest available dates, plus quarterly reporting exchange rates using the latest preceding quarter when needed.
- [Wise API](https://fous.com/workflows/wise.md): Wise provides current mid-market exchange rates, optional daily rate history, published transfer cost comparisons and delivery estimates, and bank SWIFT/BIC codes and branch locations when available.
- [Bankrate API](https://fous.com/workflows/bankrate.md): Bankrate provides personal finance information, national-average mortgage and refinance rates with published dates, and listed savings, CD, and money market rates that may change daily.
- [Google Finance API](https://fous.com/workflows/google-finance.md): Google Finance returns possibly delayed prices and figures, indexes, up to four movers timed by oldest quote, currency conversions, and up to five financial periods.
- [Eurostat API](https://fous.com/workflows/eurostat.md): Official European statistics from Eurostat.
- [Trading Economics API](https://fous.com/workflows/trading-economics.md): Trading Economics provides economic indicators, market data and country statistics, including country overviews, latest reported country comparisons and current commodity prices reflecting reported trading days.
- [Investing.com API](https://fous.com/workflows/investing-com.md): Investing.com provides financial markets data and news, economic releases up to 31 days, and current commodity prices and government bond yields, which may be delayed or indicative.
- [All Finance workflows](https://fous.com/workflows/category/finance)
