# World Bank Macro Indicators by Country

> World Bank Macro Indicators by Country is a paid API for AI agents from agents.crowdspark.me, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-31).

Retrieves World Bank macroeconomic indicators (GDP, inflation, unemployment, etc.) for up to 10 countries across a range of years

## Facts

- Endpoint: GET https://agents.crowdspark.me/v1/data/macro?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/world-bank-macro-indicators-by-country-e988f236
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xtxPpP77BGNVtYyMkidjF

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-macro-indicators-by-country-e988f236
```

Example prompt: Can you pull the GDP and inflation figures for Germany, France, and the US for the last 5 years from the World Bank?

## When to prefer this

Choose this endpoint when you need structured, multi-country macroeconomic time-series data from the World Bank — especially for GDP, inflation, unemployment, trade, or debt metrics — and want a clean JSON response without parsing raw World Bank API responses yourself. Prefer it over direct World Bank API calls for agent workflows requiring minimal integration overhead and x402 micropayment compatibility.

## Known failure modes

- Invalid or unrecognized country code returns empty or error response
- Unknown indicator alias or World Bank code returns error
- Requesting more than 10 countries in a single call may be rejected
- Year range outside available World Bank data returns empty values
- Rate limit or payment failure returns 402 or 429 status

## How this service works

Pay-per-call utilities for AI agents over x402, USDC on Base.

## Output

A JSON object containing a 'series' array with each requested country's ISO3 code, country name, and an array of year/value pairs sorted newest first; plus metadata including the indicator's World Bank code and name, the data source attribution, and the last_updated date.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "to": {
       "type": "string",
       "description": "Optional last year"
      },
      "from": {
       "type": "string",
       "description": "Optional first year"
      },
      "limit": {
       "type": "string",
       "description": "1 to 60 values per country, default 10"
      },
      "country": {
       "type": "string",
       "description": "ISO2 or ISO3 code, or up to 10 joined with ;, default US"
      },
      "indicator": {
       "type": "string",
       "description": "Alias such as gdp or inflation, or a World Bank code like NY.GDP.MKTP.CD"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "series": [
   {
    "iso3": "USA",
    "values": [
     {
      "year": 2025,
      "value": 30769700000000
     },
     {
      "year": 2024,
      "value": 29298013000000
     }
    ],
    "country": "United States"
   }
  ],
  "source": "World Bank Open Data API (CC BY 4.0)",
  "indicator": {
   "code": "NY.GDP.MKTP.CD",
   "name": "GDP (current US$)"
  },
  "last_updated": "2026-10-08"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/world-bank-macro-indicators-by-country-e988f236/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.crowdspark.me](https://www.zero.xyz/host/agents.crowdspark.me/llms.txt)
