# National Macro Indicator Records — World Bank (`nexgensignal/national-macro-indicator-records`) Actor

Per-record World Bank development indicators (country x indicator x year) from the official keyless API. GDP, inflation, trade, and thousands more, with data vintage. CC BY 4.0, no personal data.

- **URL**: https://apify.com/nexgensignal/national-macro-indicator-records.md
- **Developed by:** [NexGen Signal](https://apify.com/nexgensignal) (community)
- **Categories:** Business, News, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $33.50 / 1,000 indicator records

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 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

## National Macro Indicator Records — World Bank

**Official source. No API key. Pay per record.**

This actor turns the **World Bank's development-indicators database** into clean, per-observation records — one row for every country × indicator × year data point. Each run reads the keyless World Bank Indicators API and delivers GDP, inflation, trade, unemployment, population, and any of thousands of other series, with the country, the year, the value, the unit, and the **data vintage** on every record. Country and organization grain, licensed CC BY 4.0, no person fields.

### What this is, in one paragraph

The World Bank publishes global development data — the World Development Indicators and many other series — as a keyless API keyed by country and indicator code. This actor reads that API for the indicators you choose, paginates every observation, and flattens each into a single analysis-ready row: which country, which indicator, which year, the value, and the source vintage (the `lastupdated` date so you know exactly which data release you got). Missing observations are excluded and counted, so you are billed only for real data points. Values are verbatim.

### Who buys this and for what job

- **Economists, analysts, and researchers** pulling standardized cross-country macro series without stitching together CSV downloads.
- **Fintech, risk, and sovereign-analysis teams** feeding GDP, inflation, and trade series into models with a known vintage.
- **Dashboards and data products** ingesting a clean, per-observation macro feed keyed by ISO country code and indicator.
- **Data engineers** who want a keyless, one-call global indicators feed already reduced to one row per data point.

### Licence — CC BY 4.0, commercial use permitted

World Bank development indicators are World Bank-produced datasets and carry the World Bank's default dataset licence: **Creative Commons Attribution 4.0 (CC BY 4.0)**. The World Bank states this licence lets you *"copy, modify and distribute data in any format for any purpose, including commercial use"*, with attribution. Every record carries: *"The World Bank: World Development Indicators: data.worldbank.org (CC BY 4.0)."* These are observation records for analysis — not investment or economic advice; values are periodically revised, so the vintage travels on every record.

### Country / organization grain — no person data

This actor works at country and indicator grain — national aggregates and World Bank regional/income groupings. There are no natural-person fields in this data, and this actor emits none, with a person-key guard on every record as a backstop.

### Pricing

| Event | Free plan | Bronze | Silver | Gold / Platinum / Diamond |
|-------|-----------|--------|--------|---------------------------|
| `indicator_record` | $0.05 | $0.045 | $0.04 | $0.0335 |

Delivered before charged. Blocked runs and empty results (and missing observations) cost nothing.

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `indicators` | string list | core macro set | World Bank indicator codes (e.g. `NY.GDP.MKTP.CD`, `FP.CPI.TOTL.ZG`). |
| `country` | string | all | `all` for every country/aggregate, or ISO codes (semicolon-separated, e.g. `USA;CHN;DEU`). |
| `dateRange` | string | — | Optional. A single year (`2024`) or range (`2010:2024`). |
| `maxRecords` | integer | 500 | Ceiling on records delivered and billed. |

The default indicator set covers GDP (current US$ and growth), inflation, unemployment, trade (% of GDP), and total population.

### Output

One JSON object per observation. Real example (values verbatim):

```json
{
  "record_id": "USA:NY.GDP.MKTP.CD:2024",
  "country_code": "USA",
  "country_name": "United States",
  "indicator_id": "NY.GDP.MKTP.CD",
  "indicator_name": "GDP (current US$)",
  "year": "2024",
  "value": 29298013000000,
  "unit": null,
  "obs_status": null,
  "decimals": 0,
  "source_vintage": "2026-07-13",
  "source_id": "2",
  "source": "World Bank Indicators API (v2)",
  "source_url": "https://data.worldbank.org/indicator/NY.GDP.MKTP.CD?locations=USA",
  "licence": "World Bank development indicators ... CC BY 4.0 ... including commercial use ...",
  "attribution": "The World Bank: World Development Indicators: data.worldbank.org (CC BY 4.0).",
  "observed_at": "2026-08-19T00:00:00Z"
}
```

An unbilled `RUN_RECEIPT` records the robots check, the indicators and filters, observations seen, missing observations skipped, records delivered, and whether charged equals delivered.

### Field reference

Each record is one observation. Identity: `record_id` (the `country:indicator:year` composite). Where and what: `country_code` (ISO3), `country_name`, `indicator_id`, and `indicator_name`. The data point: `year`, `value`, `unit`, `obs_status`, and `decimals`. Provenance and vintage: `source_vintage` (the World Bank `lastupdated` date for this data release), `source_id`, `source`, `source_url` (a direct data.worldbank.org link), `licence`, `attribution`, `disclaimer`, and `observed_at`.

### How a run works

A run first re-reads the source's robots posture from your runtime — the API host serves no robots file, a no-policy posture — and stops at the door if that ever changes. For each indicator you requested, it reads observations page by page (up to 1,000 at a time) for the countries and date range you set, recording the World Bank's own `lastupdated` vintage into every record. Each non-missing observation is flattened to one record and delivered **before** it is charged, so a blocked or empty run costs you nothing. Observations with no value are excluded and tallied in the receipt as `missing_skipped`, so you never pay for an empty cell. The actor paces between pages and stops at your `maxRecords` ceiling; `charge_equals_delivered` in the receipt confirms you were billed for exactly what you received.

### Cost guidance

One `indicator_record` per delivered observation: cost = observations delivered × your plan's per-record price. A single indicator across all countries and years is on the order of 17,000 observations; scope with `dateRange` (one year is a few hundred observations) or `country` (a single country is a handful per indicator per year) to keep runs bounded. 1,000 observations is **$50** (Free) / **$33.50** (Gold).

### Indicator coverage

The World Bank exposes thousands of indicator codes across dozens of source databases — national accounts, prices, labour, trade, debt, health, education, environment, and governance — and this actor can pull any of them: pass the codes you want in `indicators`. The default set is a compact macro dashboard (GDP level and growth, inflation, unemployment, trade openness, and population) chosen to be useful out of the box, but a fintech team might swap in debt and reserves series, a development analyst might pull health and education series, and a climate desk might pull emissions and energy series — all through the same one row per country × indicator × year shape. Because every record carries the indicator code and name alongside the value, a mixed pull across many indicators stays self-describing and easy to pivot.

### Honest limitations

- **Observation grain.** One row per country × indicator × year — not a pre-built time series object.
- **Values are revised.** The World Bank restates figures; the `source_vintage` on every record tells you which release you pulled, so diff by vintage to catch revisions.
- **Missing observations are skipped** (excluded and counted in the receipt) — you are billed only for real data points.
- **Indicator codes are the World Bank's** — an unknown code returns no data (a genuine-empty result, which costs nothing).
- **No person data** is emitted.

### Differentiation

Same publisher as **world-bank-project-records**, deliberately different record class: that actor delivers development **projects** (the lending pipeline), this one delivers macro **indicators** (country statistics) — both named so buyers pick the right grain. It is also distinct from the EU-source macro cells in the NexGenData fleet (Eurostat/ECB): those cover EU statistics, while this is global country coverage from the World Bank.

### The NexGen Signal family

Part of the NexGen Signal family of official-source, pay-per-record products:

- [World Bank Project Records — Development Pipeline](https://apify.com/nexgensignal/world-bank-project-records)
- [EU Regulatory Change Records — EUR-Lex](https://apify.com/nexgensignal/eu-regulatory-change-records)
- [Federal Rulemaking Records — US Federal Register](https://apify.com/nexgensignal/federal-rulemaking-records)
- [EMA Medicine Status Records — EU Medicines](https://apify.com/nexgensignal/ema-medicine-status-records)
- [Organization Sanctions & LEI Risk](https://apify.com/nexgensignal/organization-sanctions-lei-risk)

*Source: World Bank Indicators API (v2), data.worldbank.org. Licensed CC BY 4.0 (the World Bank's default dataset licence — commercial use permitted with attribution). Reformatted to observation records; values verbatim; missing observations excluded and counted; no person data emitted.*

# Actor input Schema

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

World Bank indicator codes (e.g. NY.GDP.MKTP.CD, FP.CPI.TOTL.ZG). Defaults to a core macro set.

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

'all' for every country/aggregate, or ISO codes (semicolon-separated, e.g. USA;CHN;DEU).

## `dateRange` (type: `string`):

Optional. A single year (2024) or range (2010:2024).

## `maxRecords` (type: `integer`):

Maximum records delivered and billed. You are billed only for records delivered.

## Actor input object example

```json
{
  "indicators": [
    "NY.GDP.MKTP.CD",
    "NY.GDP.MKTP.KD.ZG",
    "FP.CPI.TOTL.ZG",
    "SL.UEM.TOTL.ZS",
    "NE.TRD.GNFS.ZS",
    "SP.POP.TOTL"
  ],
  "country": "all",
  "maxRecords": 500
}
```

# Actor output Schema

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

The delivered World Bank indicator observations.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

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

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "indicators": [
        "NY.GDP.MKTP.CD",
        "NY.GDP.MKTP.KD.ZG",
        "FP.CPI.TOTL.ZG",
        "SL.UEM.TOTL.ZS",
        "NE.TRD.GNFS.ZS",
        "SP.POP.TOTL"
    ],
    "maxRecords": 500
};

// Run the Actor and wait for it to finish
const run = await client.actor("nexgensignal/national-macro-indicator-records").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "indicators": [
        "NY.GDP.MKTP.CD",
        "NY.GDP.MKTP.KD.ZG",
        "FP.CPI.TOTL.ZG",
        "SL.UEM.TOTL.ZS",
        "NE.TRD.GNFS.ZS",
        "SP.POP.TOTL",
    ],
    "maxRecords": 500,
}

# Run the Actor and wait for it to finish
run = client.actor("nexgensignal/national-macro-indicator-records").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "indicators": [
    "NY.GDP.MKTP.CD",
    "NY.GDP.MKTP.KD.ZG",
    "FP.CPI.TOTL.ZG",
    "SL.UEM.TOTL.ZS",
    "NE.TRD.GNFS.ZS",
    "SP.POP.TOTL"
  ],
  "maxRecords": 500
}' |
apify call nexgensignal/national-macro-indicator-records --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nexgensignal/national-macro-indicator-records"
        }
    }
}

```

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/Wi20mtoxcBjfKSQja/builds/5xaJJCobnMqwlTbJw/openapi.json
