# World Bank Macroeconomic Indicators API

> World Bank Macroeconomic Indicators API is a paid API for AI agents from x402-datashop-production.up.railway.app, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Returns normalized annual macroeconomic time series (inflation, GDP, debt, unemployment, etc.) for any country from the World Bank Indicators API, with 24-hour caching.

## Facts

- Endpoint: GET https://x402-datashop-production.up.railway.app/v1/global/macro
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/world-bank-macroeconomic-indicators-api-0a6d97a5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PX7uKw103WKsN-YDI5w73

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability world-bank-macroeconomic-indicators-api-0a6d97a5
```

Example prompt: Pull the World Bank macroeconomic data for the United States — give me the last 10 years of inflation (FP.CPI.TOTL.ZG), newest first.

## When to prefer this

Use this endpoint when you need official World Bank annual macroeconomic indicators (inflation, GDP, government debt, unemployment) for any of 200+ countries in normalized JSON format with caching. Prefer this over raw World Bank API calls for convenience, normalization, and caching. Ideal for trend analysis, cross-country comparisons, and economic research pipelines.

## Known failure modes

- Invalid ISO3 country code returns an error or empty result
- Unsupported or misspelled World Bank indicator ID returns no data
- Years parameter out of range (outside 1-20) may return an error
- World Bank upstream API unavailability may cause failures
- No data available for a country-indicator combination returns empty series

## How this service works

Annual macroeconomic series from the World Bank Indicators API, normalized JSON. Query: ?country=USA&indicator=FP.CPI.TOTL.ZG&years=5 (ISO3 country code; common indicators: FP.CPI.TOTL.ZG inflation %, NY.GDP.MKTP.CD GDP current US$, GC.DOD.TOTL.GD.ZS gov debt %GDP, SL.UEM.TOTL.ZS unemployment %). Returns the last N years with values, newest first. 200+ countries; 24h cache.

## Output

A normalized JSON array of annual data points for the requested country and World Bank indicator, sorted newest-first, covering the last N years with available values. Each record includes the year and the indicator value.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "years": {
       "type": "integer",
       "default": 5,
       "description": "Last N years (1-20)"
      },
      "country": {
       "type": "string",
       "default": "USA",
       "description": "ISO3 country code"
      },
      "indicator": {
       "type": "string",
       "default": "FP.CPI.TOTL.ZG",
       "description": "World Bank indicator id"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/world-bank-macroeconomic-indicators-api-0a6d97a5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-datashop-production.up.railway.app](https://www.zero.xyz/host/x402-datashop-production.up.railway.app/llms.txt)
