# Global Macro & Central Bank Policy API (IMF + BIS + ECB) (`runglab/global-macro-central-bank-api`) Actor

Unified LLM-ready macroeconomic & central bank policy API combining IMF WEO GDP/CPI/debt forecasts, BIS central bank policy rates, and ECB Eurozone rates/FX via pure keyless JSON REST — zero proxies, MCP-ready.

- **URL**: https://apify.com/runglab/global-macro-central-bank-api.md
- **Developed by:** [RungLab](https://apify.com/runglab) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 macroeconomic series

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

## Global Macro & Central Bank Policy API (IMF + BIS + ECB)

Unified, LLM-ready macroeconomic and central bank policy time-series API combining **IMF World Economic Outlook (DataMapper API v1)**, **BIS Central Bank Policy Rates (SDMX API v2)**, and **ECB Data Portal (Eurozone Key Policy Interest Rates & Monthly FX)** into one clean, normalized JSON schema.

Built for **zero-proxy, keyless pure-HTTP execution at 256 MB RAM** and native **Apify MCP (Model Context Protocol)** workflows — designed for quant researchers, macro analysts, corporate treasury/FX teams, and autonomous AI financial research agents.

***

### Why Use This Actor?

- **Three Official Institutional APIs in One Normalized Schema**: Stop wrestling with incompatible JSON trees, cryptic SDMX dimension keys, ISO-3 vs. ISO-2 country codes, and Eurozone member mismatches across the **IMF**, **BIS**, and **ECB**. Every series ships in one uniform camelCase format with pre-computed `latestValue`, `previousValue`, `periodDelta`, and `yoyDelta`.
- **100% Live, Keyless Public REST Endpoints**:
  - **IMF World Economic Outlook (`imf_weo`)**: Official IMF DataMapper API v1 (`imf.org/external/datamapper/api/v1/`) covering **225+ economies** and multi-year official forecasts through **2031** (Real GDP growth `NGDP_RPCH`, CPI inflation `PCPIPCH`, General government gross debt % GDP `GGXWDG_NGDP`, unemployment `LUR`, current account `BCA_NGDPD`, and any IMF DataMapper indicator code).
  - **BIS Central Bank Policy Rates (`bis_policy_rates`)**: Official Bank for International Settlements SDMX API v2 (`stats.bis.org/api/v2/data/dataflow/BIS/WS_CBPOL/1.0/`) covering **38 major central banks** (Fed, PBOC, ECB, BoJ, BoE, RBI, BCB, SNB, RBA, BoC, BoK, CBRT, and more) with official central bank attribution and compilation methodology notes.
  - **ECB Eurozone Policy Rates & FX (`ecb_rates`)**: Official European Central Bank Data Portal (`data-api.ecb.europa.eu/service/data/`) delivering Euro area key policy rates (**Deposit Facility Rate `DFR`**, **Main Refinancing Operations `MRR_FR`**, **Marginal Lending Facility `MLFR`**) plus monthly EUR reference exchange rates across **29 global currencies**.
- **Automatic Cross-Institution Country Mapping**: Pass ISO-3 (`"USA"`, `"CHN"`, `"DEU"`, `"JPN"`, `"GBR"`) or ISO-2 (`"US"`, `"CN"`, `"DE"`, `"JP"`, `"GB"`) codes freely. Eurozone member countries (`DEU`, `FRA`, `ITA`, `ESP`, etc.) automatically resolve to `"XM"` (Euro area) in BIS policy rates and to Eurozone policy rates in ECB, while non-EUR economies automatically resolve to their national currency in ECB reference FX.
- **Zero-Config Instant Start**: Click **Start** with default inputs to immediately fetch **27 live normalized time series** across USA, China, Germany/Eurozone, Japan, and the UK in ~2 seconds.
- **Zero Proxies, Zero Headless Browsers**: Pure async `httpx` runs cleanly on **256 MB RAM** with minimal compute cost.
- **MCP & AI Finance Agent Ready**: Enable `compactMode: true` to strip nulls, omit verbose metadata, and cap inline observations to the latest 12 periods for token-efficient Claude, Cursor, LangGraph, CrewAI, or n8n tool calls via `mcp.apify.com`.

***

### Input Parameters

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `sources` | `array<string>` | `["imf_weo", "bis_policy_rates", "ecb_rates"]` | Any combination of `imf_weo`, `bis_policy_rates`, and `ecb_rates`. |
| `countries` | `array<string>` | `["USA", "CHN", "DEU", "JPN", "GBR"]` | ISO-3 (`USA`, `CHN`, `IND`, `BRA`) or ISO-2 (`US`, `CN`, `IN`, `BR`, `XM`) economy codes. Automatically mapped across IMF, BIS, and ECB. |
| `indicators` | `array<string>` | `["NGDP_RPCH", "PCPIPCH", "GGXWDG_NGDP"]` | IMF DataMapper indicator codes (e.g., `NGDP_RPCH`, `PCPIPCH`, `GGXWDG_NGDP`, `LUR`, `BCA_NGDPD`, `NGDPD`, `NGDPDPC`). |
| `startYear` | `integer` | `2020` | First calendar year (inclusive) for time-series observations (`1950`–`2035`). |
| `endYear` | `integer` | `2027` | Last calendar year (inclusive) for time-series observations (`1950`–`2035`; IMF WEO forecasts extend to `2031`). |
| `compactMode` | `boolean` | `false` | Streamlined MCP/LLM output omitting null fields, nested `details`, and keeping only the latest 12 observations per series. |
| `timeoutSeconds` | `integer` | `20` | Per-request HTTP timeout in seconds (`5`–`120`). |

#### Copy-Paste Input: Default G5 Macro & Central Bank Snapshot

```json
{
  "sources": ["imf_weo", "bis_policy_rates", "ecb_rates"],
  "countries": ["USA", "CHN", "DEU", "JPN", "GBR"],
  "indicators": ["NGDP_RPCH", "PCPIPCH", "GGXWDG_NGDP"],
  "startYear": 2020,
  "endYear": 2027,
  "compactMode": false
}
```

#### Copy-Paste Input: Emerging Markets & G10 Central Banks (Compact MCP Mode)

```json
{
  "sources": ["imf_weo", "bis_policy_rates", "ecb_rates"],
  "countries": ["IND", "BRA", "MEX", "KOR", "IDN", "ZAF", "TUR"],
  "indicators": ["NGDP_RPCH", "PCPIPCH", "GGXWDG_NGDP", "BCA_NGDPD"],
  "startYear": 2022,
  "endYear": 2028,
  "compactMode": true
}
```

***

### Unified Output Schema

Every pushed dataset item conforms to one standardized cross-source schema:

```json
{
  "seriesId": "bis-cbpol-us",
  "source": "bis_policy_rates",
  "institution": "US Federal Reserve System (via BIS)",
  "countryIso3": "USA",
  "countryIso2": "US",
  "countryName": "United States",
  "indicatorCode": "CBPOL_M",
  "indicatorName": "Central bank policy rates - United States - Monthly - End of period",
  "unit": "Percent per annum",
  "frequency": "monthly",
  "latestPeriod": "2026-10",
  "latestValue": 3.625,
  "previousPeriod": "2026-09",
  "previousValue": 3.625,
  "periodDelta": 0.0,
  "yoyDelta": -0.5,
  "observations": [
    { "period": "2025-10", "value": 4.125 },
    { "period": "2026-09", "value": 3.625 },
    { "period": "2026-10", "value": 3.625 }
  ],
  "sourceUrl": "https://stats.bis.org/api/v2/data/dataflow/BIS/WS_CBPOL/1.0/M.US?startPeriod=2020&endPeriod=2027&format=sdmx-json",
  "fetchedAt": "2026-11-25T12:30:00Z",
  "details": {
    "dataflow": "BIS:WS_CBPOL(1.0)",
    "bisRefArea": "US",
    "centralBank": "US Federal Reserve System",
    "methodology": "From 19 Dec 1985 onwards: mid-point of the Federal Reserve target rate; from 1 Jul 1954 to 18 Dec 1985: US Fed Funds effective rate."
  }
}
```

Run diagnostics (per-source series counts, observation counts, normalized country codes, and execution status) are also saved in the default Key-Value Store under key **`RUN_SUMMARY`**.

***

### SDK Examples

#### Python (`apify-client`)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run = client.actor("YOUR_USERNAME/global-macro-central-bank-api").call(
    run_input={
        "sources": ["imf_weo", "bis_policy_rates", "ecb_rates"],
        "countries": ["USA", "CHN", "DEU", "JPN", "GBR"],
        "indicators": ["NGDP_RPCH", "PCPIPCH", "GGXWDG_NGDP"],
        "startYear": 2022,
        "endYear": 2027,
        "compactMode": False,
    }
)

