---
title: "Country Inflation & CPI Data API"
slug: country-inflation-cpi-data
url: https://apyhub.com/martin10291/service/country-inflation-cpi-data
provider: Martin Petrov
categories: [Verification Kit]
tags: [inflation, cpi, economic-indicators, country-data, macro-economics, historical-data]
auth: api_key
version: 1.0
service_type: sync
endpoints: 1
atoms: 100
mcp: true
---

# Country Inflation & CPI Data API

Country Inflation API returns CPI and related data by country. Send years, months, or a country list, and get rows back. Free tier, no card.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/martin10291/country-inflation-cpi-data` | What it does Returns CPI and related economic-indicator data by country based on the selected mode.… | 100 |

## Endpoint reference

### Inflation API - CPI & Economic Indicators by Country

`POST https://api.eu.apyhub.com/martin10291/country-inflation-cpi-data` · 100 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `mode` | body | string | no | latest = newest yearly value per country and indicator (EU countries also get the newest monthly HICP); history = one row per country and year; monthly = Eurostat HICP per month (EU/EEA/candidate cou… |
| `limit` | body | integer | no | Maximum rows returned. Between 1 and 20000. Default: `20`. Example: `1000`. |
| `amount` | body | number | no | For adjust: the money amount to convert, e.g. 100. Default 100. |
| `toYear` | body | integer | no | For adjust: the target year. Default the latest year with CPI data. |
| `country` | body | string | no | For adjust: one country, e.g. US or Germany. Default US. |
| `endYear` | body | integer | no | For history: last year. Default the latest year with data. |
| `toMonth` | body | string | no | For adjust with monthly precision (EU countries, HICP index): YYYY-MM. |
| `endMonth` | body | string | no | For monthly: last month YYYY-MM. Default the newest month. |
| `fromYear` | body | integer | no | For adjust: the year of the original amount. Default 10 years before To year. |
| `countries` | body | array of string | no | ISO2 (US, DE, BG), ISO3 (USA, BGR) or English names (Germany). Up to 50. Empty = US, DE, GB, JP, BG. Example: `["US","DE","BG"]`. |
| `fromMonth` | body | string | no | For adjust with monthly precision (EU countries, HICP index): YYYY-MM. |
| `indicator` | body | string | no | For history: one indicator key, e.g. inflation or gdpGrowth. Default inflation. |
| `startYear` | body | integer | no | For history: first year (1960 or later). Default 10 years ago. |
| `indicators` | body | array of string | no | For latest: inflation, cpi, gdp, gdpGrowth, gdpPerCapita, unemployment, population, interestRate (or the raw World Bank code, e.g. FP.CPI.TOTL.ZG). Empty = inflation. Example: `["inflation","unemploy… |
| `startMonth` | body | string | no | For monthly: first month YYYY-MM. Default 24 months back. |

#### Quickstart

Get the latest inflation and CPI rows for a few countries in one request.

```bash
curl -X POST "https://api.eu.apyhub.com/martin10291/country-inflation-cpi-data" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode":"latest","countries":["US","DE","BG"]}'
```

#### What you'll get back

Returns a JSON object with `billed` as an integer, `count` as an integer, and `items` as an array of result objects.

Each item may include fields such as `iso3`, `unit`, `year`, `value`, `change`, `source`, `country`, `fetchedAt`, `indicator`, `countryName`, `monthlyHicp`, `previousYear`, `indicatorCode`, and `previousValue`.

```json
{
  "billed": 3,
  "count": 3,
  "items": [
    {
      "iso3": "USA",
      "country": "US",
      "indicator": "inflation",
      "year": 2023,
      "value": 4.1
    }
  ]
}
```

## About

## What it does

The Country Inflation API returns CPI and related economic data by country in one request. Send `mode` to choose `latest`, `history`, `monthly`, `adjust`, `indicators`, or `countries`. You can also send `limit`, `countries`, `indicator`, `startYear`, `endYear`, `startMonth`, or `endMonth` when the mode needs them. For `adjust`, send `amount`, `country`, `fromYear`, `toYear`, `fromMonth`, or `toMonth` to compare money across time.

You get back summary counts and rows with the country name, country code, indicator name, year, value, change, unit, source, and fetch time. Some rows also include the prior year or prior value. Monthly calls can include monthly HICP data.

Teams use the Country Inflation API to show inflation charts in finance tools. They use it to compare markets in reports. They also use it to adjust old prices for a country-based calculator.

To match country codes with names, use the [Countries Dictionary API](https://apyhub.com/apyhub/service/list-all-countries). To convert values after inflation, use the [Currency Converter API](https://apyhub.com/apyhub/service/convert-currency-pair-for-date).

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/martin10291/service/country-inflation-cpi-data
