# World Bank Indicators Scraper — GDP, Inflation & More (`hipersoft/worldbank-indicators-scraper`) Actor

Fetch World Bank development indicators in bulk by country and year: GDP, population, inflation, unemployment, trade and thousands more. Pick any indicator codes and ISO country codes (or all countries), set a year range, and get one clean row per country, indicator and year as JSON, CSV or Excel.

- **URL**: https://apify.com/hipersoft/worldbank-indicators-scraper.md
- **Developed by:** [hiper soft](https://apify.com/hipersoft) (community)
- **Categories:** Other, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.00025 / datapoint scraped

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

## World Bank Indicators Scraper — GDP, Population, Inflation & More

Pull **World Bank development indicators** in bulk as clean, structured **JSON, CSV, Excel or XML**. Choose any indicator codes (**GDP, population, inflation, unemployment, trade, life expectancy** and thousands more) and any list of countries — or **all** countries at once — set an optional year range, and get one flat record per **country × indicator × year**. Ideal for research, dashboards, economic models and automated data pipelines.

### What does World Bank Indicators Scraper do?

This scraper turns the World Bank's open development data into a ready-to-use dataset. Ask for a set of indicator codes and countries, optionally narrow to a year range, and it returns one tidy row per data point — with the country, indicator name, year, value and unit. Use it to build economic dashboards, back-test models, enrich reports, or keep a fresh copy of key indicators on a schedule.

### What data can you get?

| Field | Description |
| --- | --- |
| `country` | Country or region name. |
| `countryIso` | Two-letter ISO country code. |
| `countryIso3` | Three-letter ISO country code. |
| `indicator` | World Bank indicator code (e.g. `NY.GDP.MKTP.CD`). |
| `indicatorName` | Human-readable indicator name (e.g. "GDP (current US$)"). |
| `year` | Observation year. |
| `value` | Indicator value for that country and year. |
| `unit` | Unit of measure, when the source provides one. |

### Use cases

- **Economic dashboards** — power GDP, inflation or population dashboards for any set of countries.
- **Research & modelling** — assemble multi-country, multi-year panels for analysis.
- **Country comparisons** — line up the same indicators across markets and years.
- **Reporting** — drop fresh figures into reports, briefs and presentations.
- **Data pipelines** — feed structured indicator data into BI tools, notebooks or apps.

### How to use it

1. Add **World Bank Indicators Scraper** to your Apify account and open its input.
2. Enter one or more **countries** as ISO codes (e.g. `US`, `SG`, `GB`), or a single `all` for every country.
3. Enter one or more **indicators** codes (e.g. `NY.GDP.MKTP.CD`, `SP.POP.TOTL`).
4. Optionally set a **year range** such as `2010:2023`.
5. Click **Run**, then export the results as JSON, CSV, Excel or XML.

### Input

```json
{
  "countries": ["US", "SG"],
  "indicators": ["NY.GDP.MKTP.CD", "SP.POP.TOTL"],
  "dateRange": "2018:2022"
}
```

| Field | Description |
| --- | --- |
| `countries` | ISO country codes, e.g. `US`, `SG`, `GB`. Use `all` for every country and region. |
| `indicators` | World Bank indicator codes, e.g. `NY.GDP.MKTP.CD` (GDP), `SP.POP.TOTL` (population). |
| `dateRange` | Optional year or year range, e.g. `2020` or `2010:2023`. Empty = all years. |
| `includeEmptyValues` | Also output rows where the value is missing. Off by default. |
| `maxItems` | Cap the total number of data points returned. `0` = no limit. |

### What you get

One flat JSON record per data point, ready to export to CSV, Excel, JSON or XML.

```json
{
  "country": "Singapore",
  "countryIso": "SG",
  "countryIso3": "SGP",
  "indicator": "NY.GDP.MKTP.CD",
  "indicatorName": "GDP (current US$)",
  "year": "2022",
  "value": 514252535238.749,
  "unit": null
}
```

### Popular indicator codes

| Code | Indicator |
| --- | --- |
| `NY.GDP.MKTP.CD` | GDP (current US$) |
| `NY.GDP.PCAP.CD` | GDP per capita (current US$) |
| `SP.POP.TOTL` | Population, total |
| `FP.CPI.TOTL.ZG` | Inflation, consumer prices (annual %) |
| `SL.UEM.TOTL.ZS` | Unemployment, total (% of labour force) |
| `SP.DYN.LE00.IN` | Life expectancy at birth (years) |
| `NE.EXP.GNFS.ZS` | Exports of goods and services (% of GDP) |

### FAQ

**Which indicators can I request?**
Any World Bank indicator code. Pass one or more codes in the `indicators` field; each is fetched for every country you list.

**How do I get every country at once?**
Set `countries` to a single value `all`. This includes countries as well as regional and income-group aggregates.

**Can I limit the years?**
Yes — set `dateRange` to a single year (`2020`) or a range (`2010:2023`).

**What export formats are available?**
JSON, CSV, Excel and XML, plus programmatic access through the Apify API.

**Can I use this with n8n?**
Yes. Run it from the [Apify n8n community node](https://apify.com/integrations/n8n) or trigger it over HTTP, then pass the dataset items straight into your n8n workflow for transforming, storing or alerting on indicator data.

**Can I connect this to my other tools?**
It works with [Make](https://apify.com/integrations/make), [Zapier](https://apify.com/integrations/zapier), [Slack](https://docs.apify.com/platform/integrations/slack), [Airbyte](https://docs.apify.com/platform/integrations/airbyte), [GitHub](https://docs.apify.com/platform/integrations/github), [Google Drive](https://docs.apify.com/platform/integrations/drive) and [many more](https://apify.com/integrations), plus the [Apify API](https://docs.apify.com/api/v2), JavaScript/Python clients and MCP. Or use [webhooks](https://docs.apify.com/platform/integrations/webhooks) to trigger an action whenever a run finishes.

**How often is the data updated?**
Values reflect the World Bank's latest published figures at run time. Re-run on a schedule to keep your copy fresh.

**Is this official World Bank data?**
The data reflects public World Bank development indicators, but this actor is an independent tool and is not affiliated with or endorsed by the World Bank.

### Related Actors

- [CoinGecko Scraper](https://apify.com/hipersoft/coingecko-scraper) — live crypto prices, market cap, volume and ATH/ATL.
- [DefiLlama Scraper](https://apify.com/hipersoft/defillama-scraper) — DeFi protocols, yields, chains and stablecoins.
- [Yahoo Finance Scraper](https://apify.com/hipersoft/yahoo-finance-scraper) — quotes and OHLCV history for stocks, ETFs, crypto and forex.

### Notes

Original clean-room implementation. Returns only public development-indicator data; you are responsible for compliant use. Not affiliated with the World Bank; all trademarks belong to their respective owners.

# Actor input Schema

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

ISO country codes to fetch, e.g. "US", "SG", "GB". Two- or three-letter codes both work. Use a single value "all" to fetch every country and region.

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

World Bank indicator codes to fetch, e.g. "NY.GDP.MKTP.CD" (GDP), "SP.POP.TOTL" (population), "FP.CPI.TOTL.ZG" (inflation). Add as many as you need — each is fetched for every country.

## `dateRange` (type: `string`):

Optional year or year range to limit results, e.g. "2020" or "2010:2023". Leave empty to fetch all available years.

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

When enabled, also output rows for years where the indicator value is missing (null). Off by default so you only get real data points.

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

Maximum number of data points (rows) to output across all countries and indicators. 0 = no limit.

## Actor input object example

```json
{
  "countries": [
    "US",
    "SG",
    "GB"
  ],
  "indicators": [
    "NY.GDP.MKTP.CD",
    "SP.POP.TOTL",
    "FP.CPI.TOTL.ZG"
  ],
  "dateRange": "2010:2023",
  "includeEmptyValues": false,
  "maxItems": 0
}
```

# Actor output Schema

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

The results as dataset items.

# 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": [
        "US",
        "SG"
    ],
    "indicators": [
        "NY.GDP.MKTP.CD"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hipersoft/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 = {
    "countries": [
        "US",
        "SG",
    ],
    "indicators": ["NY.GDP.MKTP.CD"],
}

# Run the Actor and wait for it to finish
run = client.actor("hipersoft/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 '{
  "countries": [
    "US",
    "SG"
  ],
  "indicators": [
    "NY.GDP.MKTP.CD"
  ]
}' |
apify call hipersoft/worldbank-indicators-scraper --silent --output-dataset

```

## MCP server setup

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