81trust / 100

Inflation

by x402stock.xyz in Markets & finance

x402 APIPassing, checked 1 h ago

US consumer price inflation from the Bureau of Labor Statistics: the latest headline CPI-U and core (ex food and energy) index levels with year-over-year percent change, plus recent monthly history. No ticker needed. Use for macro-aware analysis without leaving for a separate data source. Sourced from US BLS. From x402stock, a market & economic data API (x402, USDC).

GET https://x402stock.xyz/api/v1/inflation

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
202 ms typical, 202 ms slowest 5%
Last check
1 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://x402stock.xyz/api/v1/inflation"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fx402stock.xyz%2Fapi%2Fv1%2Finflation
const res = await pay("https://x402stock.xyz/api/v1/inflation");
console.log(await res.json());

Example input

{}

Example output

{
  "as_of": "2026-04-01T00:00:00.000Z",
  "core": {
    "latest_index": 326.18,
    "latest_month": "2026-04",
    "yoy_percent": 3.1
  },
  "headline": {
    "latest_index": 320.32,
    "latest_month": "2026-04",
    "yoy_percent": 2.7
  },
  "history": [
    {
      "date": "2026-04",
      "period_name": "April",
      "value": 320.32
    }
  ],
  "series": "cpi_u_us_city_average",
  "source": "us_bls",
  "unit": "index_1982_84=100"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
1 h agoPassed402282 ms$0.02
6 h agoPassed402202 ms$0.02