# World Bank Indicators Scraper (`parseforge/worldbank-indicators-scraper`) Actor

Scrapes World Bank development indicators by code, country, and year range. Returns each observation as a flat row with indicator, country, year, and value fields.

- **URL**: https://apify.com/parseforge/worldbank-indicators-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Automation, Integrations, Business
- **Stats:** 2 total users, 1 monthly users, 89.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $7.50 / 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)

### World Bank Indicators Scraper

**Scrape World Bank development indicators for any country and year range, up to a million data points per run.** Each row returns the indicator code, country, year, and value in a flat, analysis-ready schema. Export to CSV, JSON, Excel, or XML.

The World Bank API requires navigating complex query builders and pagination for bulk data. This Actor reads the public indicator feeds directly, letting you pull decades of economic, social, and environmental data by indicator code and country. Get GDP, population, CO2 emissions, and thousands of other metrics without writing a single API call.

| Who uses it | What they scrape World Bank for |
|---|---|
| Economists | Pull long-run GDP and inflation series for cross-country regression models. |
| Data journalists | Gather health, education, and climate indicators to support data-driven stories. |
| Academic researchers | Assemble panel datasets on poverty, trade, or governance for peer-reviewed papers. |
| Financial analysts | Track macro fundamentals like foreign direct investment and current account balances across emerging markets. |

### What it does

This Actor collects World Bank indicator values by code, country, and year range, and returns each observation as a flat row.

- 🌍 **Global coverage:** pull data for a single country, a semicolon-separated list, or every country at once with "all".
- 📅 **Year range filter:** set a start and end year to collect only the observations you need, from 1960 to 2030.
- 📊 **Flat output schema:** each row is one indicator-country-year-value record, ready for pivot tables and statistical software.
- ⚙️ **Flexible indicator input:** feed any valid World Bank indicator code like NY.GDP.MKTP.CD, SP.POP.TOTL, or EN.ATM.CO2E.KT.

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

### What you can do with World Bank data

**📈 Build a macro dashboard.**

A financial analyst pulls GDP, inflation, and unemployment for the G20 countries over the last decade to feed a country-risk dashboard.

**🌱 Track climate and environment data.**

A policy researcher collects CO2 emissions, forest area, and renewable energy consumption for all countries to evaluate progress toward climate goals.

**📚 Assemble a research dataset.**

An academic downloads maternal mortality, literacy rates, and school enrollment for low-income countries to study the relationship between education and health outcomes.

**🗞️ Fact-check a story with data.**

A data journalist pulls foreign aid flows and poverty headcounts for a feature on development effectiveness.

### Why choose this scraper

| | What you get |
|---|---|
| **No API coding** | Point the Actor at an indicator code and get structured data without building queries. |
| **Bulk extraction** | Collect up to a million indicator values in a single run for large panel datasets. |
| **Consistent schema** | Every row follows the same flat structure, making it easy to merge with other sources. |
| **Full historical depth** | Access data back to 1960 for long-term trend analysis and forecasting. |

### How it compares

This Actor focuses exclusively on structured World Bank indicator data, while the competitor below targets a different data source entirely.

| Feature | ParseForge | Fast YouTube Trending Scraper API |
|---|---|---|
| World Bank indicator data | Yes, any indicator by code | Not listed |
| Country and year filtering | Yes, by ISO code and year range | Not listed |
| Bulk extraction up to 1M rows | Yes | Not listed |
| No API key required | Yes | Not listed |

### Configure the run

Drive the Actor with a World Bank indicator code, country codes, and a year range. Filters apply as data is read so only matching observations land in your dataset. The Input tab lists every parameter.

A first run with the defaults:

```json
{
 "indicator": "NY.GDP.MKTP.CD",
 "country": "all",
 "startYear": 2020,
 "endYear": 2025,
 "maxItems": 10
}
```

A larger pull:

