# World Bank Indicators - GDP, Population, Inflation by Country (`hydramill/world-bank-indicators`) Actor

World Bank Open Data indicators (GDP, population, inflation, unemployment and 29,000+ more series, CC BY 4.0) by country and year as clean flat records, with country codes, indicator names, source database and last-update date.

- **URL**: https://apify.com/hydramill/world-bank-indicators.md
- **Developed by:** [Hydramill](https://apify.com/hydramill) (community)
- **Categories:** Business, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 87.5% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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 - GDP, Population, Inflation by Country

Get **World Bank Open Data indicators** (GDP, population, inflation, unemployment, trade, health, education and **29,000+ other series**) for any country and year as **clean, flat JSON**: one row per country, indicator and year with a plain numeric value.

It uses the official public World Bank Indicators API directly: no scraping, no login, no API key, no proxies, no browser. The data is published under **CC BY 4.0**.

### What you can use it for

- **Market and country research.** Compare GDP, GDP per capita, population or inflation across countries and years for a market-entry or investor report.
- **Dashboards and BI.** Feed Looker, Power BI, Google Sheets or a data warehouse with a scheduled run.
- **Journalism and education.** Latest values for any country in one call (`latestOnly`).
- **Data science.** Clean panel data (country x year) without wrestling with the paged API.

### Why this actor

- **Flat, typed output.** Numbers are numbers, years are strings, empty years are skipped (or kept as `null` if you prefer).
- **Many indicators and countries in one run.** ISO2 or ISO3 codes, World Bank aggregates (`WLD`, `EUU`, `HIC`...) or `ALL` countries.
- **Latest value mode.** `latestOnly` returns the most recent available value per country, whatever year that is.
- **Checks your codes.** Unknown countries and indicators are listed in the run summary instead of failing silently.
- **Free to use.** You only pay Apify's usual platform usage.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `indicators` | list of text | required | Indicator codes, e.g. `NY.GDP.MKTP.CD` (GDP, current US$), `SP.POP.TOTL` (population), `FP.CPI.TOTL.ZG` (inflation), `SL.UEM.TOTL.ZS` (unemployment). Browse them at <https://data.worldbank.org/indicator>. |
| `countries` | list of text | required | ISO codes (`ES`, `DEU`...), aggregates (`WLD`, `EUU`...) or `ALL`. |
| `includeAggregates` | boolean | `false` | With `ALL`: also regions and income groups. |
| `yearFrom`, `yearTo` | integer | none | Year range. |
| `latestOnly` | boolean | `false` | Only the most recent non-empty value per country and indicator. |
| `skipEmptyValues` | boolean | `true` | Skip years with no data. |
| `maxItems` | integer | `1000` (Store form: `100`) | Stop after this many rows. `0` = no limit. |

#### Example input: latest inflation for every country

```json
{
  "indicators": ["FP.CPI.TOTL.ZG"],
  "countries": ["ALL"],
  "latestOnly": true,
  "maxItems": 0
}
```

### Output

One dataset item per country, indicator and year. Real item from a run on 2026-11-17 (World Bank database updated 2026-11-11):

```json
{
  "indicatorId": "NY.GDP.MKTP.CD",
  "indicatorName": "GDP (current US$)",
  "countryCode": "DE",
  "countryIso3": "DEU",
  "countryName": "Germany",
  "date": "2023",
  "value": 4562207532490.28,
  "unit": null,
  "obsStatus": null,
  "source": "World Development Indicators",
  "sourceLastUpdated": "2026-11-11",
  "retrievedAt": "2026-11-17T10:43:37.086Z"
}
```

| Field | Description |
|---|---|
| `indicatorId`, `indicatorName` | World Bank indicator code and name (the name carries the unit, e.g. "current US$", "% of GDP"). |
| `countryCode`, `countryIso3`, `countryName` | ISO alpha-2, alpha-3 and name (aggregates use the World Bank's own codes). |
| `date` | Year of the value. |
| `value` | The number (`null` only with `skipEmptyValues: false`). |
| `unit`, `obsStatus` | Unit text and observation flag when the World Bank gives one. |
| `source`, `sourceLastUpdated` | Source database and when the World Bank last updated it. |
| `retrievedAt` | When this actor read the API (UTC). |

The default key-value store also gets a `SUMMARY` record with the indicators read, unknown codes, totals and the data attribution.

Export the dataset as JSON, CSV, Excel or XML, or read it through the Apify API and integrations (Make, Zapier, Slack, Google Sheets, webhooks).

### Pricing

Free: you only pay Apify's usual platform usage, which is tiny for this actor (no browser, 256 MB).

### Data source and attribution

Source: **The World Bank**, World Bank Open Data, <https://data.worldbank.org>.

- Data: World Bank Indicators API v2, `https://api.worldbank.org/v2/country/{codes}/indicator/{indicator}`. Docs: <https://datahelpdesk.worldbank.org/knowledgebase/topics/125589>.
- Licence: **CC BY 4.0** (<https://creativecommons.org/licenses/by/4.0/>), see the World Bank's terms for datasets, <https://www.worldbank.org/en/about/legal/terms-of-use-for-datasets>. If you reuse the data, credit "The World Bank, World Bank Open Data" and the indicator's source database (`source`). Some third-party series inside a database can carry their own terms.

**This is an independent tool. It is not affiliated with, endorsed by or sponsored by the World Bank.** Values are as published and revised by the World Bank; check the source database for definitions and methodology.

### Limitations

- Annual data mostly; some indicators have gaps and the latest years are often empty.
- The World Bank API can be slow. The actor retries, but a run may take longer than usual.
- Only the Indicators API (World Development Indicators and sibling databases). Not the Poverty & Inequality or Microdata libraries.

### En español

**Indicadores del Banco Mundial** (PIB, población, inflación, desempleo y más de 29.000 series) por país y año en JSON plano y limpio. Datos abiertos CC BY 4.0 (cita: "The World Bank, World Bank Open Data"). Gratuito. Herramienta independiente, sin relación con el Banco Mundial.

### En català

**Indicadors del Banc Mundial** (PIB, població, inflació, atur i més de 29.000 sèries) per país i any en JSON pla i net. Dades obertes CC BY 4.0 (cita: "The World Bank, World Bank Open Data"). Gratuït. Eina independent, sense relació amb el Banc Mundial.

# Actor input Schema

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

World Bank indicator codes, e.g. NY.GDP.MKTP.CD (GDP, current US$), SP.POP.TOTL (population), FP.CPI.TOTL.ZG (inflation), SL.UEM.TOTL.ZS (unemployment). Find codes at https://data.worldbank.org/indicator

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

ISO country codes (ES, DEU, US...), World Bank aggregates (WLD world, EUU European Union, HIC high income...) or ALL for every country.

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

Only used with ALL: also return aggregates such as World, Euro area or Low income.

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

First year to return. Empty = from the start of the series.

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

Last year to return. Empty = up to the latest.

## `latestOnly` (type: `boolean`):

Return only the most recent available value per country and indicator (ignores the years).

## `skipEmptyValues` (type: `boolean`):

The World Bank lists years with no data as empty. Skip them.

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

Stop after this many rows in total. 0 = no limit.

## Actor input object example

```json
{
  "indicators": [
    "NY.GDP.MKTP.CD",
    "SP.POP.TOTL"
  ],
  "countries": [
    "ES",
    "DE",
    "US"
  ],
  "includeAggregates": false,
  "yearFrom": 2019,
  "yearTo": 2023,
  "latestOnly": false,
  "skipEmptyValues": true,
  "maxItems": 100
}
```

# Actor output Schema

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

One item per country, indicator and year.

## `summary` (type: `string`):

Indicators read, unknown codes, totals and attribution (key SUMMARY in the default key-value store).

# 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"
    ],
    "countries": [
        "ES",
        "DE",
        "US"
    ],
    "yearFrom": 2019,
    "yearTo": 2023,
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("hydramill/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",
        "SP.POP.TOTL",
    ],
    "countries": [
        "ES",
        "DE",
        "US",
    ],
    "yearFrom": 2019,
    "yearTo": 2023,
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("hydramill/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",
    "SP.POP.TOTL"
  ],
  "countries": [
    "ES",
    "DE",
    "US"
  ],
  "yearFrom": 2019,
  "yearTo": 2023,
  "maxItems": 100
}' |
apify call hydramill/world-bank-indicators --silent --output-dataset

```

## MCP server setup

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