# 2s Inflation Rates API

> 2s Inflation Rates API is a paid API for AI agents from 2s.io, paid per call via x402, $0.00144/call, status unknown (last checked 2026-10-10).

Returns current and historical US inflation rate data (CPI, PCE, PPI, and related measures) sourced from FRED

## Facts

- Endpoint: GET https://2s.io/api/inflation/rates?utm_source=zero.xyz
- Price: $0.00144/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-inflation-rates-api-e4ea453b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pXMHOA81vM66dvBRWSwES

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-inflation-rates-api-e4ea453b
```

Example prompt: What's the latest core PCE inflation rate — give me the index value, month-over-month, and year-over-year change?

## When to prefer this

Use this endpoint when you need real-time, ground-truth US inflation data from FRED across multiple measures (CPI, PCE, PPI, core variants, shelter, food, energy, medical, import/export prices) without requiring signup or API keys, paying only per call in USDC.

## Known failure modes

- Invalid measure name returns an error or empty result
- No data available for a requested measure
- Payment not processed — endpoint returns 402 Payment Required
- Network timeout if FRED upstream is slow

## How this service works

Current US inflation rates by measure, with the index level plus computed year-over-year and month-over-month % change. Pass measure for one, or omit for all. Measures: cpi, cpi-nsa, core-cpi, cpi-w, pce, core-pce, ppi, cpi-food, cpi-energy, cpi-shelter, cpi-medical, import-prices, export-prices — i.e. headline CPI (SA + NSA), core CPI, CPI-W, PCE, core PCE (the Fed's 2% target gauge), PPI final demand, and CPI by category (food, energy, shelter, medical) + import/export prices. The YoY change is the headline "inflation rate". Each result names the FRED series ID used. Source: BLS/BEA via FRED (St. Louis Fed). For raw access to any other series use bls.series; this is the curated, rate-computed layer.

## Output

A JSON object with an array of inflation data items, each containing the measure name (e.g. 'core-pce'), index value, as-of date, month-over-month percent change, year-over-year percent change, FRED series ID, and a human-readable label. Also includes source attribution (FRED / Federal Reserve Bank of St. Louis) and a total count.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "measure": "core-pce"
  }
 }
}
```

## 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": {
     "properties": {
      "measure": {
       "type": "string",
       "description": "One measure to return, or omit for all. One of: cpi, cpi-nsa, core-cpi, cpi-w, pce, core-pce, ppi, cpi-food, cpi-energy, cpi-shelter, cpi-medical, import-prices, export-prices."
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-inflation-rates-api-e4ea453b/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)