```json
{
 "indicator": "NY.GDP.MKTP.CD",
 "country": "all",
 "startYear": 2020,
 "endYear": 2025,
 "maxItems": 200
}
```

### Pricing

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

| Results collected | Approximate cost |
|---|---|
| 100 results | $0.85 |
| 1,000 results | $8.50 |
| 10,000 results | $85.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 [World Bank Indicators Scraper](https://apify.com/parseforge/worldbank-indicators-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 World Bank 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/worldbank-indicators-scraper"
```

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

### Troubleshooting

**I get no results for my indicator code.**

Verify the indicator code on the World Bank Data Catalog. Some codes have changed over time. Also check that your year range overlaps with the indicator's available data. Try a well-known code like NY.GDP.MKTP.CD to confirm the Actor is working.

**The dataset has missing values for some country-year combinations.**

Missing values are normal. The World Bank does not have data for every indicator, country, and year. The Actor returns null for unavailable observations. Filter them out in your analysis or choose a different indicator with broader coverage.

**I entered multiple country codes but only got data for the first one.**

Separate country codes with semicolons, not commas. The correct format is US;CN;BR. If you used commas, the Actor may interpret the input as a single invalid code.

**The run takes a long time or times out.**

Reduce the maxItems limit or narrow your year range. Requesting all countries from 1960 to 2030 for a widely available indicator can produce a very large dataset. Start with a smaller test run to estimate the volume.

### FAQ

| Question | Answer |
|---|---|
| Where do I find the indicator codes? | Browse the World Bank Data Catalog at data.worldbank.org/indicator. Each indicator page shows its code in the URL and near the title. Common examples include NY.GDP.MKTP.CD for GDP and SP.POP.TOTL for total population. |
| Can I get data for all countries at once? | Yes. Set the country input to "all" and the Actor will return data for every country and aggregate region available for that indicator. |
| What format does the output come in? | The Actor returns a flat dataset you can export to CSV, JSON, Excel, or XML. Each row contains the indicator code, country code, country name, year, and value. |
| How far back does the data go? | You can set the start year as early as 1960. Availability varies by indicator and country, so some series may start later. |
| Can I scrape multiple indicators in one run? | The Actor processes one indicator code per run. To collect multiple indicators, run the Actor once per code and merge the datasets afterward. |
| What are the country codes? | Use ISO 3166-1 alpha-2 codes like US, CN, BR, or IN. You can pass a single code or multiple codes separated by semicolons, like US;CN;BR. |
| Is there a limit on how many data points I can collect? | You can set maxItems up to 1,000,000 per run. The actual number returned depends on how many country-year combinations exist for your chosen indicator and year range. |
| Does this Actor require an API key? | No. It reads the World Bank's public data API directly. You do not need to register an application or obtain a key. |

### 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 The World Bank Group. 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

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

World Bank indicator code (e.g. NY.GDP.MKTP.CD for GDP USD).

## `country` (type: `string`):

ISO country code or semicolon-separated codes (e.g. US;CN;BR), or "all" for every country.

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

Earliest year.

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

Latest year.

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

How many indicators to collect per run.

## Actor input object example

```json
{
  "indicator": "NY.GDP.MKTP.CD",
  "country": "all",
  "startYear": 2020,
  "endYear": 2025,
  "maxItems": 10
}
```

# 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 = {
    "indicator": "NY.GDP.MKTP.CD",
    "country": "all",
    "startYear": 2020,
    "endYear": 2025,
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/worldbank-indicators-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 = {
    "indicator": "NY.GDP.MKTP.CD",
    "country": "all",
    "startYear": 2020,
    "endYear": 2025,
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/worldbank-indicators-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 '{
  "indicator": "NY.GDP.MKTP.CD",
  "country": "all",
  "startYear": 2020,
  "endYear": 2025,
  "maxItems": 10
}' |
apify call parseforge/worldbank-indicators-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/worldbank-indicators-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/HSJ47zagOlBtQ13bw/builds/T6xgSk1YXaxsUUEhN/openapi.json
