# World Bank Development Data Collector (`datapilot/world-bank-development-data-collector`) Actor

Collect official World Bank development data with this Apify Actor. Fetch GDP, population, life expectancy, CO₂ emissions, unemployment, literacy, poverty, and more by country or indicator. Supports multiple indicators, Apify Proxy, and exports structured historical data.

- **URL**: https://apify.com/datapilot/world-bank-development-data-collector.md
- **Developed by:** [Data Pilot](https://apify.com/datapilot) (community)
- **Categories:** AI, Integrations, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 scraped results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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** Data Collector is a powerful Apify Actor designed to discover, track, and collect key economic and social indicators directly from the World Bank's official Open Data API. This tool provides comprehensive **World Bank Development** intelligence including GDP, population, life expectancy, poverty, literacy, unemployment, and CO2 emissions data across countries and years. Whether you're building an economic dashboard, tracking development trends, or conducting cross-country research, the World Bank Development Data Collector delivers actionable **World Bank Development** insights efficiently.

With direct World Bank API integration, multi-indicator batch fetching, country-level scoping, and reliable Apify Dataset delivery, the World Bank Development Data Collector ensures comprehensive **World Bank Development** coverage across decades of historical data. It focuses on key **World Bank Development** signals including indicator value, year, and country metadata, making it an essential tool for economic research and global development intelligence.

***

### 📋 Table of Contents

- [Features](#-features)
- [Data Source](#-data-source)
- [How It Works](#-how-it-works)
- [Input](#-input)
- [Output](#-output)
- [Technical Stack](#-technical-stack)
- [Data Fields](#-data-fields-explained)
- [Available Indicators](#-available-indicators)
- [Use Cases](#-use-cases)
- [Quick Start](#-quick-start)
- [Configuration](#-configuration)
- [Performance](#-performance)
- [Billing](#-billing)
- [Important Notes](#-important-notes)
- [Changelog](#-changelog)
- [Support](#-support--feedback)
- [License & Legal](#-license--legal)

***

### 🔥 Features

- **World Bank API Integration** – Direct, key-less integration with the official World Bank Open Data API.
- **Multi-Indicator Support** – Fetch a single indicator, a custom comma-separated list, or all common indicators in one run.
- **Country-Level Scoping** – Query a specific country by ISO code, or fetch data for all countries at once.
- **Preset Indicator Set** – Includes 8 commonly used development indicators out of the box.
- **Custom Indicator Codes** – Supply any valid World Bank indicator code beyond the built-in preset.
- **Historical Coverage** – Retrieves the full available time series for each indicator/country pair.
- **Null-Value Filtering** – Automatically skips records with no reported value.
- **Rich Country Metadata** – Captures country name, ISO3 code, and decimal precision per record.
- **High Page Size** – Requests up to 1,000 records per page to minimize pagination overhead.
- **Residential Proxy Support** – Apify residential proxy for reliable, uninterrupted access.
- **Real-Time Dataset Push** – Pushes results to Apify Dataset with metadata.
- **Detailed Logging** – Comprehensive logging of per-indicator fetch progress and record counts.
- **Asyncio-Friendly** – Non-blocking async/await architecture with httpx.
- **Graceful Error Handling** – Skips a failing indicator without stopping the whole run.

***

### 📊 Data Source

#### **World Bank Open Data API**

- **Authority**: Official World Bank statistical database
- **Endpoint**: `api.worldbank.org/v2/country/{country}/indicator/{indicator}`
- **Coverage**: 200+ countries and regions, decades of historical data
- **Data**: Indicator value, year, country name/code, and metadata
- **Access**: Public, key-less REST/JSON endpoint
- **Update Frequency**: As the World Bank publishes revised and new statistics

***

### ⚙️ How It Works

The World Bank Development Data Collector accepts a country scope and one or more indicator codes. For each indicator, it queries the World Bank API for that country (or all countries), retrieving up to 1,000 records per page. Each record is parsed to extract the indicator name, code, year, value, and country metadata, skipping any record with no reported value. Results across all requested indicators are combined and pushed to the Apify Dataset in a single batch.

**Key Processing Steps:**

1. **Input Parsing** – Accept country code and indicator selection (single, list, or "all")
2. **Indicator Resolution** – Default to GDP, expand "all" to the preset indicator list, or split a custom comma-separated list
3. **Proxy Setup** – Configure Apify residential proxy
4. **Indicator Loop** – Iterate through each requested indicator
5. **API Query** – Fetch records for the country/indicator pair
6. **Response Validation** – Detect and log empty or malformed API responses
7. **Value Filtering** – Skip records with no reported value
8. **Metadata Extraction** – Capture country name, ISO3 code, and decimal precision
9. **Timestamp Tagging** – Record scrape time per entry
10. **Dataset Push** – Push combined results from all indicators in a single batch
11. **Summary Logging** – Report per-indicator and total record counts

**Key Benefits:**

- Pull **World Bank Development** indicators for any country without manual downloads
- Build historical time series for GDP, population, poverty, and more
- Compare development indicators across countries and years
- Feed economic dashboards, research pipelines, or policy analysis tools
- Automate recurring data refreshes as the World Bank updates its figures

***

### 📥 Input

The Actor accepts the following input parameters:

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `country` | string | `"all"` | ISO2/ISO3 country code to scope results to (e.g., "US", "IN"), or "all" for all countries |
| `indicator` | string | `"NY.GDP.MKTP.CD"` | A single indicator code, a comma-separated list, or `"all"` for the built-in preset set |
| `useApifyProxy` | boolean | `true` | Enable Apify residential proxies |
| `apifyProxyGroups` | array | `["RESIDENTIAL"]` | Proxy group configuration |

**Example Input:**

```json
{
  "country": "US",
  "indicator": "NY.GDP.MKTP.CD,SP.POP.TOTL"
}
```

**Fetch All Preset Indicators for One Country:**

```json
{
  "country": "IN",
  "indicator": "all"
}
```

**Fetch Default GDP Indicator for All Countries:**

```json
{
  "country": "all"
}
```

***

### 📤 Output

The Actor pushes **World Bank Development** records with the following structure:

| Field | Type | Description |
|-------|------|-------------|
| `indicator` | string | Human-readable indicator name |
| `indicator_code` | string | World Bank indicator code |
| `year` | string | Year the value corresponds to |
| `value` | number | Reported indicator value |
| `metadata.country` | string | Country name |
| `metadata.country_code` | string | ISO3 country code |
| `metadata.decimal` | string | Decimal precision reported by the API |
| `scraped_at` | string | ISO 8601 timestamp of when the record was scraped |

**Example World Bank Development Record:**

```json
{
  "indicator": "GDP (current US$)",
  "indicator_code": "NY.GDP.MKTP.CD",
  "year": "2024",
  "value": 27360935000000,
  "metadata": {
    "country": "United States",
    "country_code": "USA",
    "decimal": "0"
  },
  "scraped_at": "2026-07-31T09:00:00+00:00"
}
```

***

### 🧰 Technical Stack

- **API:** World Bank Open Data API (v2, JSON format)
- **HTTP Client:** httpx for async HTTP requests
- **JSON Parsing:** Standard json handling via httpx response parsing
- **Date Handling:** datetime with timezone-aware UTC timestamps
- **Async:** asyncio for non-blocking, multi-indicator fetching
- **Proxy:** Apify Proxy with `RESIDENTIAL` configuration
- **Logging:** Apify Actor logging system
- **Platform:** Apify Actor serverless environment

***

### 📊 Data Fields Explained

#### **Indicator Identification**

- **indicator**: Human-readable name of the statistic (e.g., "GDP per capita")
- **indicator\_code**: The World Bank's official indicator code

#### **Value & Timing**

- **year**: The year the reported value applies to
- **value**: The numeric indicator value for that year

#### **Country Context**

- **metadata.country**: Full country name
- **metadata.country\_code**: ISO3 country code
- **metadata.decimal**: Decimal precision as reported by the source

***

### 🏛️ Available Indicators

The Actor ships with 8 commonly used **World Bank Development** indicators, selectable via `"indicator": "all"`:

| Code | Description |
|---|---|
| `NY.GDP.MKTP.CD` | GDP (current US$) |
| `NY.GDP.PCAP.CD` | GDP per capita |
| `SP.POP.TOTL` | Population, total |
| `SP.DYN.LE00.IN` | Life expectancy at birth |
| `SI.POV.DDAY` | Poverty headcount ratio ($2.15/day) |
| `SE.ADT.LITR.ZS` | Literacy rate, adult total |
| `SL.UEM.TOTL.ZS` | Unemployment, total (% of labor force) |
| `EN.GHG.CO2.MT.CE.AR5` | CO2 emissions (Mt CO2 equivalent) |

> Any valid World Bank indicator code can also be supplied directly or as part of a comma-separated list.

***

### 🎯 Use Cases

- **Economic Research** – Pull **World Bank Development** indicators for cross-country comparison
- **Policy Analysis** – Track poverty, unemployment, and literacy trends over time
- **Investment Research** – Assess macroeconomic conditions across target markets
- **Academic Studies** – Build historical datasets for development economics research
- **Dashboard Building** – Power BI tools and dashboards with live World Bank data
- **ESG & Sustainability Reporting** – Incorporate CO2 emissions and social indicators into reports
- **Journalism** – Source authoritative economic figures for data-driven reporting
- **NGO & Policy Planning** – Inform program design with up-to-date development statistics

***

### 🚀 Quick Start

#### **1. Prepare Input**

Go to Apify Console and enter:

```json
{
  "country": "BR",
  "indicator": "all"
}
```

#### **2. Run the Actor**

Click **Start**. The Actor will:

- Resolve the requested indicator(s)
- Query the World Bank API for the selected country
- Filter out records with no value
- Push all results to the Dataset

#### **3. Monitor Progress**

Console shows:

```
Initializing World Bank Collector for Country: 'BR' | Indicators: ['NY.GDP.MKTP.CD', 'NY.GDP.PCAP.CD', ...]
[World Bank API] Fetching NY.GDP.MKTP.CD for 'BR'...
 -> NY.GDP.MKTP.CD: 64 record(s) fetched.
Done! Successfully saved 412 record(s) to Apify Dataset.
```

#### **4. View & Download Results**

- **Results Tab**: All **World Bank Development** records
- **Export**: JSON, CSV, Excel, or HTML
- **Filter**: By indicator, country, or year
- **API Access**: Available via the Apify API

***

### ⚙️ Configuration

Single country, default indicator:

```json
{
  "country": "DE"
}
```

Custom indicator list:

```json
{
  "country": "ZA",
  "indicator": "SP.DYN.LE00.IN,SL.UEM.TOTL.ZS"
}
```

All countries, all preset indicators:

```json
{
  "country": "all",
  "indicator": "all"
}
```

***

### 📈 Performance

#### **Processing Speed**

- One request per indicator per run, up to 1,000 records per page
- Short delay between indicator requests to stay respectful of the API
- Scales with the number of indicators and the country scope selected

#### **Resource Usage**

- Memory: Low-to-moderate, proportional to historical data volume returned
- Network: One request per configured indicator
- Proxy: One residential proxy session per run

***

### 💰 Billing

#### **Batch Billing**

- **Billing Model:** Batch push (not per-record PPE)
- **Typical Cost:** Proportional to total records fetched across indicators
- **Efficiency:** High page size keeps runs efficient even for full historical series

***

### ⚠️ Important Notes

#### **Legal & Compliance**

- **Fair Use**: Respects the World Bank's public API and rate limits
- **Official Source**: Pulls exclusively from the World Bank's official Open Data API
- **Accuracy**: Data as published by the World Bank
- **Verification**: Cross-check critical figures against the official World Bank Open Data portal
- **Legal**: Not financial or legal advice — consult qualified professionals for investment or policy decisions

#### **Data Quality**

- **Freshness**: Reflects the World Bank's published data at time of run
- **Completeness**: Not all countries report all indicators for all years
- **Accuracy**: Sourced directly from the World Bank's official API
- **Verification**: Cross-check time-sensitive figures against the live World Bank portal

#### **Best Practices**

- Use `"all"` for indicators only when you need the full preset set — narrow selections run faster
- Scope to a specific `country` when you don't need global coverage
- Re-run periodically to catch revised or newly published figures
- Combine multiple indicator codes in one run to reduce total API calls
- No API key is required — the World Bank API is publicly accessible

***

### 📦 Changelog

#### v1.0.0 (July 2026)

**Initial Release:**

- World Bank Open Data API integration
- Single, multi, and preset-list indicator support
- Country-level and all-country scoping
- Null-value record filtering
- Country metadata extraction (name, ISO3 code, decimal precision)
- High page-size pagination (1,000 records per page)
- Apify residential proxy support
- Real-time Dataset push
- Per-indicator error handling and logging
- Asyncio + httpx async architecture

***

### 🧑‍💻 Support & Feedback

- **Issues:** Submit via Apify console with the country and indicator used
- **Documentation:** Check the Actor details page
- **Community:** Apify forum discussions
- **Feature Requests:** Suggest additional preset indicators to support
- **Bug Reports:** Include the country, indicator, and error details

***

### 📄 License & Legal

**Terms of Use:**

- Use for legitimate economic and development research
- Respect the World Bank's Terms of Service
- Attribute the World Bank as the original data source where required
- Use data responsibly

**Disclaimer:**
World Bank Development Data Collector is provided as-is for research purposes. Users are responsible for compliance with the World Bank's ToS. This is not financial or legal advice.

***

### 🎉 Get Started Today

**Deploy now for World Bank Development research!**

Use for:

- 📊 Economic Analysis
- 🔍 Development Indicator Tracking
- 💡 Policy & Investment Research
- 📈 Cross-Country Comparison
- 🎯 Global Development Intelligence

**Perfect for:**

- Economists & Analysts
- Policy Researchers
- Journalists
- NGOs & Development Organizations

***

**Last Updated:** July 2026
**Version:** 1.0.0
**Status:** Production Ready
**Platform:** Apify Actor
**Architecture:** Async/Await
**Data Source:** World Bank Open Data API

***

### 📚 Related Tools

- Open Data Portal Harvester
- WHO Disease Outbreak News Monitor
- Salary Trends Scraper

***

### ⚖️ World Bank Development Excellence

This Actor is optimized for **World Bank Development** research with:

- ✅ Multi-indicator, multi-country coverage
- ✅ Direct, key-less World Bank API integration
- ✅ Historical time series retrieval
- ✅ Null-value filtering
- ✅ Real-time Dataset push
- ✅ Production-ready code

# Actor input Schema

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

Country code (e.g. US, GB, IN, BD, or 'all'). Default is 'all'.

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

Comma-separated indicator codes, or type 'all' for common indicator set. Leave empty for default (NY.GDP.MKTP.CD).

## `useApifyProxy` (type: `boolean`):

Recommended to ensure reliable connections and avoid rate-limiting.

## `apifyProxyGroups` (type: `array`):

Select proxy networks (RESIDENTIAL is recommended).

## Actor input object example

```json
{
  "country": "all",
  "useApifyProxy": true,
  "apifyProxyGroups": [
    "RESIDENTIAL"
  ]
}
```

# 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("datapilot/world-bank-development-data-collector").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("datapilot/world-bank-development-data-collector").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 '{}' |
apify call datapilot/world-bank-development-data-collector --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datapilot/world-bank-development-data-collector"
        }
    }
}

```

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/kel3JqEy3AjFwHT2Z/builds/n2KORJ2l7W9dPMlBS/openapi.json
