# World Bank Multi-Country Indicator Comparison

> World Bank Multi-Country Indicator Comparison is a paid API for AI agents from worldbank-x402.vercel.app, paid per call via x402, $0.004/call, status down (last checked 2026-10-13).

Compares a single World Bank development indicator across up to 10 countries simultaneously, returning the most recent value per country sorted descending.

## Facts

- Endpoint: GET https://worldbank-x402.vercel.app/worldbank/compare?utm_source=zero.xyz
- Price: $0.004/call
- Payment: x402
- Status: down
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/worldbank-x402-vercel-app-3c7e6fd2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4B9lET313hIlRsHRz7OeO

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 worldbank-x402-vercel-app-3c7e6fd2
```

Example prompt: Compare GDP per capita (NY.GDP.PCAP.CD) across the US, China, Germany, Japan, UK, France, India, Brazil, Canada, and Australia — rank them from highest to lowest.

## When to prefer this

Use this endpoint when you need to cross-compare a specific World Bank development indicator across multiple countries at once, rather than querying country by country. Ideal for ranking, benchmarking, or visualizing how nations stack up on a single metric like GDP, life expectancy, or CO2 emissions. Prefer over the single-country endpoint when the user wants a multi-country leaderboard or comparison table.

## Known failure modes

- Invalid or unrecognized indicator code returns an error or empty results
- More than 10 country codes provided returns a validation error
- Invalid ISO2 country codes produce missing entries or errors
- World Bank API unavailable causes 502/503 upstream errors
- Some countries may have no data for the requested indicator, resulting in null values or missing entries

## How this service works

Compare a World Bank indicator across multiple countries simultaneously. Returns most recent value per country, sorted descending. Up to 10 countries.

## Output

An array of up to 10 objects, each containing the country name, ISO3 country code, most recent year available, and numeric indicator value, sorted from highest to lowest value. Also returns the indicator name/code used.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "countries": "US,CN,DE,JP,GB",
   "indicator": "SP.URB.TOTL.IN.ZS"
  }
 }
}
```

## 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": [
      "indicator",
      "countries"
     ],
     "properties": {
      "countries": {
       "type": "string",
       "description": "Comma-separated ISO2 country codes (max 10)"
      },
      "indicator": {
       "type": "string",
       "description": "Named alias or World Bank indicator code"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "results": {
       "type": "array"
      },
      "indicator": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/worldbank-x402-vercel-app-3c7e6fd2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from worldbank-x402.vercel.app](https://www.zero.xyz/host/worldbank-x402.vercel.app/llms.txt)
