# Inflation Rate API

> Inflation Rate reports annual inflation rates and Consumer Price Index (CPI) values for any country by two-letter country code. Outputs include the year-over-year price change percentage, CPI index, and base comparison year, with paid plans supporting historical lookups by year. On paid plans, changes=true adds the prior year's rate and the change from it, plus the 5-year average, high, low and cumulative CPI rise.

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

## Overview

Inflation Rate is an inflation API built on consumer price index data from the World Bank. Send a two-letter country code and get the annual inflation rate as a year-over-year percentage, the CPI index level with its base year, and when the figure was last updated. It answers inflation by country questions for pricing tools, salary adjustment calculators, economic dashboards and research notebooks.

Annual World Bank figures arrive late, so a call without a year returns the most recent year that has actually been published rather than an empty result for last year. On the Free plan that latest reading is what you get.

Paid plans can ask for any specific year and, with changes=true, add context around the reading: the prior year's rate, the change in percentage points and its direction, the average, high and low rate over the five years ending at the reading, and how much the CPI index rose over the same five years.

## 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/inflation?country=US&year=2023&changes=true" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `country` | string | Yes | ISO 2-letter or 3-letter country code (e.g., US, USA, GB, JP, DE, BR). UK is accepted for GB. length 2-3 |
| `year` | integer | No | The year to retrieve data for. Defaults to the most recent year with published data for that country (usually one to two years behind).. range 1960-2030. Premium field |
| `changes` | boolean | No | Include the previous year's rate, the change from it, and the 5-year average, high, low and CPI rise. default false |

## Response fields

- `country` — string · ISO 2-letter country code of the requested country
- `countryName` — string · Full name of the country in English
- `year` — number · Year for which inflation data was retrieved
- `inflationRate` — number · Annual inflation rate as percentage year-over-year change
- `cpiIndex` — number · Consumer Price Index value for the year
- `cpiBaseYear` — number · Base year used for CPI calculation and comparison
- `lastUpdated` — string · ISO 8601 timestamp of last data update
- `previousYear` — number · Year before the reading, when stored (with changes=true) · (premium)
- `previousInflationRate` — number · Annual inflation rate for the previous year (with changes=true) · (premium)
- `inflationRateChange` — number · Change in the inflation rate from the previous year, in percentage points (with changes=true) · (premium)
- `changeDirection` — string · Whether the rate went up, down or was unchanged from the previous year (with changes=true) · (premium)
- `averageInflationRate5y` — number · Average annual inflation rate over the five years ending at the reading; null if any year is missing (with changes=true) · (premium)
- `highInflationRate5y` — number · Highest annual inflation rate over the five years ending at the reading (with changes=true) · (premium)
- `lowInflationRate5y` — number · Lowest annual inflation rate over the five years ending at the reading (with changes=true) · (premium)
- `cpiChange5y` — number · Cumulative percent rise in the CPI index over the five years ending at the reading (with changes=true) · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "country": "US",
    "countryName": "United States",
    "year": 2023,
    "inflationRate": 4.12,
    "cpiIndex": 139.74,
    "cpiBaseYear": 2010,
    "lastUpdated": "2026-11-06T04:00:00.000Z",
    "previousYear": 2022,
    "previousInflationRate": 8,
    "inflationRateChange": -3.88,
    "changeDirection": "down",
    "averageInflationRate5y": 3.97,
    "highInflationRate5y": 8,
    "lowInflationRate5y": 1.23,
    "cpiChange5y": 21.34
  }
}
```

## Use cases

- **Salary Adjustment Calculations** — Compensation software calculates real wage growth across international offices by adjusting regional salaries against annual inflation figures.
- **Cross-Border Contract Indexing** — When drafting multi-year vendor agreements, legal teams index payment schedules to annual consumer price changes for each supplier's country.
- **Portfolio Return Deflation** — Wealth management dashboards subtract local consumer price index shifts from gross portfolio returns to present accurate purchasing power gains.
- **Purchasing Power Modeling** — To forecast global product pricing, revenue teams evaluate relative purchasing power trends using annual price change rates and index values.

## SDKs

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

## More

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