# MNB, NBP & CNB Exchange Rates: Hungary, Poland, Czechia (`sysco32/cee-central-bank-fx-rates`) Actor

Official daily exchange rates from the Hungarian (MNB), Polish (NBP) and Czech (CNB) central banks: date ranges or 'rate for this invoice date' lookups, HUF/PLN/CZK, one clean dataset.

- **URL**: https://apify.com/sysco32/cee-central-bank-fx-rates.md
- **Developed by:** [Gabor Sziladi](https://apify.com/sysco32) (community)
- **Categories:** Developer tools, Automation, Integrations
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 rate records

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

## MNB, NBP & CNB Exchange Rates: Hungary, Poland, Czechia

Get **official daily exchange rates** from three Central European central banks in one clean dataset: the **Hungarian MNB (HUF)**, the **Polish NBP (PLN)** and the **Czech CNB (CZK)**. Pick currencies and a date range, or paste your **invoice dates** and get exactly one official rate per date. It costs **$0.50 per 1,000 rate records**, and a default run returns about 30 records in under 10 seconds.

- ✅ **MNB, NBP and CNB in one run**, with one normalised record per bank, currency and day
- ✅ **Invoice / lookup mode**: one rate per date, with a clear "same day or previous" or "previous business day" rule
- ✅ `ratePerUnit` normalises 100-unit quotes (JPY, HUF…) so the three banks are directly comparable
- ✅ NBP **table number** (e.g. `201/A/NBP/2026`), which Polish bookkeeping often has to record
- ✅ Up to 10 years of history per run
- ✅ One failing bank never fails the run; errors are listed in the `OUTPUT` summary
- ✅ Official public sources only. No API key, no login, no proxy.

| Bank | Country | Base currency | Data used |
|---|---|---|---|
| **MNB** (Magyar Nemzeti Bank) | Hungary | HUF | Official daily MNB rates (public rate table on mnb.hu) |
| **NBP** (Narodowy Bank Polski) | Poland | PLN | Table A mid rates from the official NBP API (api.nbp.pl) |
| **CNB** (Česká národní banka) | Czechia | CZK | Daily rates from the official CNB API (api.cnb.cz) |

Use it for bookkeeping, foreign-currency invoices, VAT and tax reporting, price lists, ERP or spreadsheet imports, dashboards, or as a tool for AI agents that need the *official* local rate rather than a market feed.

### Two modes

1. **Date range**: every published rate for your currencies between `startDate` and `endDate`. The default is the last 7 days.
2. **Lookup / invoice mode**: give a list of `lookupDates` (for example invoice or transaction dates) and get **one rate per bank, currency and date** using a clear rule:

   - `sameDayOrPrevious`: the rate published on that day, or the latest earlier one (weekends and holidays).
   - `previousBusinessDay`: the latest rate published *strictly before* that day.

   Which rule your tax or accounting rules require depends on your country and situation, so please confirm with your accountant. This Actor only returns the official published numbers. Dates with no applicable rate (future dates, or a currency the bank does not quote) are listed in `OUTPUT.lookups_without_rate` and **are not charged**.

### Input

| Field | Type | Default | Notes |
|---|---|---|---|
| `sources` | array | `["MNB","NBP","CNB"]` | Any of MNB, NBP, CNB |
| `currencies` | array | `["EUR","USD"]` | ISO codes, e.g. EUR, USD, GBP, CHF, JPY. The bank's own currency is skipped |
| `startDate` | string | end date minus 6 days | `YYYY-MM-DD` |
| `endDate` | string | today (UTC) | `YYYY-MM-DD` |
| `lookupDates` | array | none | Turns on lookup mode; the date range is then ignored |
| `lookupRule` | string | `sameDayOrPrevious` | or `previousBusinessDay` |
| `requestDelaySecs` | number | 0.5 | Politeness delay between requests |

Example (invoice mode):

```json
{
  "sources": ["MNB", "NBP"],
  "currencies": ["EUR", "USD"],
  "lookupDates": ["2026-10-16", "2026-10-18"],
  "lookupRule": "previousBusinessDay"
}
```

### Output example (real run)

Range mode, one record per bank, currency and publication day:

```json
{
  "source": "NBP",
  "date": "2026-10-15",
  "currency": "EUR",
  "currencyName": "euro",
  "unit": 1,
  "rate": 4.3691,
  "ratePerUnit": 4.3691,
  "tableNo": "201/A/NBP/2026",
  "sourceUrl": "https://api.nbp.pl/api/exchangerates/tables/A/2026-10-15/2026-10-21/?format=json",
  "baseCurrency": "PLN",
  "fetchedAt": "2026-10-21T18:25:40+00:00"
}
```

Lookup mode (`previousBusinessDay`, Sunday 18 October 2026, so the MNB rate of Friday 16 October is used):

```json
{
  "source": "MNB",
  "currency": "EUR",
  "currencyName": "euro",
  "unit": 1,
  "rate": 363.29,
  "ratePerUnit": 363.29,
  "tableNo": null,
  "baseCurrency": "HUF",
  "requestedDate": "2026-10-18",
  "lookupRule": "previousBusinessDay",
  "rateDate": "2026-10-16",
  "fetchedAt": "2026-10-21T18:25:47+00:00"
}
```

- `rate` is exactly as published, for `unit` units of the foreign currency (MNB and CNB quote some currencies per 100).
- `ratePerUnit` is the rate for 1 unit, so the three banks can be compared directly.
- `tableNo` is the NBP table number.
- `sourceUrl` is the exact official page or API call the number came from, for your audit trail.

Export as JSON, CSV, Excel or via the API, or connect it to Make, Zapier, n8n or Google Sheets with Apify integrations. A run summary (records per bank, failed banks, currencies without data, lookups without a rate) is saved in the `OUTPUT` record of the run's key-value store.

### Pricing

Pay per event, no subscription:

| Event | Price |
|---|---|
| Rate record (one rate in the dataset) | **$0.0005** ($0.50 per 1,000 records) |
| Actor start (per run) | $0.002 |

Examples: the default run (2 currencies × 3 banks × 1 week, about 30 records) costs about **$0.017**. A full year of EUR and USD from all three banks (about 1,500 records) costs about $0.75. A daily scheduled run for 5 currencies across the 3 banks costs about $0.01 per day. You can set a maximum cost per run, and the Actor stops cleanly when it is reached.

### Use cases

- **Accounting and invoicing**: the official MNB, NBP or CNB rate for each foreign-currency invoice (Hungarian, Polish and Czech VAT and income-tax rules refer to central bank rates).
- **ERP, spreadsheet and BI feeds**: schedule a daily run and push new rates to Google Sheets, a database or a webhook.
- **Multi-country finance teams** that need HUF, PLN and CZK rates side by side in one consistent format.
- **AI agents and MCP tools** that need a trustworthy, citable exchange-rate source.

### How it works and fair use

- Only official, public sources published for exactly this purpose. No logins, no personal data.
- Few requests: CNB one per month per currency, NBP one per 93 days, MNB one per year per currency. In lookup mode only the 14 days before each date are fetched. Requests are spaced by a polite delay and retried automatically.

### Limitations

- Rates for a day appear only after the bank publishes them (usually early or mid afternoon local time). A same-day request made earlier returns the previous publication.
- Maximum range is about 10 years per run, and at most 5,000 lookup dates per run.
- This Actor is not affiliated with MNB, NBP or CNB. Data is provided as published; always check critical figures at the source.

### FAQ

**Which currencies are supported?** Whatever each bank publishes. NBP table A has about 30 currencies, CNB about 30, and MNB about 30 current ones. Codes a bank does not quote return no rows and are listed in `OUTPUT.sources[].currencies_without_data`.

**Can I schedule it?** Yes. Use an Apify Schedule (for example every business day at 15:00 CET) and send the output to Google Sheets or a webhook.

**Do you also have the ECB?** Not yet. Open an issue if you need it.

**Something broke?** Open an issue on the Actor's Issues tab with your input, and I will fix it.

# Actor input Schema

## `sources` (type: `array`):

Which central banks to query. MNB = Hungary (HUF), NBP = Poland (PLN, table A mid rates), CNB = Czechia (CZK).

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

ISO 4217 codes, e.g. EUR, USD, GBP, CHF. The bank's own currency is skipped automatically.

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

YYYY-MM-DD. Defaults to 6 days before the end date. Ignored when lookup dates are given.

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

YYYY-MM-DD. Defaults to today (UTC).

## `lookupDates` (type: `array`):

Optional. For each date (YYYY-MM-DD), return the single rate that applies according to the lookup rule, e.g. your invoice or transaction dates. When set, the date range is ignored. Dates without any rate are listed in OUTPUT.lookups_without_rate and not charged.

## `lookupRule` (type: `string`):

sameDayOrPrevious: rate published on that date, or the latest earlier one (weekends, holidays). previousBusinessDay: latest rate published strictly before that date. Check with your accountant which rule your local tax law requires.

## `requestDelaySecs` (type: `number`):

Politeness delay between requests to the banks' servers.

## Actor input object example

```json
{
  "sources": [
    "MNB",
    "NBP",
    "CNB"
  ],
  "currencies": [
    "EUR",
    "USD"
  ],
  "lookupRule": "sameDayOrPrevious",
  "requestDelaySecs": 0.5
}
```

# Actor output Schema

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

Official rates: source, baseCurrency, currency, date (or requestedDate/rateDate in lookup mode), unit, rate, ratePerUnit, tableNo.

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

JSON summary: records per bank, failed banks with error messages, currencies without data, lookups without a rate.

# 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 = {
    "sources": [
        "MNB",
        "NBP",
        "CNB"
    ],
    "currencies": [
        "EUR",
        "USD"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sysco32/cee-central-bank-fx-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 = {
    "sources": [
        "MNB",
        "NBP",
        "CNB",
    ],
    "currencies": [
        "EUR",
        "USD",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("sysco32/cee-central-bank-fx-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 '{
  "sources": [
    "MNB",
    "NBP",
    "CNB"
  ],
  "currencies": [
    "EUR",
    "USD"
  ]
}' |
apify call sysco32/cee-central-bank-fx-rates --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sysco32/cee-central-bank-fx-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/iC5VfylV3CmxJj6KY/builds/qPOGfFe5TN1c2KGwC/openapi.json
