# IMF Data Scraper (`parseforge/imf-data-scraper`) Actor

Scrapes IMF World Economic Outlook indicators by country and year range. Returns a flat dataset of country-year observations for inflation, GDP, unemployment, debt, and other series.

- **URL**: https://apify.com/parseforge/imf-data-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Business, News, Lead generation
- **Stats:** 1 total users, 0 monthly users, 89.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $19.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner.jpg)](https://apify.com/parseforge?fpr=vmoqkp)

### IMF Data Scraper

**Scrape IMF World Economic Outlook data for any indicator, country, or year range, up to a million records per run.** Each row is a clean time series point with country, year, and value. No API key, no registration. Export to CSV, JSON, Excel, or XML.

The IMF's official data portal is built for browsing, not for bulk analysis. This Actor reads the World Economic Outlook public API directly, so you can pull inflation, GDP growth, unemployment, government debt, and more for any country or year range into one flat dataset. No API key, no rate limits, no manual downloads.

| Who uses it | What they scrape IMF for |
|---|---|
| Macroeconomic analysts | Pull multi-country inflation and GDP series for cross-country comparison models. |
| Financial journalists | Grab the latest unemployment or debt figures for a story on a specific economy. |
| Academic researchers | Build a panel dataset of government debt or current account balances for econometric work. |
| Data engineers | Feed IMF indicators into a data warehouse or BI dashboard on a schedule. |
| Policy advisors | Track fiscal and external balances across peer countries for briefing notes. |

### What it does

This Actor collects IMF World Economic Outlook indicator time series by indicator, country codes, and year range, and returns each observation as a flat row.

- 🌍 **Nine core indicators:** inflation, real GDP growth, GDP level, current account, unemployment, government debt, net lending, GDP per capita, and PPP conversion rate.
- 📅 **Flexible year range:** set any start and end year from 1980 onward, and get every annual observation in between.
- 🗂️ **Country selection:** pass ISO 2-letter codes for specific countries, or leave empty to get the top 20 major economies.
- 📦 **Flat output:** each row is one country-year-indicator observation, ready for CSV, JSON, Excel, or XML export.
- ⚡ **No API key:** the Actor calls the IMF's public WEO endpoint directly, so there is nothing to register or rotate.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with IMF data

**📈 Track inflation across major economies.**

A market strategist runs the Actor with indicator PCPIPCH and the default top-20 country list to get a monthly-updated inflation panel for a global macro dashboard.

**🏛️ Compare government debt burdens.**

A policy researcher pulls GGXWDG\_NGDP for a set of emerging markets from 2000 to the latest year to rank fiscal risk in a briefing note.

**📊 Build a GDP growth dataset for a model.**

An econometrician collects NGDP\_RPCH for 40 countries over 30 years and exports the flat CSV directly into a regression package.

**💱 Monitor current account imbalances.**

A currency analyst runs BCA\_NGDPD for surplus and deficit countries each quarter to flag external vulnerability before IMF Article IV releases.

**🧑‍🏫 Teach macroeconomics with real data.**

A university lecturer uses the Actor to generate a clean dataset of unemployment and GDP per capita for a lab exercise on convergence.

### Why choose this scraper

|  | What you get |
|---|---|
| **One call, many countries** | Get a full panel of up to 20 major economies in a single run, or specify exactly which countries you need. |
| **Clean time series** | Every row is a tidy observation with country, year, and value, so you can pivot or chart it immediately. |
| **No API key or signup** | The Actor uses the IMF's public WEO endpoint, so there is no OAuth, no token, and no rate limit to manage. |
| **Scheduled updates** | Run it on Apify's scheduler to refresh your dataset whenever the IMF publishes new WEO data. |

### How it compares

No other Store actor targets IMF the same way, so the honest comparison is with the alternatives teams actually weigh.

| | IMF Data Scraper | Build it in-house | By hand |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When IMF changes | Maintained for you | You fix it | You re-learn the page |
| Proxies, retries, anti-bot | Built in | Your problem | Browser only |
| Output | Fixed JSON schema, CSV/Excel export | Whatever you build | Copy-paste |
| Cost | Pay per result | Engineering time | Analyst hours |

### Configure the run

Drive the Actor from an indicator, a list of country codes, and a start and end year. Filters run as the data is read, so only the observations you asked for reach your dataset. The Input tab lists every parameter.

A first run with the defaults:

```json
{
  "maxItems": 10,
  "countryCodes": [
    "US",
    "GB",
    "DE",
    "JP",
    "CN",
    "FR",
    "IT",
    "CA",
    "KR",
    "AU"
  ]
}
```

A larger pull:

```json
{
  "maxItems": 200,
  "countryCodes": [
    "US",
    "GB",
    "DE",
    "JP",
    "CN",
    "FR",
    "IT",
    "CA",
    "KR",
    "AU"
  ]
}
```

### Pricing

Pay-per-result: **$0.021 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $2.10 |
| 1,000 results | $21.00 |
| 10,000 results | $210.00 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [IMF Data Scraper](https://apify.com/parseforge/imf-data-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to IMF through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=parseforge/imf-data-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results?**

Make sure your countryCodes are valid ISO 2-letter codes and that startYear is not after endYear. Also verify the indicator is one of the nine supported codes.

**Why are some countries missing from my output?**

The WEO dataset does not cover every country for every indicator and year. If a country has no observation for the requested indicator and year range, it will not appear in the results.

**Why did I get fewer records than maxItems?**

maxItems is an upper limit, not a target. The Actor returns all matching observations up to that limit. If your query matches fewer country-year combinations, you will get fewer records.

**Why is the value field sometimes empty?**

The IMF WEO API occasionally returns missing values for certain country-year-indicator combinations. The Actor preserves those as empty fields rather than dropping the row.

**Can I get quarterly or monthly data?**

No, the WEO dataset is annual. The Actor returns one observation per country per year for the selected indicator.

### FAQ

| Question | Answer |
|---|---|
| Which IMF database does this Actor use? | It reads the IMF World Economic Outlook (WEO) public API, the same dataset behind the IMF's flagship WEO report. |
| Do I need an API key or IMF account? | No. The Actor calls the public WEO endpoint directly, so there is no registration, no key, and no authentication step. |
| What indicators are available? | Nine WEO indicators: inflation (PCPIPCH), real GDP growth (NGDP\_RPCH), GDP level (NGDPD), current account balance (BCA\_NGDPD), unemployment (LUR), government gross debt (GGXWDG\_NGDP), government net lending (GGXCNL\_NGDP), GDP per capita (NGDPDPC), and implied PPP conversion rate (PPPEX). |
| How do I specify countries? | Pass an array of ISO 2-letter country codes in the countryCodes field, for example \['US', 'GB', 'DE']. Leave it empty to get the top 20 major economies. |
| What is the maximum number of records I can get? | You can set maxItems up to 1,000,000 records per run. The actual number returned depends on how many country-year combinations match your query. |
| What is the earliest year I can request? | The startYear and endYear fields accept any year from 1980 onward. The WEO dataset itself contains observations back to 1980. |
| What format is the output? | Each record is a flat row with country, year, and the indicator value. You can export the dataset as CSV, JSON, Excel, or XML from Apify. |
| Can I schedule this Actor to run automatically? | Yes. Use Apify's scheduler to run it daily, weekly, or monthly, and the dataset will refresh with the latest WEO data. |
| Does this Actor support the IMF's other databases, like IFS or Direction of Trade? | No, this Actor is scoped to the World Economic Outlook API only. Other IMF databases are not covered. |
| What if I get no results? | Check that your country codes are valid ISO 2-letter codes and that your year range overlaps with the WEO coverage. Also confirm the indicator code is one of the nine supported values. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by International Monetary Fund. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

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

How many data records to collect per run.

## `indicator` (type: `string`):

Which IMF economic indicator to retrieve. Source: World Economic Outlook (WEO).

## `countryCodes` (type: `array`):

ISO 2-letter country codes (e.g. \['US', 'GB', 'DE', 'JP']). Leave empty for top 20 major economies.

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

Earliest year to retrieve data for.

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

Latest year to retrieve data for.

## Actor input object example

```json
{
  "maxItems": 10,
  "indicator": "PCPIPCH",
  "countryCodes": [
    "US",
    "GB",
    "DE",
    "JP",
    "CN",
    "FR",
    "IT",
    "CA",
    "KR",
    "AU"
  ],
  "startYear": 2010,
  "endYear": 2023
}
```

# Actor output Schema

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

No description

# 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 = {
    "maxItems": 10,
    "countryCodes": [
        "US",
        "GB",
        "DE",
        "JP",
        "CN",
        "FR",
        "IT",
        "CA",
        "KR",
        "AU"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/imf-data-scraper").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 = {
    "maxItems": 10,
    "countryCodes": [
        "US",
        "GB",
        "DE",
        "JP",
        "CN",
        "FR",
        "IT",
        "CA",
        "KR",
        "AU",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/imf-data-scraper").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 '{
  "maxItems": 10,
  "countryCodes": [
    "US",
    "GB",
    "DE",
    "JP",
    "CN",
    "FR",
    "IT",
    "CA",
    "KR",
    "AU"
  ]
}' |
apify call parseforge/imf-data-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/imf-data-scraper"
        }
    }
}

```

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/XU5Vjfoa29TMs5ysN/builds/DhuoCYGp6vk3umMu7/openapi.json
