# World Bank WDI Economic Indicators Data API (`koalastuff/world-bank-wdi-explorer`) Actor

Retrieve World Bank WDI indicators for countries and years. Export GDP, population, health, trade, and development data for analysis and dashboards.

- **URL**: https://apify.com/koalastuff/world-bank-wdi-explorer.md
- **Developed by:** [Timo Schmidt](https://apify.com/koalastuff) (community)
- **Categories:** Business, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 wdi 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use 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 WDI Indicator Explorer

Retrieve World Bank WDI indicators for countries and years. Export GDP, population, health, trade, and development data for analysis and dashboards.

This independent Actor is not endorsed by the World Bank. It is intentionally restricted to World Development Indicators, API source `2`, whose dataset license permits commercial reuse under CC BY 4.0.

### Try this first

Start with the example input below to compare GDP and population for Germany and the United States. Results are written to the default dataset with country labels, source dates, attribution, and license metadata.

[![World Bank WDI Indicator Explorer icon](https://api.apify.com/v2/key-value-stores/JoHkELuyqjk6waZJX/records/icon-world-bank-wdi-explorer.png)](https://apify.com/koalastuff/world-bank-wdi-explorer)

#### Example output

[![Example output preview](https://api.apify.com/v2/key-value-stores/JoHkELuyqjk6waZJX/records/preview-world-bank-wdi-explorer.svg)](https://apify.com/koalastuff/world-bank-wdi-explorer)

This preview is generated from a checked-in official-source fixture. It shows the normalized output shape without inventing live demand or results.

### Use cases

- Build country/indicator panels for research, market analysis, dashboards, and reporting.
- Compare GDP, population, development, health, education, trade, or climate indicators across countries and years.
- Export stable observation rows with indicator and country labels, source date, attribution, and license metadata.

### Input

| Field | Description | Default |
| --- | --- | --- |
| `countries` | Up to 50 ISO or World Bank aggregate codes | `DEU`, `USA` |
| `indicators` | Up to 20 WDI indicator codes | GDP and population |
| `startYear` / `endYear` | Inclusive range, 1960 to 2100 | 2020 to current year |
| `includeNulls` | Keep missing observations | `false` |
| `maxResults` | Hard output and billing limit | `1000` |
| `requestDelayMs` | Delay between API pages | `500` |

### Output

Each row contains a stable indicator/country/year ID, official names and codes, numeric value, unit, observation status, decimals, source update date, request URL, attribution, and CC BY 4.0 license link.

### Reliability and limits

- Official World Bank API only; no scraping, browser, proxy, account, API key, or paid service.
- Dataset source is fixed to World Development Indicators (`source=2`). Arbitrary third-party catalog datasets are not accepted.
- Up to 1,000 observations per page, ten pages, sequential requests, retries, deduplication, and a hard 10,000-row limit.
- Missing values are omitted by default and can be retained explicitly.

### Pricing

- Actor start: USD 0.00005
- Normalized WDI observation: USD 0.001

A two-result Apify smoke run on 256 MB used USD 0.0003992225 of platform resources and completed in 24.817 seconds. The Actor is publicly available with the pricing above.

### Data source and license

Source: <https://api.worldbank.org/v2>. World Development Indicators are licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Every result includes: “World Bank. World Development Indicators. Licensed under CC BY 4.0; values normalized without substantive changes.”

Users should check indicator definitions, source notes, methodology, and update dates before interpretation. Values are not forecasts unless the selected indicator explicitly says so.

### Support

Report reproducible problems with the input, run link, indicator code, country code, year, and expected value.

### Related Actors

- [Eurostat HICP Inflation Monitor](https://apify.com/koalastuff/eurostat-hicp-inflation-monitor) for EU and euro-area inflation observations.
- [US Treasury Debt to the Penny Monitor](https://apify.com/koalastuff/us-treasury-debt-monitor) for official U.S. debt observations.

# Actor input Schema

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

ISO alpha-2/alpha-3 country or World Bank aggregate codes.
## `indicators` (type: `array`):

World Development Indicator codes, for example NY.GDP.MKTP.CD or SP.POP.TOTL.
## `startYear` (type: `integer`):

First observation year, inclusive.
## `endYear` (type: `integer`):

Last observation year, inclusive.
## `includeNulls` (type: `boolean`):

Keep rows whose official value is null.
## `maxResults` (type: `integer`):

Hard unique-output and billing limit.
## `requestDelayMs` (type: `integer`):

Conservative delay between official API pages.

## Actor input object example

```json
{
  "countries": [
    "DEU",
    "USA"
  ],
  "indicators": [
    "NY.GDP.MKTP.CD",
    "SP.POP.TOTL"
  ],
  "startYear": 2020,
  "endYear": 2025,
  "includeNulls": false,
  "maxResults": 1000,
  "requestDelayMs": 500
}
````

# Actor output Schema

## `results` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("koalastuff/world-bank-wdi-explorer").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("koalastuff/world-bank-wdi-explorer").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call koalastuff/world-bank-wdi-explorer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=koalastuff/world-bank-wdi-explorer",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "World Bank WDI Economic Indicators Data API",
        "description": "Retrieve World Bank WDI indicators for countries and years. Export GDP, population, health, trade, and development data for analysis and dashboards.",
        "version": "0.1",
        "x-build-id": "ax2NMZVggj39x1WQz"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/koalastuff~world-bank-wdi-explorer/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-koalastuff-world-bank-wdi-explorer",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/koalastuff~world-bank-wdi-explorer/runs": {
            "post": {
                "operationId": "runs-sync-koalastuff-world-bank-wdi-explorer",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/koalastuff~world-bank-wdi-explorer/run-sync": {
            "post": {
                "operationId": "run-sync-koalastuff-world-bank-wdi-explorer",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "countries": {
                        "title": "Countries or aggregates",
                        "minItems": 1,
                        "maxItems": 50,
                        "uniqueItems": true,
                        "type": "array",
                        "description": "ISO alpha-2/alpha-3 country or World Bank aggregate codes.",
                        "items": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9]{2,3}$"
                        },
                        "default": [
                            "DEU",
                            "USA"
                        ]
                    },
                    "indicators": {
                        "title": "WDI indicator codes",
                        "minItems": 1,
                        "maxItems": 20,
                        "uniqueItems": true,
                        "type": "array",
                        "description": "World Development Indicator codes, for example NY.GDP.MKTP.CD or SP.POP.TOTL.",
                        "items": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_.-]{3,60}$"
                        },
                        "default": [
                            "NY.GDP.MKTP.CD",
                            "SP.POP.TOTL"
                        ]
                    },
                    "startYear": {
                        "title": "Start year",
                        "minimum": 1960,
                        "maximum": 2100,
                        "type": "integer",
                        "description": "First observation year, inclusive.",
                        "default": 2020
                    },
                    "endYear": {
                        "title": "End year",
                        "minimum": 1960,
                        "maximum": 2100,
                        "type": "integer",
                        "description": "Last observation year, inclusive.",
                        "default": 2025
                    },
                    "includeNulls": {
                        "title": "Include missing observations",
                        "type": "boolean",
                        "description": "Keep rows whose official value is null.",
                        "default": false
                    },
                    "maxResults": {
                        "title": "Maximum results",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Hard unique-output and billing limit.",
                        "default": 1000
                    },
                    "requestDelayMs": {
                        "title": "Delay between pages",
                        "minimum": 0,
                        "maximum": 60000,
                        "type": "integer",
                        "description": "Conservative delay between official API pages.",
                        "default": 500
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
