# World Bank Data Monitor: 29k Indicators, 200+ Countries (MCP) (`amygraphics/world-bank-data-monitor`) Actor

Official World Bank API for AI agents: search 29,544 indicators by keyword, pull country series as clean rows, and monitor watched indicators for new or revised values across 200+ economies. No key. MCP-ready.

- **URL**: https://apify.com/amygraphics/world-bank-data-monitor.md
- **Developed by:** [Zakaria el bouami](https://apify.com/amygraphics) (community)
- **Categories:** Lead generation, Automation, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## World Bank Data Monitor: 29k Indicators, 200+ Countries (MCP)

The **entire World Bank open-data catalog** — 29,544 official indicators across 200+ economies (GDP, population, trade, health, education, energy, finance…) — through one clean format. **Find indicators by keyword, pull country series, and get alerted when new figures or revisions are published.** Official World Bank API v2, no key, no login. MCP-compatible and agent-ready.

### Why this matters

- The World Bank quietly **revises history** — last year's GDP for a country can change without notice. Monitor mode catches both *new observations* and *revisions* (`value-changed` keeps the old number in `info`).
- Agents answering "Morocco GDP growth last year?" no longer guess — they get the **exact official value, year, and source URL**.
- The catalog is enormous and painful to browse by humans; search mode maps plain keywords ("school enrollment", "renewable energy consumption") to the exact indicator codes.

### Three modes

#### `search` — find the right indicator

```json
{ "mode": "search", "query": "foreign direct investment", "maxResults": 10 }
```

→ indicator code, official name, source organization, topics list.

#### `dataset` — pull a series

```json
{ "mode": "dataset", "indicatorCode": "NY.GDP.MKTP.CD", "countries": "MA,FR", "dateFrom": "2010", "maxResults": 30 }
```

→ one row per observation: `{country: "Morocco", year: "2025", value: 182374250612.28}` with the exact API URL.

#### `monitor` — new & revised figures

```json
{ "mode": "monitor", "watchIndicators": ["NY.GDP.MKTP.CD@MA", "SP.POP.TOTL@MA,FR,US"], "maxResults": 30 }
```

- **Run 1 = free baseline** — snapshots the latest value per country.
- **Run 2+** emits only: `new-value` (a newer year appeared) and `value-changed` (revision, with old → new in `info`).
- Schedule weekly; when nothing moved, the run is a summary row plus **$0.001** start.

### Recipes

1. **Agent tool (MCP)** — your AI agent answers macro questions about any country with sourced numbers, not training-memory.
2. **Country-risk bot** — NGOs, journalists and analysts watch their country pack; the row arrives the day the World Bank publishes.
3. **Research pull** — dataset mode with a country list = clean, exportable series for any indicator.

### Data honesty & limits

- Values come **only** from the official World Bank API at run time; missing observations (`..`) are omitted.
- Annual series dominate the source; some indicators update quarterly/monthly — every observation year is included in `year`.
- The 29k-indicator catalog (~19 MB) is fetched live per search run (2 requests) so results are never stale.

### Pricing

| event | price |
|---|---|
| Actor start | $0.001 |
| World Bank datapoint | $0.001 / row |

Typical runs: keyword search ×10 ≈ **$0.011** · weekly monitor with one new figure ≈ **$0.002**.

### MCP / AI-agent usage

```
https://api.apify.com/v2/acts/YOUR_HANDLE~world-bank-data-monitor/run-sync-get-dataset-items?token=YOUR_TOKEN
```

Input = the JSON examples above. Output = rows as documented. Compatible with per-request agentic payments.

Questions / requests: **Issues** tab on Apify Store.

# Actor input Schema

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

search = find indicators by keyword · dataset = pull a country series · monitor = alert on new/revised values for your watched indicators.

## `query` (type: `string`):

(search) Keywords matched against indicator names + codes + topics, e.g. "renewable energy consumption".

## `indicatorCode` (type: `string`):

(dataset) World Bank code from search mode, e.g. NY.GDP.MKTP.CD (GDP current US$), SP.POP.TOTL (population total).

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

(dataset) Comma-separated ISO2/ISO3 codes, e.g. MA,FR,US — empty = all 200+ economies (use maxResults).

## `dateFrom` (type: `string`):

(dataset) Only observations from this year forward, e.g. 2015.

## `watchIndicators` (type: `array`):

(monitor) Specs: "CODE@COUNTRY" or "CODE@C1,C2" or bare "CODE" (all countries). Each run records the latest value per country and alerts on new or revised values. Example: \["NY.GDP.MKTP.CD@MA", "SP.POP.TOTL@MA,FR,US"].

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

Cap rows returned per run (each billed row $0.001).

## `requestDelaySecs` (type: `number`):

Politeness delay between World Bank API requests. Keep >= 0.2.

## Actor input object example

```json
{
  "mode": "search",
  "query": "",
  "indicatorCode": "",
  "countries": "",
  "dateFrom": "",
  "watchIndicators": [],
  "maxResults": 50,
  "requestDelaySecs": 0.4
}
```

# 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("amygraphics/world-bank-data-monitor").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("amygraphics/world-bank-data-monitor").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 amygraphics/world-bank-data-monitor --silent --output-dataset

```

## MCP server setup

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

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/AsSIwjB45HTs7HrkH/builds/mzWm0FpGbvj3FkdU7/openapi.json
