# World Bank Inflation Rate by Country (CPI, Annual %)

> World Bank Inflation Rate by Country (CPI, Annual %) is a paid API for AI agents from agent-data-tools.revmesh2074.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-23).

Returns the annual consumer price inflation rate (CPI % change) for any country for up to 10 years, sourced from a World Bank Open Data snapshot.

## Facts

- Endpoint: GET https://agent-data-tools.revmesh2074.workers.dev/econ/inflation?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-23
- Activations on Zero: 0
- Provider: agent-data-tools.revmesh2074.workers.dev
- Website: https://agent-data-tools.revmesh2074.workers.dev
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-data-tools-revmesh2074-workers-dev-world-bank-inflation-rate-by-7a10e589
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_81mgeBCmI-fjtfj6LWhrU

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 agent-data-tools-revmesh2074-workers-dev-world-bank-inflation-rate-by-7a10e589
```

Example prompt: What's the annual consumer price inflation rate for Turkey over the last 5 years, according to World Bank data?

## When to prefer this

Use this endpoint when you need authoritative, internationally comparable consumer price inflation data from the World Bank for any country. Prefer this over web scraping or news APIs when you need structured, historical CPI data in a machine-readable format for economic analysis, real-return calculations, or macro research. The committed snapshot ensures consistent, reproducible results.

## Known failure modes

- Unknown or misspelled country name/code returns an error or empty result
- Years parameter outside 1-10 range may be rejected or clamped
- World Bank data may not have the most recent year if not yet published in the snapshot
- Some small or data-sparse countries may have partial or missing years in the series

## How this service works

Inflation rate of any country: annual % change in consumer prices (CPI) from World Bank data, for the last 1-10 years with the newest year first. Country by ISO code (SE, SWE) or English name. Read from a committed World Bank Open Data snapshot (CC BY 4.0), so every call answers at once; the snapshot date is in the answer. Use for real-return, pricing and macro questions.

## Output

Returns a JSON object with the country's metadata (ISO codes, name, region, capital, income level), the latest year's inflation value, and an array of annual CPI inflation percentages for the requested number of years (newest first), along with the World Bank indicator name and snapshot date.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "country"
 ],
 "properties": {
  "years": {
   "type": "integer",
   "description": "Years of history to return, 1-10 (default 5)"
  },
  "country": {
   "type": "string",
   "description": "ISO 3166 code (SE, SWE) or English country name (Sweden)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "source": {
   "type": "string"
  },
  "country": {
   "type": "object",
   "properties": {
    "code": {
     "type": "string"
    },
    "iso2": {
     "type": "string"
    },
    "name": {
     "type": "string"
    },
    "region": {
     "type": "string"
    },
    "capital": {
     "type": "string"
    },
    "incomeLevel": {
     "type": "string"
    }
   }
  },
  "inflation": {
   "type": "object",
   "properties": {
    "latest": {
     "type": "object",
     "properties": {
      "year": {
       "type": "number"
      },
      "value": {
       "type": "number"
      }
     }
    },
    "values": {
     "type": "array",
     "items": {
      "type": "object",
      "properties": {
       "year": {
        "type": "number"
       },
       "value": {
        "type": "number"
       }
      }
     }
    },
    "indicator": {
     "type": "string"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-data-tools-revmesh2074-workers-dev-world-bank-inflation-rate-by-7a10e589/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-data-tools.revmesh2074.workers.dev](https://www.zero.xyz/host/agent-data-tools.revmesh2074.workers.dev/llms.txt)
