# World Bank Development Indicators (`cynix_dev/world-bank-indicators`) Actor

Query 14,000+ World Bank indicators across 200+ countries: GDP, inflation, trade, health, education, environment, governance, energy, and more.

- **URL**: https://apify.com/cynix\_dev/world-bank-indicators.md
- **Developed by:** [Cynix Dev](https://apify.com/cynix_dev) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 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

## World Bank Development Indicators

Query **14,000+ World Bank indicators** across **200+ countries** from the
[World Bank Open Data API](https://data.worldbank.org/). No API key required.

![World Bank](https://img.logo.dev/worldbank.org?token=pk_f3e1270e3c2e4cb5a0c3a8d86e96b90a\&size=200\&retina=true\&format=png)

### What it does

This actor queries the World Bank's public SDMX-JSON API and returns structured
rows of indicator data — one row per country per year per indicator.

### Available Indicators

Over 14,000 indicators are available. Use the **preset** dropdown for quick access
to curated bundles, or enter custom indicator IDs directly.

#### Preset Bundles

| Preset | Indicators Included |
|--------|-------------------|
| **Macro Economic** | GDP, GDP growth, inflation, GNI, GDP per capita, PPP |
| **Trade** | Exports, imports, balance of payments, FDI inflows |
| **Health** | Life expectancy, infant mortality, health spending, fertility |
| **Education** | School enrollment (primary/secondary/tertiary), literacy, spending |
| **Energy & Climate** | Electricity consumption, renewables, CO2 emissions, PM2.5 |
| **Governance** | CPIA, government effectiveness, rule of law, corruption, voice |
| **Debt & Finance** | Government debt, reserves, money supply, remittances, interest rates |
| **Gender** | Female labor participation, parliament seats, education parity |

#### Popular Custom Indicators

| Indicator ID | Description |
|-------------|-------------|
| `NY.GDP.MKTP.CD` | GDP (current US$) |
| `FP.CPI.TOTL.ZG` | Inflation, consumer prices (annual %) |
| `SP.DYN.LE00.IN` | Life expectancy at birth |
| `EN.ATM.CO2E.PC` | CO2 emissions (metric tons per capita) |
| `SE.XPD.TOTL.GD.ZS` | Government expenditure on education (% of GDP) |
| `GE.EST` | Government effectiveness estimate |
| `GC.DOD.TOTL.GD.ZS` | Central government debt (% of GDP) |
| `SL.TLF.CACT.FE.ZS` | Labor force, female (% of total) |

Browse all indicators at [data.worldbank.org/indicator](https://data.worldbank.org/indicator).

### Example Inputs

#### Get GDP data for G7 countries (2018-2024)

```json
{
  "indicators": ["NY.GDP.MKTP.CD"],
  "preset": "none",
  "countries": ["US", "GB", "DE", "FR", "IT", "JP", "CA"],
  "startYear": 2018,
  "endYear": 2024,
  "maxRecordsPerIndicator": 1000
}
```

#### Use a preset for macro economic overview

```json
{
  "indicators": [],
  "preset": "macro_economic",
  "countries": ["AU", "NZ", "SG"],
  "startYear": 2020,
  "endYear": 2024,
  "maxRecordsPerIndicator": 5000
}
```

### Output

Each record contains:

| Field | Description |
|-------|-------------|
| `country` | Country name (e.g. "United States") |
| `country_code` | ISO 3-letter code (e.g. "USA") |
| `indicator_id` | Indicator code (e.g. "NY.GDP.MKTP.CD") |
| `indicator_name` | Full indicator name |
| `year` | Observation year |
| `value` | Numeric value (empty if no data) |
| `unit` | Measurement unit |
| `source` | Data source database |
| `scraped_at` | ISO timestamp of data fetch |

### Data Source

[World Bank Open Data](https://data.worldbank.org/) — free and open access to
global development data. Licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).

### Use Cases

- **Macro research**: GDP, inflation, trade balance across economies
- **ESG analysis**: CO2 emissions, renewable energy, governance scores
- **Development consulting**: Education, health, poverty indicators
- **Journalism**: Data-driven stories on global trends
- **Academic research**: Panel data for econometric analysis

### Rate Limits

The World Bank API allows ~1,000 requests per hour without authentication.
This actor paginates efficiently (1,000 records per page) to stay within limits.

### Limitations

- Data availability varies by country and indicator (not all countries report all years)
- Some indicators have a 1-2 year publication lag
- The API returns null values for missing data points

# Actor input Schema

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

World Bank indicator IDs (e.g. NY.GDP.MKTP.CD for GDP, FP.CPI.TOTL.ZG for inflation). Leave empty to use the 'preset' field instead.

## `preset` (type: `string`):

Quick-select a bundle of commonly-used indicators (ignored if custom indicator IDs are provided above).

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

ISO 3166-1 alpha-2 or alpha-3 country codes (e.g. US, GB, DE, CN). Use 'all' for every country. Leave empty for all countries.

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

First year of the date range (inclusive).

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

Last year of the date range (inclusive).

## `maxRecordsPerIndicator` (type: `integer`):

Maximum number of data records to retrieve per indicator (0 = all available).

## Actor input object example

```json
{
  "indicators": [
    "NY.GDP.MKTP.CD",
    "FP.CPI.TOTL.ZG"
  ],
  "preset": "macro_economic",
  "countries": [
    "US",
    "GB",
    "DE",
    "CN",
    "IN"
  ],
  "startYear": 2018,
  "endYear": 2024,
  "maxRecordsPerIndicator": 5000
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing all scraped records

# 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",
        "FP.CPI.TOTL.ZG"
    ],
    "countries": [
        "US",
        "GB",
        "DE",
        "CN",
        "IN"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("cynix_dev/world-bank-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",
        "FP.CPI.TOTL.ZG",
    ],
    "countries": [
        "US",
        "GB",
        "DE",
        "CN",
        "IN",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("cynix_dev/world-bank-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",
    "FP.CPI.TOTL.ZG"
  ],
  "countries": [
    "US",
    "GB",
    "DE",
    "CN",
    "IN"
  ]
}' |
apify call cynix_dev/world-bank-indicators --silent --output-dataset

```

## MCP server setup

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