# World Bank Data API — 29,000+ global indicators (no key) (`synthetic.ia/worldbank-data`) Actor

Global development data from the World Bank: GDP, population, inflation, health, education, environment and 29,000+ indicators for 200+ countries. Get time series, search indicators, and list countries. Clean HTTP API + MCP, no key. Pay per query.

- **URL**: https://apify.com/synthetic.ia/worldbank-data.md
- **Developed by:** [Synthetic](https://apify.com/synthetic.ia) (community)
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 world bank queries

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 Data API — 29,000+ global indicators (no key)

Global development data from the **World Bank Open Data** as a clean HTTP API (and MCP tool). Pull time series for **GDP, population, inflation, unemployment, life expectancy, CO₂, poverty, trade, education** — **29,000+ indicators** across **200+ countries and aggregates** — search indicators by name, get an indicator's metadata, and list countries with region and income level. **No API key.** Pay per query.

- 📈 **Data** — an indicator's values for one or many countries over a year range (or the most-recent N).
- 🔎 **Search** — find the indicator code you need by text ("gdp", "co2", "life expectancy").
- 🧾 **Indicator info** — name, source, full description and topics for any code.
- 🌍 **Countries** — 200+ countries/aggregates with ISO codes, region, income level and capital.
- 💵 Pay per query · no key · official World Bank data.

### The use case it was built for

Macro dashboards, research, country comparisons, ESG/economics models and agents all need reliable cross-country indicators. Instead of scraping spreadsheets, ask this API: give a code and some countries, get clean typed rows. Pair it with our [Argentina Economic Data](https://apify.com/synthetic.ia/argentina-economic-data) actor for national detail and this one for global comparisons.

### Sample output (`data`, GDP for AR & US)

```json
{
  "ok": true, "indicator": "NY.GDP.MKTP.CD", "indicatorName": "GDP (current US$)",
  "country": "AR;US", "count": 8,
  "data": [
    { "country": "Argentina", "countryCode": "AR", "iso3": "ARG", "date": "2023", "value": 649461687959.17 },
    { "country": "United States", "countryCode": "US", "iso3": "USA", "date": "2023", "value": 27360935000000 }
  ]
}
```

### How to use

- **HTTP API (Standby):** POST or GET `/data`, `/search`, `/indicator`, `/countries`. `GET /` returns help. Example: `GET /data?indicator=SP.POP.TOTL&country=BR&start=2015&end=2023`.
- **Normal run:** pass `{ operation, indicator, country, start, end }`; results land in the dataset + key-value store.
- **MCP tool:** expose it to your agent via Apify's MCP server.

### Input

- **operation** — `data` · `search` · `indicator` · `countries`.
- **indicator** — the WB code (find it with `search`). **country** — ISO 2/3-letter code(s) `AR;US;BR`, aggregates (`WLD`, `EUU`), or `all`.
- **start / end / mostRecent** — year range, or the last N observations. **q** — search text. **region** — filter countries. **limit** — cap rows.

### Pricing

**Per query** from **$0.006** (down to $0.002 on higher tiers). One call = one query (which can return many countries × years at once).

### Related Actors

- **[Argentina Economic Data](https://apify.com/synthetic.ia/argentina-economic-data)** — national economic series for Argentina.
- **[Yahoo Finance API](https://apify.com/synthetic.ia/yahoo-finance-api)** — markets, quotes and FX.

### FAQ

**How do I find an indicator code?** Use `search` with plain text; each result includes the `id` to pass to `data`.

**Which countries?** 200+ — call `countries` for the list. Use ISO 2- or 3-letter codes, or aggregates like `WLD`.

**Do I need a key?** No.

### Notes & limits

Data comes from the World Bank Open Data API. Coverage and latest year vary by indicator and country. Up to 1000 rows per `data` call; use year range or `mostRecent` to focus.

# Changelog

This Actor's version history is a separate document: https://apify.com/synthetic.ia/worldbank-data/changelog.md

# Actor input Schema

## `operation` (type: `string`):

What to fetch.

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

World Bank indicator code, e.g. NY.GDP.MKTP.CD (GDP), SP.POP.TOTL (population), FP.CPI.TOTL.ZG (inflation). Use Search to find codes.

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

ISO 2/3-letter code(s), separated by ; — e.g. AR, USA, AR;US;BR. Aggregates like WLD (World), EUU (EU). Empty/all = all countries.

## `start` (type: `integer`):

First year.

## `end` (type: `integer`):

Last year.

## `mostRecent` (type: `integer`):

Return only the last N observations per country (overrides year range).

## `q` (type: `string`):

For operation=search: text to find indicators, e.g. "gdp", "co2", "life expectancy".

## `region` (type: `string`):

For countries: a region code (e.g. LCN, EAS, SSF) to filter.

## `limit` (type: `integer`):

Max rows (data ≤1000, search ≤100).

## Actor input object example

```json
{
  "operation": "data",
  "indicator": "NY.GDP.MKTP.CD",
  "country": "AR;US"
}
```

# Actor output Schema

## `result` (type: `string`):

No description

## `runs` (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": "AR;US"
};

// Run the Actor and wait for it to finish
const run = await client.actor("synthetic.ia/worldbank-data").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": "AR;US",
}

# Run the Actor and wait for it to finish
run = client.actor("synthetic.ia/worldbank-data").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": "AR;US"
}' |
apify call synthetic.ia/worldbank-data --silent --output-dataset

```

## MCP server setup

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

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/WNx9elA7n3OvULx68/builds/T55JNx3vvCzpa4hXT/openapi.json
