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.

Online99.99% uptime, last 30 days364 ms typical response

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

GETConsumer Price Index/v1/economics/{country}/cpi

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

Parameters

  • countryrequired

    One supported uppercase country code; see this operation’s coverage list.

  • periodoptional

    Omit it for the latest accepted complete release, or pass one exact period.

  • version_idoptional

    Optional immutable publication version. Use resource_version from a dataset.published or dataset.revised event; omit to read the current admitted indicator.

Response fields

  • countrystring

    The requested uppercase ISO alpha-3 country code.

  • periodstring

    The official observation period returned.

  • valuepositive decimal string

    The headline index level.

  • index_basestring

    Base period and base value of the index, for example 1982-84=100.

  • released_ondate

    The official publication date, not Narwhal's retrieval time.

  • sourceobject

    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 →
GETConsumer Price Index history/v1/economics/{country}/cpi/observations

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

Parameters

  • countryrequired

    One supported uppercase country code; see this operation’s coverage list.

  • startoptional

    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.

  • endoptional

    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.

  • limitoptional

    Maximum number of periods returned. Defaults to 100. A page may contain fewer periods; follow next_cursor.

  • cursoroptional

    The next_cursor from the previous page.

  • versionoptional

    Accepts first_reported only: returns the first stored value per period with first_reported_at. Cannot be combined with as_of.

  • as_ofoptional

    Returns the series as published through the end of the specified UTC day. Cannot be combined with version.

Response fields

  • countrystring

    The requested uppercase ISO alpha-3 country code. Returned once per page, not for each observation.

  • startstring

    Present only when Narwhal moves the requested start to a later period. Earlier periods are not returned.

  • as_ofRFC 3339 timestamp

    When the source last updated the newest observation on this page, in whole seconds, UTC.

  • sourceobject

    Provenance for a statistic received through a distributor; see the latest-value operation.

  • frequencystring

    Present, as annual, only for yearly World Bank history. Periods are then years in YYYY format.

  • index_basestring

    Base period and base value of the index, for example 1982-84=100. A page never spans two bases.

  • observationsarray

    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[].periodstring

    The official month, quarter or year represented by the observation.

  • observations[].first_reported_atRFC 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[].valuedecimal string

    The accepted index level without binary floating-point conversion.

  • next_cursorstring or null

    Pass this unchanged as cursor to read the next page; null on the last page.


Full reference →
GETInflation/v1/economics/{country}/inflation

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

Parameters

  • countryrequired

    One supported uppercase country code; see this operation’s coverage list.

  • periodoptional

    Omit it for the latest accepted complete release, or pass one exact period.

  • version_idoptional

    Optional immutable publication version. Use resource_version from a dataset.published or dataset.revised event; omit to read the current admitted indicator.

Response fields

  • countrystring

    The requested uppercase ISO alpha-3 country code.

  • periodstring

    The official observation period returned.

  • year_over_yeardecimal string

    Change from the same month one year earlier, in percent.

  • month_over_monthdecimal string

    Change from the previous month, in percent. Left out where the publisher releases only the year-over-year figure.

  • quarter_over_quarterdecimal string

    Change from the previous quarter, in percent. Sent instead of month_over_month for New Zealand, whose figures are quarterly.

  • year_to_datedecimal string

    Change from the prior December, in percent. Omitted when the publisher does not release it.

  • released_ondate

    The official publication date, not Narwhal's retrieval time.

  • sourceobject

    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.

  • stagestring

    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_atRFC 3339 timestamp

    Appears only on a newest figure read from the publisher's release. When the publisher released the figure.

  • provisionaltrue

    Present, as true, only when the figure read from the release is marked provisional.

  • calculatedarray 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 →
GETInflation history/v1/economics/{country}/inflation/observations

Retrieve the current accepted inflation time series for one country.

Parameters

  • countryrequired

    One supported uppercase country code; see this operation’s coverage list.

  • startoptional

    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.

  • endoptional

    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.

  • limitoptional

    Maximum number of periods returned. Defaults to 100. A page may contain fewer periods; follow next_cursor.

  • cursoroptional

    The next_cursor from the previous page.

  • versionoptional

    Accepts first_reported only: returns the first stored value per period with first_reported_at. Cannot be combined with as_of.

  • as_ofoptional

    Returns the series as published through the end of the specified UTC day. Cannot be combined with version.

