Consumer Price Index (Inflation)
bls.macro.cpiFetch U.S. CPI-U data by category and year range to analyze inflation, calculate cost-of-living adjustments, and adjust returns for real value.
Instructions
Get U.S. Consumer Price Index (CPI-U) data by item category and year range. Returns monthly values, year-over-year percentage change, and a full data series. Categories: "all" = All Items (headline inflation), "food", "energy", "shelter", "core" = All Items Less Food and Energy. Covers data from 1913 (All Items) through the most recently released month. Ideal for inflation analysis, cost-of-living calculations, real-return adjustments, and economic research. Data source: BLS Consumer Expenditure Survey, CPI-U series (urban consumers).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item | No | CPI category: "all" = All Items CPI-U (default), "food" = Food, "energy" = Energy, "shelter" = Shelter, "core" = All Items Less Food and Energy. | |
| end_year | No | Last year of CPI data (default: current year). | |
| start_year | No | First year of CPI data (default: current year - 4). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present only when the call failed. Includes error code, message, request_id, and any provider-specific extras. | |
| result | No | Tool response payload. Shape varies per tool — consult the tool description and inputSchema. May be an object, array, string, or number depending on the upstream provider response. |