---
title: "Prices and inflation API | Narwhal API"
description: "Query official CPI and inflation data by country through REST or MCP. Retrieve the latest accepted value, an exact period or dated history."
url: "https://narwhalapi.com/api/economics/prices"
---

All APIs

# Prices and inflation API

Query official CPI and inflation data by country through REST or MCP. Retrieve the latest accepted value, an exact period or dated history.

[Get a free API key](https://narwhalapi.com/signup)
[Read the docs →](https://narwhalapi.com/docs/api/economics.md)

## First request

### Get the latest value

```
curl --request GET \
  --url "https://api.narwhalapi.com/v1/economics/USA/cpi?period=2026-07" \
  --header "Authorization: Bearer $NARWHAL_API_KEY"
```

## Endpoints

GET Consumer Price Index`/v1/economics/{country}/cpi`

Retrieve the headline consumer price index for one country and month.

#### Parameters

- `country` required One supported uppercase country code; see this operation’s coverage list.
- `period` optional Omit it for the latest accepted complete release, or pass one exact period.
- `version_id` optional Optional immutable publication version. Use resource_version from a dataset.published or dataset.revised event; omit to read the current admitted indicator.

#### Response fields

- `country` string The requested uppercase ISO alpha-3 country code.
- `period` string The official observation period returned.
- `value` positive decimal string The headline index level.
- `index_base` string Base period and base value of the index, for example 1982-84=100.
- `released_on` date The official publication date, not Narwhal's retrieval time.
- `source` object The optional source object appears only when the statistic is received through a distributor. It contains publisher (the original publisher named by the distributor) and distributor (the distributing organisation). When source is present, released_on is the distributor's publication date, not the original publisher's release date. Publisher-direct series omit source.

---

[Full reference →](https://narwhalapi.com/docs/api/economics/cpi.md)

GET Consumer Price Index history`/v1/economics/{country}/cpi/observations`

Retrieve the current accepted consumer price index time series for one country.

#### Parameters

- `country` required One supported uppercase country code; see this operation’s coverage list.
- `start` optional Inclusive first observation period. A year in YYYY format works only for countries served from World Bank annual data. A national series rejects it with 400 invalid_query.
- `end` optional Inclusive last observation period. A year in YYYY format works only for countries served from World Bank annual data. A national series rejects it with 400 invalid_query.
- `limit` optional Maximum number of periods returned. Defaults to 100. A page may contain fewer periods; follow next_cursor.
- `cursor` optional The next_cursor from the previous page.
- `version` optional Accepts first_reported only: returns the first stored value per period with first_reported_at. Cannot be combined with as_of.
- `as_of` optional Returns the series as published through the end of the specified UTC day. Cannot be combined with version.

#### Response fields

- `country` string The requested uppercase ISO alpha-3 country code. Returned once per page, not for each observation.
- `start` string Present only when Narwhal moves the requested start to a later period. Earlier periods are not returned.
- `as_of` RFC 3339 timestamp When the source last updated the newest observation on this page, in whole seconds, UTC.
- `source` object Provenance for a statistic received through a distributor; see the latest-value operation.
- `frequency` string Present, as annual, only for yearly World Bank history. Periods are then years in YYYY format.
- `index_base` string Base period and base value of the index, for example 1982-84=100. A page never spans two bases.
- `observations` array Oldest-first accepted observations, one per period. Missing source values are omitted, never filled. A page can hold fewer observations than limit; follow next_cursor until it is null.
- `observations[].period` string The official month, quarter or year represented by the observation.
- `observations[].first_reported_at` RFC 3339 timestamp Present only with version=first_reported, this UTC timestamp records when Narwhal first stored the period (the latest time if its measures were stored separately); periods released before capture began show Narwhal's first capture.
- `observations[].value` decimal string The accepted index level without binary floating-point conversion.
- `next_cursor` string or null Pass this unchanged as cursor to read the next page; null on the last page.

---

[Full reference →](https://narwhalapi.com/docs/api/economics/cpi-history.md)

GET Inflation`/v1/economics/{country}/inflation`

Retrieve year-over-year, month-over-month, and year-to-date inflation for one month.

#### Parameters

- `country` required One supported uppercase country code; see this operation’s coverage list.
- `period` optional Omit it for the latest accepted complete release, or pass one exact period.
- `version_id` optional Optional immutable publication version. Use resource_version from a dataset.published or dataset.revised event; omit to read the current admitted indicator.

#### Response fields

- `country` string The requested uppercase ISO alpha-3 country code.
- `period` string The official observation period returned.
- `year_over_year` decimal string Change from the same month one year earlier, in percent.
- `month_over_month` decimal string Change from the previous month, in percent. Left out where the publisher releases only the year-over-year figure.
- `quarter_over_quarter` decimal string Change from the previous quarter, in percent. Sent instead of month_over_month for New Zealand, whose figures are quarterly.
- `year_to_date` decimal string Change from the prior December, in percent. Omitted when the publisher does not release it.
- `released_on` date The official publication date, not Narwhal's retrieval time.
- `source` object The optional source object appears only when the statistic is received through a distributor. It contains publisher (the original publisher named by the distributor) and distributor (the distributing organisation). When source is present, released_on is the distributor's publication date, not the original publisher's release date. Publisher-direct series omit source. On a newest figure read from the publisher's own release, source is {"publisher": "..."} with no distributor, and released_on is the publisher's local release day.
- `stage` string Appears only on a newest figure read from the publisher's release. Which reading of the figure this is: flash, advance, first, second, third, preliminary or final.
- `published_at` RFC 3339 timestamp Appears only on a newest figure read from the publisher's release. When the publisher released the figure.
- `provisional` true Present, as true, only when the figure read from the release is marked provisional.
- `calculated` array of strings Present only when Narwhal calculated a figure from the publisher's own numbers because the publisher does not print it. Lists the calculated figures: ["year_over_year"], ["month_over_month"] or both. A printed figure always wins over a calculated one. A stored answer can carry it too, not only an answer read from the release.

---

[Full reference →](https://narwhalapi.com/docs/api/economics/inflation.md)

GET Inflation history`/v1/economics/{country}/inflation/observations`

Retrieve the current accepted inflation time series for one country.

#### Parameters

- `country` required One supported uppercase country code; see this operation’s coverage list.
- `start` optional Inclusive first observation period. A year in YYYY format works only for countries served from World Bank annual data. A national series rejects it with 400 invalid_query.
- `end` optional Inclusive last observation period. A year in YYYY format works only for countries served from World Bank annual data. A national series rejects it with 400 invalid_query.
- `limit` optional Maximum number of periods returned. Defaults to 100. A page may contain fewer periods; follow next_cursor.
- `cursor` optional The next_cursor from the previous page.
- `version` optional Accepts first_reported only: returns the first stored value per period with first_reported_at. Cannot be combined with as_of.
- `as_of` optional Returns the series as published through the end of the specified UTC day. Cannot be combined with version.

#### Response fields

- `country` string The requested uppercase ISO alpha-3 country code. Returned once per page, not for each observation.
- `start` string Present only when Narwhal moves the requested start to a later period. Earlier periods are not returned.
- `as_of` RFC 3339 timestamp When the source last updated the newest observation on this page, in whole seconds, UTC.
- `source` object Provenance for a statistic received through a distributor; see the latest-value operation.
- `frequency` string Present, as annual, only for yearly World Bank history. Periods are then years in YYYY format.
- `observations` array Oldest-first accepted observations, one per period. Missing source values are omitted, never filled. A page can hold fewer observations than limit; follow next_cursor until it is null.
- `observations[].period` string The official month, quarter or year represented by the observation.
- `observations[].first_reported_at` RFC 3339 timestamp Present only with version=first_reported, this UTC timestamp records when Narwhal first stored the period (the latest time if its measures were stored separately); periods released before capture began show Narwhal's first capture.
- `observations[].year_over_year` decimal string Change from the same month one year earlier, in percent.
- `observations[].month_over_month` decimal string Change from the previous month, in percent.
- `observations[].quarter_over_quarter` decimal string Change from the previous quarter, in percent. Sent instead of month_over_month for New Zealand, whose figures are quarterly.
- `observations[].year_to_date` decimal string Change from the prior December, in percent. Omitted when the publisher does not release it.
- `observations[].calculated` array of strings Present only when Narwhal calculated a figure in this row from the publisher's own numbers because the publisher does not print it. Lists the calculated figures: "year_over_year", "month_over_month" and "year_to_date". A printed figure always wins over a calculated one.
- `next_cursor` string or null Pass this unchanged as cursor to read the next page; null on the last page.

---

[Full reference →](https://narwhalapi.com/docs/api/economics/inflation-history.md)

## Use cases

### Compare inflation across countries

Rank the latest inflation rates and keep each release date.

[Read the guide →](https://narwhalapi.com/how-to/compare-inflation-between-countries.md)

### Adjust a price for inflation

Use CPI index levels to see what an old price is worth now.

[Read the guide →](https://narwhalapi.com/how-to/adjust-a-price-for-inflation.md)

### CPI year over year and month over month

Get the rates from the API or work them out from index levels.

[Read the guide →](https://narwhalapi.com/how-to/calculate-cpi-year-over-year-and-month-over-month.md)

### Find the next CPI release

Read the reference month and the scheduled time of the next release.

[Read the guide →](https://narwhalapi.com/how-to/find-the-next-cpi-release-date.md)

### Calculate the real interest rate

Take inflation off a nominal yield with the Fisher formula.

[Read the guide →](https://narwhalapi.com/how-to/calculate-the-real-interest-rate.md)

### Get an alert before a release

Set a reminder with a calendar feed or a daily script.

[Read the guide →](https://narwhalapi.com/how-to/get-an-alert-before-an-economic-release.md)

## Coverage

### Indicators

- [CPI](https://narwhalapi.com/economics/consumer-price-index.md)
- [Inflation](https://narwhalapi.com/economics/inflation-rate.md)
- [Regional CPI](https://narwhalapi.com/docs/api/economics/regional.md)

### Countries

- [Australia](https://narwhalapi.com/economics/australia.md)
- [Austria](https://narwhalapi.com/economics/austria.md)
- [Belgium](https://narwhalapi.com/economics/belgium.md)
- [Brazil](https://narwhalapi.com/economics/brazil.md)
- [Canada](https://narwhalapi.com/economics/canada.md)
- [Switzerland](https://narwhalapi.com/economics/switzerland.md)
- [Chile](https://narwhalapi.com/economics/chile.md)
- [China](https://narwhalapi.com/economics/china.md)
- [Colombia](https://narwhalapi.com/economics/colombia.md)
- [Czechia](https://narwhalapi.com/economics/czechia.md)
- [Germany](https://narwhalapi.com/economics/germany.md)
- [Denmark](https://narwhalapi.com/economics/denmark.md)

Show all 42 countries

- [Spain](https://narwhalapi.com/economics/spain.md)
- [Estonia](https://narwhalapi.com/economics/estonia.md)
- [Finland](https://narwhalapi.com/economics/finland.md)
- [France](https://narwhalapi.com/economics/france.md)
- [United Kingdom](https://narwhalapi.com/economics/united-kingdom.md)
- [Croatia](https://narwhalapi.com/economics/croatia.md)
- [Indonesia](https://narwhalapi.com/economics/indonesia.md)
- [Ireland](https://narwhalapi.com/economics/ireland.md)
- [Italy](https://narwhalapi.com/economics/italy.md)
- [Japan](https://narwhalapi.com/economics/japan.md)
- [South Korea](https://narwhalapi.com/economics/south-korea.md)
- [Lithuania](https://narwhalapi.com/economics/lithuania.md)
- [Luxembourg](https://narwhalapi.com/economics/luxembourg.md)
- [Latvia](https://narwhalapi.com/economics/latvia.md)
- [Mexico](https://narwhalapi.com/economics/mexico.md)
- [Malaysia](https://narwhalapi.com/economics/malaysia.md)
- [Netherlands](https://narwhalapi.com/economics/netherlands.md)
- [Norway](https://narwhalapi.com/economics/norway.md)
- [Philippines](https://narwhalapi.com/economics/philippines.md)
- [Poland](https://narwhalapi.com/economics/poland.md)
- [Portugal](https://narwhalapi.com/economics/portugal.md)
- [Qatar](https://narwhalapi.com/economics/qatar.md)
- [Saudi Arabia](https://narwhalapi.com/economics/saudi-arabia.md)
- [Singapore](https://narwhalapi.com/economics/singapore.md)
- [Slovenia](https://narwhalapi.com/economics/slovenia.md)
- [Sweden](https://narwhalapi.com/economics/sweden.md)
- [Thailand](https://narwhalapi.com/economics/thailand.md)
- [United States](https://narwhalapi.com/economics/united-states.md)
- [New Zealand](https://narwhalapi.com/economics/new-zealand.md)
- [Pakistan](https://narwhalapi.com/economics/pakistan.md)

## Sources

- Australia Australian Bureau of Statistics (ABS)
- Austria Statistics Austria, Eurostat
- Belgium Statbel, National Bank of Belgium, Eurostat
- Brazil Brazilian Institute of Geography and Statistics (IBGE), Secretariat of Foreign Trade (SECEX)
- Canada Statistics Canada
- Switzerland Swiss Federal Statistical Office (FSO), Eurostat
- Chile Central Bank of Chile (BCCh), National Statistics Institute of Chile (INE)
- China National Bureau of Statistics of China, General Administration of Customs of China
- Colombia National Administrative Department of Statistics (DANE)
- Czechia Czech Statistical Office (ČSÚ)
- Germany Federal Statistical Office of Germany (Destatis)
- Denmark Statistics Denmark, Eurostat

Show all 42 sources

- Spain National Statistics Institute of Spain (INE), Spanish Tax Agency (AEAT)
- Estonia Statistics Estonia
- Finland Statistics Finland, Finnish Customs (Tulli)
- France National Institute of Statistics and Economic Studies (INSEE), French Customs
- United Kingdom Office for National Statistics (ONS)
- Croatia Croatian Bureau of Statistics (CBS)
- Indonesia Statistics Indonesia (BPS)
- Ireland Central Statistics Office (CSO)
- Italy Italian National Institute of Statistics (Istat), Eurostat
- Japan Statistics Bureau of Japan, Cabinet Office of Japan, Japan Customs
- South Korea Bank of Korea, Statistics Korea
- Lithuania State Data Agency of Lithuania
- Luxembourg STATEC, Eurostat
- Latvia Central Statistical Bureau of Latvia (CSB)
- Mexico INEGI
- Malaysia Department of Statistics Malaysia (DOSM)
- Netherlands Statistics Netherlands (CBS)
- Norway Statistics Norway (SSB)
- Philippines Philippine Statistics Authority (PSA)
- Poland Statistics Poland, Eurostat
- Portugal Statistics Portugal (INE)
- Qatar National Planning Council (NPC), via the Qatar Open Data portal
- Saudi Arabia General Authority for Statistics (GASTAT)
- Singapore Singapore Department of Statistics (SingStat), Singapore government open-data publications
- Slovenia Statistical Office of the Republic of Slovenia (SURS)
- Sweden Statistics Sweden (SCB)
- Thailand Trade Policy and Strategy Office
- United States Bureau of Labor Statistics (BLS), Bureau of Economic Analysis (BEA), US Census Bureau
- New Zealand Stats NZ
- Pakistan Pakistan Bureau of Statistics (PBS)

## Related APIs

### Economic data API

Official indicators for prices, labour, output, trade, and rates.

[Explore the API →](https://narwhalapi.com/api/economics.md)

### Economic calendar API

Release schedules, status, and publication versions.

[Explore the API →](https://narwhalapi.com/api/economic-calendar.md)

### Methodology

How releases are checked and revised.

[Read the methodology →](https://narwhalapi.com/methodology/economics.md)

## FAQ

Are both CPI levels and inflation rates available?

Yes. Live coverage includes CPI index levels and inflation rates.

Can I request a specific period?

Yes. You can request an exact period, retrieve dated history or query the latest accepted value.

Where do the statistics come from?

They are official statistics from national publishers, organized by country.

## Start with a free key

Free $10 credits every month, no card.Free $10 credits a month, no card.

[Get a free API key](https://narwhalapi.com/signup)
