# World Bank Indicators - GDP, Population and 20,000 More (`loopchips/worldbank-indicators`) Actor

Any World Bank development indicator for any country and year, as flat rows. Every row carries region, income level and an aggregate flag, so regional totals never get silently summed with countries. No API key needed.

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

## Pricing

$2.00 / 1,000 observations

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?

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 - GDP, Population and 20,000 More

Any World Bank development indicator, for any country and any year, as flat rows.

The World Bank publishes over 20,000 indicators covering economics, health,
education, energy, trade and climate. This Actor pulls whichever ones you name
and returns one row per country, indicator and year, already joined to the
country's region, income level and capital.

**No API key needed.** It works out of the box.

### The trap this Actor removes

A request for "all countries" returns 217 countries **and 78 groupings** -
World, Euro area, Sub-Saharan Africa, High income, and so on - in the same list,
with nothing obvious to tell them apart. Sum that column and you count much of
the planet several times over.

Every row here carries `isAggregate`, and groupings are excluded by default.
Turn them on when you want regional totals, and they arrive clearly labelled.

### What you get

| Field | Description |
|---|---|
| `indicatorCode` / `indicatorName` / `unit` | Which series the row belongs to |
| `countryIso3` / `countryIso2` / `country` | Country identifiers and name |
| `isAggregate` | False for real countries, true for regional and income groupings |
| `region` / `incomeLevel` / `lendingType` | World Bank classifications, ready to group by |
| `capitalCity` / `latitude` / `longitude` | For mapping |
| `year` / `value` | The observation itself |
| `sourceOrganization` | Who compiles the underlying statistic |
| `lastUpdated` | When the World Bank last revised the series |

### Example input

```json
{
  "indicators": ["NY.GDP.MKTP.CD", "SP.POP.TOTL", "FP.CPI.TOTL.ZG"],
  "countries": ["all"],
  "startYear": "2015",
  "endYear": "2025"
}
```

A few countries, one series, long history:

```json
{
  "indicators": ["SL.UEM.TOTL.ZS"],
  "countries": ["KOR", "USA", "JPN", "DEU"],
  "startYear": "1990"
}
```

### Popular indicator codes

| Code | Indicator |
|---|---|
| `NY.GDP.MKTP.CD` | GDP, current US$ |
| `NY.GDP.PCAP.CD` | GDP per capita, current US$ |
| `NY.GDP.MKTP.KD.ZG` | GDP growth, annual % |
| `SP.POP.TOTL` | Population, total |
| `SP.DYN.LE00.IN` | Life expectancy at birth |
| `FP.CPI.TOTL.ZG` | Inflation, consumer prices, annual % |
| `SL.UEM.TOTL.ZS` | Unemployment, % of labour force |
| `EN.GHG.CO2.MT.CE.AR5` | CO2 emissions |
| `IT.NET.USER.ZS` | Individuals using the internet, % |
| `SE.XPD.TOTL.GD.ZS` | Government expenditure on education, % of GDP |

Any code from data.worldbank.org/indicator works.

### Example output

```json
{
  "indicatorCode": "NY.GDP.MKTP.CD",
  "indicatorName": "GDP (current US$)",
  "countryIso3": "KOR",
  "countryIso2": "KR",
  "country": "Korea, Rep.",
  "isAggregate": false,
  "region": "East Asia & Pacific",
  "incomeLevel": "High income",
  "capitalCity": "Seoul",
  "year": 2025,
  "value": 1872374961553,
  "lastUpdated": "2026-07-13"
}
```

### What people use it for

- **Market sizing** - GDP, population and income level side by side for every
  country you might enter
- **Dashboards** - a tidy long-format table that drops straight into a chart
- **Research and teaching** - a citable, openly licensed source
- **Model features** - country-year covariates for forecasting

### Notes

- Most indicators have gaps. Empty years are dropped by default so you are not
  charged for blank rows. Turn that off if you need a complete rectangle.
- The most recent year or two is often missing for many countries. That is the
  source, not the Actor.
- `includeSourceNote` adds the World Bank's full definition of the indicator to
  every row. Useful once, bulky repeated across thousands of rows.
- Source: World Bank Open Data, licensed CC BY 4.0. Attribute the World Bank
  when you republish.

### Pricing

Pay per result. You are charged only for observations actually returned.

# Actor input Schema

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

World Bank indicator codes, for example NY.GDP.MKTP.CD for GDP or SP.POP.TOTL for population. Find any code at data.worldbank.org/indicator.

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

Three-letter ISO codes such as KOR, USA, CHN. Use a single entry of all for every country.

## `startYear` (type: `string`):

First year to return, for example 2000. Defaults to ten years ago.

## `endYear` (type: `string`):

Last year to return. Defaults to the current year.

## `includeAggregates` (type: `boolean`):

The World Bank mixes 78 regional and income groupings such as World or Euro area in with real countries. They are excluded by default so totals are not double counted.

## `skipMissingValues` (type: `boolean`):

Most indicators have gaps. Empty years are dropped by default so you are not charged for blank rows.

## `includeSourceNote` (type: `boolean`):

Adds the World Bank's full definition of the indicator to every row. Useful once, bulky on every row.

## `requestDelayMs` (type: `integer`):

Pause between requests so the source is not hit too quickly.

## Actor input object example

```json
{
  "indicators": [
    "NY.GDP.MKTP.CD",
    "SP.POP.TOTL",
    "FP.CPI.TOTL.ZG"
  ],
  "countries": [
    "KOR",
    "USA",
    "JPN",
    "CHN"
  ],
  "includeAggregates": false,
  "skipMissingValues": true,
  "includeSourceNote": false,
  "requestDelayMs": 250
}
```

# Actor output Schema

## `observations` (type: `string`):

One row per country, indicator and year.

# 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 = {
    "indicators": [
        "NY.GDP.MKTP.CD",
        "SP.POP.TOTL",
        "FP.CPI.TOTL.ZG"
    ],
    "countries": [
        "KOR",
        "USA",
        "JPN",
        "CHN"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("loopchips/worldbank-indicators").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 = {
    "indicators": [
        "NY.GDP.MKTP.CD",
        "SP.POP.TOTL",
        "FP.CPI.TOTL.ZG",
    ],
    "countries": [
        "KOR",
        "USA",
        "JPN",
        "CHN",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("loopchips/worldbank-indicators").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 '{
  "indicators": [
    "NY.GDP.MKTP.CD",
    "SP.POP.TOTL",
    "FP.CPI.TOTL.ZG"
  ],
  "countries": [
    "KOR",
    "USA",
    "JPN",
    "CHN"
  ]
}' |
apify call loopchips/worldbank-indicators --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,loopchips/worldbank-indicators"
        }
    }
}

```

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/PqQJlIuwq9PHOGEbm/builds/tILPyeAv3gpMgGrYI/openapi.json
