# CPI Inflation API

> CPI Inflation provides monthly Consumer Price Index data broken down by category including food, housing, transportation, medical care, and more. Includes year-over-year and month-over-month inflation rates for each category, with three-month changes on paid plans.

**Endpoint:** `GET https://api.apiverve.com/v1/cpiinflation`  
**Category:** Finance  
**Cost:** 2 credits per call  
**Canonical page:** https://apiverve.com/marketplace/cpiinflation

## Overview

CPI Inflation is built on the official U.S. Bureau of Labor Statistics (BLS) Consumer Price Index series. Monthly all-items data is available from 1913 to the latest release, with category breakdowns (from 1947 or later, depending on the category) for detailed inflation analysis. Each category carries its year-over-year, month-over-month and three-month percent changes.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/cpiinflation?date=2023-06&category=food" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `date` | string | No | Optional date in YYYY-MM format for historical lookup. Omit for current data.. date |
| `category` | string | No | Optional category filter: all, food, housing, apparel, transportation, medical, recreation, education, gasoline, electricity. category=all also returns the figures under categories.all, which every plan can read |

## Response fields

- `yearMonth` — string · Year and month in YYYY-MM format for the data
- `year` — number · The year of the CPI data point
- `month` — number · The month (1-12) of the CPI data
- `category` — string · The category requested (single-category lookups only)
- `index` — number · CPI index value for the requested category (single-category lookups only) · (premium)
- `yearOverYearChange` — number · Year-over-year change in percent for the requested category (single-category lookups only) · (premium)
- `monthOverMonthChange` — number · Percent change in the category index from the previous month · (premium)
- `threeMonthChange` — number · Percent change in the category index from three months earlier · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "yearMonth": "2026-09",
    "year": 2026,
    "month": 9,
    "category": "food",
    "index": 350.905,
    "yearOverYearChange": 2.48,
    "monthOverMonthChange": 0.14,
    "threeMonthChange": 0.34
  }
}
```

## Use cases

- **Inflation Tracking** — Monitor inflation trends across different spending categories
- **Economic Analysis** — Analyze inflation patterns for economic research and forecasting
- **Cost Adjustments** — Calculate inflation adjustments for contracts, salaries, and pricing
- **Investment Research** — Factor inflation data into investment decisions and real returns

## SDKs

- **npm** — `npm install @apiverve/cpiinflation` (https://www.npmjs.com/package/@apiverve/cpiinflation)
- **NuGet** — `dotnet add package APIVerve.API.CPIInflation` (https://www.nuget.org/packages/APIVerve.API.CPIInflation)
- **Source** — https://github.com/apiverve/cpiinflation-api

## More

- Full reference: https://docs.apiverve.com/ref/cpiinflation
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
