# World Bank Data Scraper - Economic & Dev Indicators (`logiover/world-bank-data-scraper`) Actor

Scrape World Bank Open Data by country, indicator code, or full directory. Extract GDP, population, inflation, unemployment, and 16,000+ indicators. No API key, no login.

- **URL**: https://apify.com/logiover/world-bank-data-scraper.md
- **Developed by:** [Logiover](https://apify.com/logiover) (community)
- **Categories:** Other
- **Stats:** 2 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 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/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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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 Data Scraper — Economic & Development Indicators, Time-Series & Country Metadata

Scrape the World Bank Open Data API — the world's most comprehensive source of free global economic and development statistics — without any API key, login, or rate-limit hurdles. Extract GDP, population, inflation, unemployment, poverty rates, and 16,000+ more indicators across 200+ countries, fully paginated, ready to export as CSV, JSON, or Excel.

### What does World Bank Data Scraper do?

This actor connects directly to the official World Bank Open Data REST API (`https://api.worldbank.org/v2`), which is keyless and freely accessible to everyone. It operates in three modes:

- **indicatorData** (main mode): Fetches time-series data for one indicator across multiple countries over a custom year range. You supply a semicolon-separated list of ISO2 country codes (or `all` for all countries), a World Bank indicator code like `NY.GDP.MKTP.CD`, and a start/end year. The actor paginates in 1,000-row batches using the `?page=N` parameter until all data is collected.
- **indicators**: Lists all 16,000+ available indicator codes with their names, descriptions, source notes, and topic tags. Ideal for discovering what metrics are available before building a pipeline.
- **countries**: Returns full metadata for all 295 World Bank country/territory records — ISO2/ISO3 codes, region, income level classification, capital city, and GPS coordinates.

The actor uses `got-scraping` for HTTP with retry logic, pushing clean normalized rows directly into an Apify dataset. No login, no API key, no browser — pure JSON API.

### Who is it for?

- **Economists and researchers** who need decades of GDP, inflation, or unemployment data for multiple countries in a single flat table.
- **Data journalists** who want to compare development indicators across regions for data-driven articles.
- **Business intelligence analysts** tracking macroeconomic trends for market-entry decisions.
- **Students and academics** building datasets for theses, papers, or quantitative coursework.
- **Government and NGO analysts** monitoring progress toward development goals across dozens of countries.

### Use cases

- Extract GDP per capita for all G20 countries from 1990 to 2023 and load it into Google Sheets for a comparative growth chart.
- Pull 20 years of inflation data (`FP.CPI.TOTL.ZG`) for emerging markets to analyze monetary policy impacts.
- Build a country metadata table with region, income level, and capital coordinates for a mapping dashboard.
- Automate quarterly downloads of World Bank poverty and unemployment data into a BI tool like Tableau or Power BI.
- Discover which indicator codes cover CO2 emissions, renewable energy, or gender equality by running the `indicators` mode and filtering by topic.

### Why use World Bank Data Scraper?

- **No API key required**: The World Bank API is fully open — zero registration, zero authentication, zero monthly quota drama.
- **16,000+ indicators**: GDP, population, education, health, poverty, gender, climate, trade, debt — every major development metric is available.
- **Multi-country bulk mode**: Pass `US;CN;IN;DE;GB` or `all` to pull thousands of rows in one run.
- **Long historical series**: Data goes back to 1960 for many indicators — ideal for longitudinal analysis.
- **Three modes in one actor**: Time-series data, indicator directory, and country metadata without needing separate tools.
- **Export as CSV, JSON, or Excel**: Apify datasets support one-click export in any format, or integrate via API into your pipeline.

### What data can you extract?

#### indicatorData mode fields

| Field | Type | Description |
|-------|------|-------------|
| `country` | string | Full country name (e.g. "United States") |
| `countryCode` | string | ISO 2-letter country code (e.g. "US") |
| `countryIso3` | string | ISO 3-letter country code (e.g. "USA") |
| `indicator` | string | Human-readable indicator name (e.g. "GDP (current US$)") |
| `indicatorCode` | string | World Bank code (e.g. "NY.GDP.MKTP.CD") |
| `date` | string | Year or date period (e.g. "2023") |
| `value` | string | Numeric value as string (null if data unavailable) |
| `unit` | string | Unit of measurement if provided |
| `observationStatus` | string | Status code (E = estimate, P = provisional, etc.) |

#### indicators mode fields

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Indicator code (e.g. "NY.GDP.MKTP.CD") |
| `name` | string | Indicator display name |
| `sourceNote` | string | Full description of what is measured |
| `topics` | string | Comma-separated topic tags |
| `unit` | string | Default unit |

#### countries mode fields

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | ISO 3-letter country code |
| `iso2Code` | string | ISO 2-letter code |
| `name` | string | Country name |
| `region` | string | World Bank region (e.g. "East Asia & Pacific") |
| `incomeLevel` | string | Income classification (High/Upper-middle/Lower-middle/Low) |
| `capitalCity` | string | Capital city name |
| `latitude` | string | GPS latitude of capital |
| `longitude` | string | GPS longitude of capital |

#### Output example (indicatorData)

```json
{
  "country": "United States",
  "countryCode": "US",
  "countryIso3": "USA",
  "indicator": "GDP (current US$)",
  "indicatorCode": "NY.GDP.MKTP.CD",
  "date": "2023",
  "value": "27811517000000",
  "unit": "",
  "observationStatus": ""
}
````

### How to use

#### Option A: Time-series data for specific countries and indicator

Use `indicatorData` mode to pull years of data for any combination of countries and indicators.

**Steps:**

1. Go to the actor's **Input** tab.
2. Set **Mode** to `indicatorData`.
3. Enter your country codes in **Countries** (e.g. `US;CN;IN;DE;GB`), or type `all`.
4. Enter the **Indicator Code** (e.g. `NY.GDP.MKTP.CD` for GDP). See common codes below.
5. Set **Date From** and **Date To** (e.g. 2000 and 2023).
6. Click **Start**.

```json
{
  "mode": "indicatorData",
  "countries": "US;CN;IN;DE;GB",
  "indicator": "NY.GDP.MKTP.CD",
  "dateFrom": 2000,
  "dateTo": 2023
}
```

**Common indicator codes:**

| Indicator | Code |
|-----------|------|
| GDP (current US$) | `NY.GDP.MKTP.CD` |
| GDP per capita (current US$) | `NY.GDP.PCAP.CD` |
| Population, total | `SP.POP.TOTL` |
| Inflation, consumer prices (%) | `FP.CPI.TOTL.ZG` |
| Unemployment, total (% of labor force) | `SL.UEM.TOTL.ZS` |
| Life expectancy at birth (years) | `SP.DYN.LE00.IN` |
| CO2 emissions (metric tons per capita) | `EN.ATM.CO2E.PC` |
| Internet users (% of population) | `IT.NET.USER.ZS` |

#### Option B: Discover all available indicators

Use `indicators` mode to browse the full catalog of 16,000+ indicator codes before building your pipeline.

```json
{
  "mode": "indicators",
  "maxResults": 500
}
```

#### Option C: Country metadata

Use `countries` mode to get the full list of countries with region, income classification, and coordinates.

```json
{
  "mode": "countries"
}
```

### Input parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `mode` | string | `indicatorData` | Mode: `indicatorData`, `indicators`, or `countries` |
| `countries` | string | `US;CN;IN;DE;GB` | Semicolon-separated ISO2 codes or `all`. Only for `indicatorData` mode |
| `indicator` | string | `NY.GDP.MKTP.CD` | World Bank indicator code. Only for `indicatorData` mode |
| `dateFrom` | integer | `2000` | Start year (1960–2030). Only for `indicatorData` mode |
| `dateTo` | integer | `2023` | End year (1960–2030). Only for `indicatorData` mode |
| `maxResults` | integer | `0` | Max records to push (0 = unlimited) |
| `proxyConfiguration` | object | Apify datacenter | Proxy settings |

**Full input JSON (indicatorData):**

```json
{
  "mode": "indicatorData",
  "countries": "US;CN;IN;DE;GB;JP;BR;FR",
  "indicator": "SP.POP.TOTL",
  "dateFrom": 1990,
  "dateTo": 2023,
  "maxResults": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["DATACENTER"]
  }
}
```

### Output example (full object)

```json
{
  "country": "China",
  "countryCode": "CN",
  "countryIso3": "CHN",
  "indicator": "GDP (current US$)",
  "indicatorCode": "NY.GDP.MKTP.CD",
  "date": "2022",
  "value": "17963170970000",
  "unit": "",
  "observationStatus": ""
}
```

### Tips for best results

- **Use `all` countries sparingly**: It returns 16,000+ rows per indicator per year range. Start with a few countries to validate your setup, then scale up.
- **Combine with `indicators` mode first**: Run `indicators` with `maxResults: 100` to browse available codes before committing to a big pull.
- **Year ranges matter**: Not all indicators have data before 1990. Narrow `dateFrom` if you get many null values.
- **Null values are normal**: World Bank data has gaps — `value: null` means the observation was not collected for that year/country, not that the scraper failed.
- **GDP is in current US dollars**: `NY.GDP.MKTP.CD` values like `27811517000000` are raw USD (not millions). Divide by 1e9 for billions in your spreadsheet.
- **Use `maxResults` for testing**: Set `maxResults: 50` for a quick sanity check before running a full multi-country pull.
- **Datacenter proxy is sufficient**: The World Bank API does not block datacenter IPs — no residential proxy needed.
- **Schedule quarterly runs**: World Bank updates data monthly. Use Apify's scheduler to auto-refresh your dataset.
- **Export to Google Sheets**: After a run, click **Export → Google Sheets** on the dataset page for instant pivot-table analysis.
- **Use ISO2 codes**: The actor accepts standard 2-letter codes like `US`, `DE`, `IN`. Do not use country names or ISO3 in the `countries` field.

### Integrations

**Google Sheets**: Export your dataset directly from the Apify UI (Dataset → Export → Google Sheets) or use the Google Sheets integration to auto-sync on each run.

**Zapier / Make**: Trigger a Zap or Make scenario whenever a new run completes. Push freshly scraped World Bank data to Airtable, Notion, a database, or a Slack channel.

**Webhooks**: Configure a webhook in the actor's settings to POST run results to your own endpoint — ideal for triggering downstream ETL pipelines.

**Schedule**: Use Apify's built-in scheduler to run this actor monthly or quarterly and keep your economic dataset perpetually fresh.

**API**: The Apify API exposes each dataset as a JSON/CSV endpoint that you can query directly from Python, R, Node.js, or any BI tool.

### API usage

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/logiover~world-bank-data-scraper/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode":"indicatorData","countries":"US;CN;IN","indicator":"NY.GDP.MKTP.CD","dateFrom":2010,"dateTo":2023}'
```