Response fields

  • countrystring

    The requested uppercase ISO alpha-3 country code. Returned once per page, not for each observation.

  • startstring

    Present only when Narwhal moves the requested start to a later period. Earlier periods are not returned.

  • as_ofRFC 3339 timestamp

    When the source last updated the newest observation on this page, in whole seconds, UTC.

  • sourceobject

    Provenance for a statistic received through a distributor; see the latest-value operation.

  • frequencystring

    Present, as annual, only for yearly World Bank history. Periods are then years in YYYY format.

  • observationsarray

    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[].periodstring

    The official month, quarter or year represented by the observation.

  • observations[].first_reported_atRFC 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_yeardecimal string

    Change from the same month one year earlier, in percent.

  • observations[].month_over_monthdecimal string

    Change from the previous month, in percent.

  • observations[].quarter_over_quarterdecimal string

    Change from the previous quarter, in percent. Sent instead of month_over_month for New Zealand, whose figures are quarterly.

  • observations[].year_to_datedecimal string

    Change from the prior December, in percent. Omitted when the publisher does not release it.

  • observations[].calculatedarray 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_cursorstring or null

    Pass this unchanged as cursor to read the next page; null on the last page.


Full reference →

Use cases

Compare inflation across countries

Rank the latest inflation rates and keep each release date.

Read the guide →

Adjust a price for inflation

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

Read the guide →

CPI year over year and month over month

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

Read the guide →

Find the next CPI release

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

Read the guide →

Calculate the real interest rate

Take inflation off a nominal yield with the Fisher formula.

Read the guide →

Get an alert before a release

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

Read the guide →

Coverage

Indicators

Countries

Show all 42 countries

Sources

  • AustraliaAustralian Bureau of Statistics (ABS)
  • AustriaStatistics Austria, Eurostat
  • BelgiumStatbel, National Bank of Belgium, Eurostat
  • BrazilBrazilian Institute of Geography and Statistics (IBGE), Secretariat of Foreign Trade (SECEX)
  • CanadaStatistics Canada
  • SwitzerlandSwiss Federal Statistical Office (FSO), Eurostat
  • ChileCentral Bank of Chile (BCCh), National Statistics Institute of Chile (INE)
  • ChinaNational Bureau of Statistics of China, General Administration of Customs of China
  • ColombiaNational Administrative Department of Statistics (DANE)
  • CzechiaCzech Statistical Office (ČSÚ)
  • GermanyFederal Statistical Office of Germany (Destatis)
  • DenmarkStatistics Denmark, Eurostat
Show all 42 sources
  • SpainNational Statistics Institute of Spain (INE), Spanish Tax Agency (AEAT)
  • EstoniaStatistics Estonia
  • FinlandStatistics Finland, Finnish Customs (Tulli)
  • FranceNational Institute of Statistics and Economic Studies (INSEE), French Customs
  • United KingdomOffice for National Statistics (ONS)
  • CroatiaCroatian Bureau of Statistics (CBS)
  • IndonesiaStatistics Indonesia (BPS)
  • IrelandCentral Statistics Office (CSO)
  • ItalyItalian National Institute of Statistics (Istat), Eurostat
  • JapanStatistics Bureau of Japan, Cabinet Office of Japan, Japan Customs
  • South KoreaBank of Korea, Statistics Korea
  • LithuaniaState Data Agency of Lithuania
  • LuxembourgSTATEC, Eurostat
  • LatviaCentral Statistical Bureau of Latvia (CSB)
  • MexicoINEGI
  • MalaysiaDepartment of Statistics Malaysia (DOSM)
  • NetherlandsStatistics Netherlands (CBS)
  • NorwayStatistics Norway (SSB)
  • PhilippinesPhilippine Statistics Authority (PSA)
  • PolandStatistics Poland, Eurostat
  • PortugalStatistics Portugal (INE)
  • QatarNational Planning Council (NPC), via the Qatar Open Data portal
  • Saudi ArabiaGeneral Authority for Statistics (GASTAT)
  • SingaporeSingapore Department of Statistics (SingStat), Singapore government open-data publications
  • SloveniaStatistical Office of the Republic of Slovenia (SURS)
  • SwedenStatistics Sweden (SCB)
  • ThailandTrade Policy and Strategy Office
  • United StatesBureau of Labor Statistics (BLS), Bureau of Economic Analysis (BEA), US Census Bureau
  • New ZealandStats NZ
  • PakistanPakistan Bureau of Statistics (PBS)

Related APIs

Economic data API

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

Explore the API →

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.