# World Bank Indicators Scraper - Countries & Time Series (`thirdwatch/world-bank-indicators-scraper`) Actor

Export official World Bank development indicators by country and year. Collect GDP, population, inflation, trade, poverty, health, education, and other time-series data. Built for research, diligence, and market intelligence.

- **URL**: https://apify.com/thirdwatch/world-bank-indicators-scraper.md
- **Developed by:** [Thirdwatch](https://apify.com/thirdwatch) (community)
- **Categories:** Business, Education
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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?

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

## World Bank Indicators Scraper

> Export World Bank indicators by country and year, including GDP, population, inflation, trade, health, education, and development data.

### What you get

Collect comparable country-year observations from the World Bank's development indicator catalog. Combine multiple countries and indicators in one run, choose a historical range, and export values with names, units, update dates, and source links for analysis or monitoring.

### Output fields

| Field | Description |
|---|---|
| `country_code` | ISO alpha-3 or World Bank country code |
| `country_name` | Country or aggregate name |
| `world_bank_country_id` | World Bank country identifier |
| `indicator_code` | Indicator code |
| `indicator_name` | Published indicator name |
| `year` | Observation year |
| `value` | Published observation value |
| `unit` | Unit when supplied |
| `observation_status` | Source observation status when supplied |
| `decimal` | Published decimal precision |
| `source_id` | World Bank source collection identifier |
| `last_updated` | Date the source series was last updated |
| `source_url` | World Bank indicator page for the country |
| `source` | Source name |

### Example output

```json
{
  "country_code": "IND",
  "country_name": "India",
  "indicator_code": "NY.GDP.MKTP.CD",
  "indicator_name": "GDP (current US$)",
  "year": 2024,
  "value": 3909892000000,
  "unit": null,
  "last_updated": "2026-06-30",
  "source_url": "https://data.worldbank.org/indicator/NY.GDP.MKTP.CD?locations=IND"
}
```

### Input parameters

| Parameter | Required | Description |
|---|---|---|
| `countries` | No | ISO alpha-2, ISO alpha-3, or World Bank codes such as `IND`, `USA`, `BRA`, or `WLD`. Defaults to India and the United States. |
| `indicators` | No | Indicator codes such as `NY.GDP.MKTP.CD` or `SP.POP.TOTL`. Defaults to current-price GDP. |
| `yearFrom` | No | Earliest year to include. |
| `yearTo` | No | Latest year to include. |
| `includeEmptyValues` | No | Keep country-years whose published value is null. Defaults to false. |
| `maxResultsPerSeries` | No | Maximum years per country and indicator combination. Defaults to 10. |

### Use cases

- Market researchers: compare GDP, population, trade, or income across target countries.
- Economists and journalists: build reproducible historical series with source links.
- Strategy teams: enrich country-market models with official development indicators.
- Developers: schedule indicator refreshes for dashboards, reports, and data warehouses.

### Limitations

Countries report indicators on different schedules, and recent years may be missing or provisional. Units and methodologies differ across indicators. World Bank aggregates such as `WLD` are not countries. Store `last_updated` and confirm definitions on the linked indicator page before drawing consequential conclusions.

### Compared to alternatives

Compared with `parseforge/world-bank-scraper`, this Actor accepts multiple indicator codes as well as multiple countries in one run and lets you choose an explicit historical range. Compared with `crawlergang/world-bank-scraper`, it focuses on a simple country-by-indicator export rather than requiring a mode switch, making saved monitoring Tasks easier to review. Review live Store inputs and pricing as competing Actors evolve.

### FAQ

#### Where can I find indicator codes?

Search the World Bank Data catalog. Codes appear on indicator pages, such as `SP.POP.TOTL` for total population.

#### Can I compare several countries and indicators?

Yes. Every selected country is combined with every selected indicator, subject to `maxResultsPerSeries`.

#### Why are some years missing?

The source may not publish that indicator for the selected country and year. Enable `includeEmptyValues` if you need explicit null rows.

Explore more data products at [thirdwatch.dev](https://thirdwatch.dev). Related Thirdwatch Actors: [Trade Data Scraper](https://apify.com/thirdwatch/trade-data-scraper), [SEC EDGAR Scraper](https://apify.com/thirdwatch/sec-edgar-scraper), and [Google News Scraper](https://apify.com/thirdwatch/google-news-scraper).

Last verified: 2026-07

# Actor input Schema

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

ISO alpha-2/alpha-3 codes or World Bank region codes, for example IND, USA, BRA, or WLD.

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

World Bank indicator codes such as NY.GDP.MKTP.CD or SP.POP.TOTL.

## `yearFrom` (type: `integer`):

Optional first year.

## `yearTo` (type: `integer`):

Optional final year.

## `includeEmptyValues` (type: `boolean`):

Keep country-years where the source value is null.

## `maxResultsPerSeries` (type: `integer`):

Stop after this many country-year observations for each indicator series.

## Actor input object example

```json
{
  "countries": [
    "IND",
    "USA"
  ],
  "indicators": [
    "NY.GDP.MKTP.CD"
  ],
  "includeEmptyValues": false,
  "maxResultsPerSeries": 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 = {
    "countries": [
        "IND",
        "USA"
    ],
    "indicators": [
        "NY.GDP.MKTP.CD"
    ],
    "includeEmptyValues": false,
    "maxResultsPerSeries": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("thirdwatch/world-bank-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 = {
    "countries": [
        "IND",
        "USA",
    ],
    "indicators": ["NY.GDP.MKTP.CD"],
    "includeEmptyValues": False,
    "maxResultsPerSeries": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("thirdwatch/world-bank-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 '{
  "countries": [
    "IND",
    "USA"
  ],
  "indicators": [
    "NY.GDP.MKTP.CD"
  ],
  "includeEmptyValues": false,
  "maxResultsPerSeries": 10
}' |
apify call thirdwatch/world-bank-indicators-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,thirdwatch/world-bank-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/JplVt2bcCnaUhlFOb/builds/LEyjXqi5lQGd7Aj1S/openapi.json