#### Node.js

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('logiover/world-bank-data-scraper').call({
  mode: 'indicatorData',
  countries: 'US;CN;IN;DE;GB',
  indicator: 'NY.GDP.MKTP.CD',
  dateFrom: 2000,
  dateTo: 2023,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient('YOUR_TOKEN')
run = client.actor('logiover/world-bank-data-scraper').call(run_input={
    'mode': 'indicatorData',
    'countries': 'US;CN;IN;DE;GB',
    'indicator': 'NY.GDP.MKTP.CD',
    'dateFrom': 2000,
    'dateTo': 2023,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
```

### Use with AI agents (MCP)

This actor is compatible with Apify's Model Context Protocol (MCP) server, which means you can call it directly from Claude, GPT-4, or any MCP-enabled AI agent. Ask your AI assistant: *"Use the logiover/world-bank-data-scraper actor to fetch GDP data for the BRICS countries from 2000 to 2023 and compare their growth trajectories."* The agent will invoke the actor via the Apify MCP tool, retrieve the dataset, and perform the analysis — no manual API calls required.

### FAQ

#### Does this actor require an API key?

No. The World Bank Open Data API is completely free and keyless. You do not need to register, generate tokens, or configure credentials of any kind.

#### How many countries and indicators are available?

The World Bank covers 295 countries and territories, with over 16,000 indicator codes across topics including macroeconomics, health, education, environment, trade, and governance.

#### How many rows can one run produce?

A typical run with `countries=all`, a single indicator, and a 30-year date range produces around 6,000–9,000 rows (one per country per year). Running multiple indicators or wider date ranges multiplies this proportionally.

#### Why are some `value` fields null?

World Bank data has legitimate gaps. Not every country reports every indicator every year. A `null` value means the data point was not available in the World Bank database — it is not a scraper error.

#### Can I fetch multiple indicators in one run?

The current version supports one indicator per run. To fetch multiple indicators, run the actor once per indicator (use Apify's scheduler or API) and merge the resulting datasets by country + year.

#### How do I find the right indicator code?

Run the actor in `indicators` mode with `maxResults: 200`. You will get the full list of codes. Alternatively, browse the World Bank Data Catalog at data.worldbank.org.

#### How often is the World Bank data updated?

Most indicators are updated annually, with the main bulk release in late spring (April–June). Some indicators like commodity prices update more frequently. World Bank shows the `lastupdated` date in the API response.

#### How fast does the actor run?

A 5-country × 24-year pull (120 rows) typically completes in under 10 seconds. A full `all` countries run for one indicator (6,000+ rows) typically takes 30–90 seconds depending on pagination.

#### Is this data legal to use?

Yes. The World Bank Open Data is published under the Creative Commons Attribution 4.0 International license (CC BY 4.0). Commercial and non-commercial use is both permitted with attribution.

#### How do I export to Excel or CSV?

In the Apify Console, open the run's dataset and click the **Export** button. You can download as CSV, Excel, JSON, or XML. You can also access the same exports via the Apify API.

#### What is the difference between `NY.GDP.MKTP.CD` and `NY.GDP.PCAP.CD`?

`NY.GDP.MKTP.CD` is total GDP in current US dollars. `NY.GDP.PCAP.CD` is GDP divided by population — GDP per capita. Use per capita for fair country comparisons.

#### Can I use this actor with Python pandas?

Yes. Fetch the dataset via the Apify Python client or direct CSV/JSON URL and load it with `pd.read_json()` or `pd.read_csv()`. The flat row format with country, date, and value maps naturally to a DataFrame.

### Is it legal?

World Bank Open Data is published under the Creative Commons Attribution 4.0 International license. The API is publicly available without authentication and is explicitly designed for programmatic access. This actor accesses only the official public endpoints documented at `https://datahelpdesk.worldbank.org/knowledgebase/articles/889392-about-the-indicators-api-documentation`. No login credentials are used, no personal data is collected, and the usage complies with the World Bank's Terms of Use for open data access. As with any public dataset, verify any data quality or coverage requirements before using results in high-stakes decisions.

### Related scrapers

- [**UN Comtrade Data Scraper**](https://apify.com/logiover/comtrade-trade-data-scraper) — International merchandise trade statistics from the UN Comtrade database. Complements World Bank macro data with bilateral trade flows.
- [**Company Registry Scrapers**](https://apify.com/logiover) — Country-level business registry scrapers (France, Finland, Australia, Czech Republic, and more) for company-level data to pair with country macro indicators.
- [**B2B Lead Scraper**](https://apify.com/logiover/b2b-lead-scraper) — OSM-based company and contact scraper for sector-level B2B lead generation by country.

# Actor input Schema

## `mode` (type: `string`):

What to scrape: indicatorData (time-series values), indicators (list of available indicators), or countries (country metadata).

## `countries` (type: `string`):

Semicolon-separated ISO2 country codes (e.g. US;CN;IN;DE;GB) or 'all' for all countries. Used only in indicatorData mode.

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

World Bank indicator code (e.g. NY.GDP.MKTP.CD for GDP, SP.POP.TOTL for population). Used only in indicatorData mode.

## `dateFrom` (type: `integer`):

Start year for time-series data (e.g. 2000). Used only in indicatorData mode.

## `dateTo` (type: `integer`):

End year for time-series data (e.g. 2023). Used only in indicatorData mode.

## `maxResults` (type: `integer`):

Maximum number of records to return (0 = unlimited). Useful for testing.

## `proxyConfiguration` (type: `object`):

Proxy settings. Apify Proxy (automatic) is recommended; the Actor also falls back to a direct connection if the proxy is unavailable.

## Actor input object example

```json
{
  "mode": "indicatorData",
  "countries": "US;CN;IN;DE;GB",
  "indicator": "NY.GDP.MKTP.CD",
  "dateFrom": 2000,
  "dateTo": 2023,
  "maxResults": 0,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

All records extracted by this run. Open the Dataset tab to browse, filter, and export as CSV, JSON, or Excel.

# 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 = {
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("logiover/world-bank-data-scraper").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 = { "proxyConfiguration": { "useApifyProxy": True } }

# Run the Actor and wait for it to finish
run = client.actor("logiover/world-bank-data-scraper").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 '{
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call logiover/world-bank-data-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "World Bank Data Scraper - Economic & Dev Indicators",
        "description": "Scrape World Bank Open Data by country, indicator code, or full directory. Extract GDP, population, inflation, unemployment, and 16,000+ indicators. No API key, no login.",
        "version": "1.0",
        "x-build-id": "eJchxbBHvxx9bW4Gs"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/logiover~world-bank-data-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-logiover-world-bank-data-scraper",
                "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/logiover~world-bank-data-scraper/runs": {
            "post": {
                "operationId": "runs-sync-logiover-world-bank-data-scraper",
                "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/logiover~world-bank-data-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-logiover-world-bank-data-scraper",
                "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": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "indicatorData",
                            "indicators",
                            "countries"
                        ],
                        "type": "string",
                        "description": "What to scrape: indicatorData (time-series values), indicators (list of available indicators), or countries (country metadata).",
                        "default": "indicatorData"
                    },
                    "countries": {
                        "title": "Countries",
                        "type": "string",
                        "description": "Semicolon-separated ISO2 country codes (e.g. US;CN;IN;DE;GB) or 'all' for all countries. Used only in indicatorData mode.",
                        "default": "US;CN;IN;DE;GB"
                    },
                    "indicator": {
                        "title": "Indicator Code",
                        "type": "string",
                        "description": "World Bank indicator code (e.g. NY.GDP.MKTP.CD for GDP, SP.POP.TOTL for population). Used only in indicatorData mode.",
                        "default": "NY.GDP.MKTP.CD"
                    },
                    "dateFrom": {
                        "title": "Date From (Year)",
                        "minimum": 1960,
                        "maximum": 2030,
                        "type": "integer",
                        "description": "Start year for time-series data (e.g. 2000). Used only in indicatorData mode.",
                        "default": 2000
                    },
                    "dateTo": {
                        "title": "Date To (Year)",
                        "minimum": 1960,
                        "maximum": 2030,
                        "type": "integer",
                        "description": "End year for time-series data (e.g. 2023). Used only in indicatorData mode.",
                        "default": 2023
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum number of records to return (0 = unlimited). Useful for testing.",
                        "default": 0
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings. Apify Proxy (automatic) is recommended; the Actor also falls back to a direct connection if the proxy is unavailable."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
