# World Bank Indicator Time Series

> World Bank Indicator Time Series is a paid API for AI agents from 2s.io, paid per call via x402, $0.0012/call, status unknown (last checked 2026-09-14).

Fetches a paginated time series of any World Bank indicator (GDP, population, inflation, etc.) for one country or all countries, with optional year range filtering.

## Facts

- Endpoint: GET https://2s.io/api/worldbank/indicator
- Price: $0.0012/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-eeb9bb49
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gEQ0EFwAl_nQ77Rf0BWoa

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 2s-io-eeb9bb49
```

Example prompt: Can you pull the World Bank time series for GDP in current US dollars (indicator NY.GDP.MKTP.CD) for the United States from 1990 to 2023?

## When to prefer this

Use this endpoint when you need structured, historical time-series data from the World Bank for macroeconomic, demographic, or development indicators across one or all countries. Prefer this over general web search when you need precise numeric values, multi-decade trends, or programmatically usable structured data rather than narrative summaries.

## Known failure modes

- Invalid or unknown indicator code returns empty results or error
- Invalid country code returns 400 or empty dataset
- Year range outside supported bounds (pre-1960) returns validation error
- Data missing for requested years returns null values in observations
- Network timeout or upstream World Bank API unavailability returns 5xx
- Page number beyond total pages returns empty results array

## How this service works

World Bank Open Data — fetch a time series of a specific indicator for a country (or 'all'). 1000+ indicators across 200+ countries, many series going back to 1960. Indicator codes are dotted-token strings, e.g., NY.GDP.MKTP.CD (GDP current US$), SP.POP.TOTL (population total), FP.CPI.TOTL.ZG (inflation CPI annual %), SL.UEM.TOTL.ZS (unemployment %), SE.ADT.LITR.ZS (adult literacy %), SP.DYN.LE00.IN (life expectancy). Country = ISO 2-letter (e.g., US, CN), ISO 3-letter (USA, CHN), or 'all'. Optional yearFrom/yearTo bracket. Each observation: country id+name, year, numeric value (may be null for missing), obsStatus. Returns indicator name + total count + pagination metadata.

## Output

Returns an array of annual observations each containing country id and name, year, and numeric value (possibly null for missing data), plus the indicator's display name, total observation count, and pagination metadata (page, limit, total pages).

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "page": 1,
   "limit": 50,
   "yearTo": 2023,
   "country": "US",
   "yearFrom": 1990,
   "indicator": "NY.GDP.MKTP.CD"
  }
 }
}
```

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "required": [
      "country",
      "indicator"
     ],
     "properties": {
      "page": {
       "type": "integer",
       "default": 1,
       "minimum": 1
      },
      "limit": {
       "type": "integer",
       "default": 50,
       "maximum": 100,
       "minimum": 1
      },
      "yearTo": {
       "type": "integer",
       "maximum": 2100,
       "minimum": 1960
      },
      "country": {
       "type": "string",
       "description": "ISO 2/3-letter country code or 'all'."
      },
      "yearFrom": {
       "type": "integer",
       "maximum": 2100,
       "minimum": 1960
      },
      "indicator": {
       "type": "string",
       "description": "World Bank indicator code, e.g., NY.GDP.MKTP.CD."
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-eeb9bb49/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
