US CPI year-over-year inflation
GET /api/cpi-yoyLatest US Consumer Price Index year-over-year inflation rate (headline CPI-U) plus the trailing 12 months of YoY readings - the headline inflation number. Send GET /api/cpi-yoy with no input and pay $0.005 per call over x402 or MPP (there is no free tier). It returns a JSON object with date, inflationYoYPct, trailing12mo and source.
Source: FRED CPIAUCSL with pc1 transformation. No params.
Parameters
US CPI year-over-year inflation takes no parameters.
Example request
curl -i "https://agent402.tools/api/cpi-yoy"
Without payment this returns HTTP 402 Payment Required with the exact price for cpi-yoy; any x402 v2 or MPP client pays it and retries.
Example response
{
"date": "2026-05-01",
"inflationYoYPct": 3.4,
"trailing12mo": [
{
"date": "2025-06-01",
"value": 3
}
],
"source": "FRED CPIAUCSL (BLS)"
}
| Field | Type | Always present | In the example |
|---|---|---|---|
date | string | yes | 2026-05-01 |
inflationYoYPct | number | yes | 3.4 |
trailing12mo | array of objects | yes | 1 item in the example |
source | string | yes | FRED CPIAUCSL (BLS) |
From an MCP client
catalog.call {
"slug": "cpi-yoy",
"params": {}
}
The hosted connector at https://agent402.tools/mcp needs a payment for cpi-yoy; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.
Errors and behavior
- There is no input to get wrong: any request to /api/cpi-yoy runs the tool.
- A paid call that ends in any status of 400 or above is not charged over x402, MPP or a prepaid credits key: settlement is cancelled when the tool fails. The exception is a Tempo push credential, a transfer the buyer sent before the call: it settles before the tool runs, so if the tool then fails the payment is recorded as a refund owed to the paying wallet.
- Wallet-only: this tool reaches the network or stored state, so it has no proof-of-work tier. A prepaid card-credits key issued earlier (
Authorization: Bearer a402_...) also pays it. - A
POSTwith a JSON body to /api/cpi-yoy is served as this GET, with the body as the input. - An
Idempotency-Keyheader makes a retried paid call replay the first 200 instead of charging again (an answer larger than 1 MB is not replayed).
Paid call (JavaScript agent)
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/cpi-yoy");
Part of these workflows
US CPI year-over-year inflation is one step in these 5 skill packs, each sold as a single call:
- Fixed-income desk - Read the rate environment and price a bond in one workflow: the live Treasury curve, the recession-signal spread, inflation context, then price and yield a specific coupon bond at current rates.
- Macro economics - Pull the canonical US macro dataset - yield curve, CPI, unemployment, fed funds, Sahm rule - without an API key.
- Macro dashboard refresh - The full macro + crypto dashboard in one call: 5 FRED series, 5 Treasury reads, yield-curve spread, crypto market/trending/global, and live gas - the 14-tool basket recurring buyers refresh every cycle, bundled below its a la carte price.
- Macro backdrop snapshot - The 'is the economic backdrop you're modeling against still current?' pack. Pull the canonical macro signals - CPI year-over-year, unemployment, fed funds, the Treasury yield curve, a G10 FX dashboard, the Sahm Rule recession indicator, and the next scheduled economic releases - in one composed workflow. Seven egress tools, one composite snapshot the agent can cite before doing any forecast or investment math.
- Inflation check - Is the economy in recession territory? CPI, fed funds, unemployment, and Sahm rule in one call.
Related tools
FRED time series
GET /api/fred-seriesFetch any of FRED's ~800,000 economic time series by series ID - GDP (GDPC1), CPI (CPIAUCSL), unemployment (UNRATE), fed…
FRED economic release calendar
GET /api/fred-release-calendarUpcoming and very-recent US economic data release dates - CPI, employment, GDP, FOMC minutes, Treasury auctions, etc. Us…
FRED bulk release observations (v2)
GET /api/fred-release-observationsBulk-fetch observations for every series in a FRED release in one call. Use it to grab an entire economic report (jobs r…
US unemployment rate (UNRATE)
GET /api/unemployment-rateLatest US unemployment rate (current, as of date) plus a trailing N-month history of {date, value} for trend, seasonally…
Effective federal funds rate
GET /api/fed-fundsCurrent effective federal funds rate (current, as of date, in percent) plus a trailing N-day history of {date, value}. S…
FRED catalog search
GET /api/fred-searchFull-text search across FRED's ~800,000 economic time series. Returns series IDs (use with /api/fred-series), titles, fr…