for series in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(
        f"[{series['source']}] {series['countryIso3']} {series['indicatorCode']}: "
        f"{series['latestValue']} ({series['unit']}) as of {series['latestPeriod']} "
        f"| YoY delta: {series['yoyDelta']}"
    )
```

#### Node.js / TypeScript (`apify-client`)

```javascript
import { ApifyClient } from "apify-client";

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });

const run = await client.actor("YOUR_USERNAME/global-macro-central-bank-api").call({
  sources: ["imf_weo", "bis_policy_rates", "ecb_rates"],
  countries: ["USA", "CHN", "DEU", "JPN", "GBR"],
  indicators: ["NGDP_RPCH", "PCPIPCH", "GGXWDG_NGDP"],
  startYear: 2022,
  endYear: 2027,
  compactMode: true,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.table(
  items.map((s) => ({
    source: s.source,
    country: s.countryIso3,
    indicator: s.indicatorCode,
    period: s.latestPeriod,
    latest: s.latestValue,
    yoyDelta: s.yoyDelta,
  }))
);
```

***

### Connect to AI Finance Agents via Apify MCP

Attach this Actor directly to **Claude Desktop, Cursor, Windsurf, VS Code Copilot, or LangGraph** using Apify's official MCP server (`https://mcp.apify.com`):

```json
{
  "mcpServers": {
    "apify-global-macro": {
      "url": "https://mcp.apify.com/?actors=YOUR_USERNAME/global-macro-central-bank-api",
      "headers": {
        "Authorization": "Bearer YOUR_APIFY_TOKEN"
      }
    }
  }
}
```

Example prompt for your AI research agent:

> *"Use the Global Macro & Central Bank Policy API with `compactMode: true` to compare 2025–2027 IMF GDP growth and CPI inflation forecasts against current BIS/ECB policy interest rates for USA, China, Germany, Japan, and the UK, highlighting real policy rate spreads."*

***

### Pay-Per-Event (PPE) Pricing

This Actor uses transparent **Pay-Per-Event** billing — you only pay for the exact macroeconomic series delivered:

- **`actor-start`**: Charged once per run (`$0.01`).
- **`macro-series`**: Charged once per normalized time-series record pushed to the dataset (`$0.005`).

Runs automatically honor your configured Apify max-charge limit (`event_charge_limit_reached`) and halt cleanly without losing already-pushed series.

# Actor input Schema

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

Official public macro & central bank data sources to query. Supported values: 'imf_weo' (IMF DataMapper WEO GDP, CPI, debt & fiscal forecasts), 'bis_policy_rates' (BIS SDMX monthly policy interest rates across 38 central banks), 'ecb_rates' (ECB Eurozone key policy rates DFR/MRR/MLFR + monthly EUR reference FX rates).

## `countries` (type: `array`):

List of ISO-3 (e.g. 'USA', 'CHN', 'DEU', 'JPN', 'GBR', 'IND', 'BRA') or ISO-2 (e.g. 'US', 'CN', 'DE', 'JP', 'GB', 'XM') country codes. Automatically mapped between ISO-3 for IMF DataMapper, ISO-2 (including Eurozone members -> 'XM') for BIS SDMX, and national currencies for ECB FX rates.

## `indicators` (type: `array`):

IMF DataMapper WEO indicator codes to retrieve when 'imf_weo' is enabled. Defaults: 'NGDP_RPCH' (Real GDP growth %), 'PCPIPCH' (CPI inflation %), 'GGXWDG_NGDP' (General government gross debt % of GDP). Also supports any IMF DataMapper code such as 'LUR' (Unemployment rate), 'BCA_NGDPD' (Current account balance % GDP), 'NGDPD' (Nominal GDP USD billions), or 'NGDPDPC' (GDP per capita).

## `startYear` (type: `integer`):

First calendar year (inclusive) to include in time-series observations across IMF, BIS, and ECB.

## `endYear` (type: `integer`):

Last calendar year (inclusive) to include in time-series observations. IMF WEO includes official multi-year macro forecasts through 2031.

## `compactMode` (type: `boolean`):

When enabled, outputs streamlined token-efficient records omitting null fields, verbose metadata, and limiting inline observations to the most recent 12 periods — ideal for AI financial research agents calling this Actor via Apify MCP.

## `timeoutSeconds` (type: `integer`):

Per-request HTTP timeout in seconds for official IMF, BIS, and ECB REST API calls.

## Actor input object example

```json
{
  "sources": [
    "imf_weo",
    "bis_policy_rates",
    "ecb_rates"
  ],
  "countries": [
    "USA",
    "CHN",
    "DEU",
    "JPN",
    "GBR"
  ],
  "indicators": [
    "NGDP_RPCH",
    "PCPIPCH",
    "GGXWDG_NGDP"
  ],
  "startYear": 2020,
  "endYear": 2027,
  "compactMode": false,
  "timeoutSeconds": 20
}
```

# Actor output Schema

## `overview` (type: `string`):

Cross-source summary table of every normalized time series with institution, country, indicator, unit, frequency, latest value, period-over-period delta, and year-over-year delta.

## `imfWeo` (type: `string`):

IMF World Economic Outlook country macroeconomic time series (GDP growth, CPI inflation, government debt % GDP, and custom WEO indicators).

## `centralBankPolicy` (type: `string`):

BIS monthly central bank policy rates and ECB Eurozone key interest rates & FX reference rates with latest levels and YoY basis-point shifts.

## `allSeries` (type: `string`):

Full structured JSON items including full chronological observations arrays and institutional source metadata.

## `runSummary` (type: `string`):

Per-source series counts, normalized country mappings, and execution diagnostics stored in the Key-Value Store.

# 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": [
        "imf_weo",
        "bis_policy_rates",
        "ecb_rates"
    ],
    "countries": [
        "USA",
        "CHN",
        "DEU",
        "JPN",
        "GBR"
    ],
    "indicators": [
        "NGDP_RPCH",
        "PCPIPCH",
        "GGXWDG_NGDP"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("runglab/global-macro-central-bank-api").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": [
        "imf_weo",
        "bis_policy_rates",
        "ecb_rates",
    ],
    "countries": [
        "USA",
        "CHN",
        "DEU",
        "JPN",
        "GBR",
    ],
    "indicators": [
        "NGDP_RPCH",
        "PCPIPCH",
        "GGXWDG_NGDP",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("runglab/global-macro-central-bank-api").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": [
    "imf_weo",
    "bis_policy_rates",
    "ecb_rates"
  ],
  "countries": [
    "USA",
    "CHN",
    "DEU",
    "JPN",
    "GBR"
  ],
  "indicators": [
    "NGDP_RPCH",
    "PCPIPCH",
    "GGXWDG_NGDP"
  ]
}' |
apify call runglab/global-macro-central-bank-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,runglab/global-macro-central-bank-api"
        }
    }
}
```

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/OOCgJY1Y1aoa99ieg/builds/vRyxdJmxMHQAGeatX/openapi.json
