Browse all documentation

Inflation history API reference

Retrieve the current accepted inflation time series for one country.

Call it through REST or the economics_get_inflation_history MCP tool. Both return the same data shape and use the same credit.

Endpoint and request

REST endpoint
GET /v1/economics/{country}/inflation/observations
Example request
curl --request GET \
  --url "https://api.narwhalapi.com/v1/economics/USA/inflation/observations?start=2026-07&limit=100" \
  --header "Authorization: Bearer $NARWHAL_API_KEY"

MCP uses tool economics_get_inflation_history with the corresponding arguments below.

Parameters

The accepted period format for this operation is YYYY-MM or YYYY-QN.

NameRequiredTypeMeaning
countryYespath · ISO alpha-3One supported uppercase country code; see this operation’s coverage list.
startNoquery · YYYY-MM or YYYY-QNInclusive 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`.
endNoquery · YYYY-MM or YYYY-QNInclusive 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`.
limitNoquery · integer, 1–1000Maximum number of periods returned. Defaults to 100. A page may contain fewer periods; follow next_cursor.
cursorNoquery · opaque stringThe next_cursor from the previous page.
versionNoquery · first_reportedAccepts `first_reported` only: returns the first stored value per period with `first_reported_at`. Cannot be combined with `as_of`.
as_ofNoquery · YYYY-MM-DDReturns the series as published through the end of the specified UTC day. Cannot be combined with `version`.

Response

Example response
{
  "country": "USA",
  "as_of": "2026-11-10T00:00:00Z",
  "observations": [
    {
      "period": "2026-07",
      "year_over_year": "3.4",
      "month_over_month": "0.0",
      "year_to_date": "3.0"
    },
    {
      "period": "2026-08",
      "year_over_year": "3.4",
      "month_over_month": "0.3",
      "year_to_date": "3.4"
    },
    {
      "period": "2026-09",
      "year_over_year": "3.7",
      "month_over_month": "0.6",
      "year_to_date": "4.0"
    },
    {
      "period": "2026-10",
      "month_over_month": "0.2",
      "year_to_date": "4.2"
    }
  ],
  "next_cursor": null
}
FieldTypeRequiredMeaning
countrystringYesThe requested uppercase ISO alpha-3 country code. Returned once per page, not for each observation.
startstringNoPresent only when Narwhal moves the requested start to a later period. Earlier periods are not returned.
as_ofRFC 3339 timestampNoWhen the source last updated the newest observation on this page, in whole seconds, UTC.
sourceobjectNoProvenance for a statistic received through a distributor; see the latest-value operation.
frequencystringNoPresent, as annual, only for yearly World Bank history. Periods are then years in YYYY format.
observationsarrayYesOldest-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[].periodstringYesThe official month, quarter or year represented by the observation.
observations[].first_reported_atRFC 3339 timestampNoPresent 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 stringNoChange from the same month one year earlier, in percent.
observations[].month_over_monthdecimal stringNoChange from the previous month, in percent.
observations[].quarter_over_quarterdecimal stringNoChange from the previous quarter, in percent. Sent instead of month_over_month for New Zealand, whose figures are quarterly.
observations[].year_to_datedecimal stringNoChange from the prior December, in percent. Omitted when the publisher does not release it.
observations[].calculatedarray of stringsNoPresent 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 nullYesPass this unchanged as cursor to read the next page; null on the last page.

Errors and credits

  • 400 invalid_query — The country, period or filter format is invalid, or as_of and version are sent together.
  • 400 invalid_cursor — the cursor is malformed, or was issued for other filters or another operation.
  • 401 invalid_api_key — the Bearer key is missing or rejected.
  • 404 series_not_found — no approved observation matches the request.
  • 429 rate_limit_exceeded — the network or account short-window limit was reached; retry after Retry-After.
  • 402 insufficient_credits — your balance does not cover the call.
  • 503 economics_unavailable — Narwhal cannot safely serve an accepted publication.

Only a successful data response costs credit. See all errors, headers, and retry rules.

Freshness

By default, this route returns Narwhal's current accepted series; the response as_of is the update time of the newest observation. Any key can read an earlier vintage with as_of or version=first_reported. Vintage history starts at Narwhal's first capture and is not a reconstruction of every past publication.

Official sources can be sparse and expose different historical depths. Narwhal omits missing observations rather than interpolating or carrying values forward.

Read how source checks, validation, stored releases, and failed checks work.

Current public-beta coverage

ARG, AUS, AUT, BEL, BRA, CAN, CHE, CHL, CHN, COL, CZE, DEU, DNK, ESP, EST, FIN, FRA, GBR, HRV, IDN, IND, IRL, ISR, ITA, JPN, KOR, LTU, LUX, LVA, MEX, MYS, NLD, NOR, NZL, PAK, PHL, POL, PRT, QAT, SAU, SGP, SVN, SWE, THA, USA, ZAF

Available official history follows this operation’s country coverage. The first available period varies by source.

New Zealand's inflation figures are quarterly, from Stats NZ. Periods are quarters in YYYY-QN format, and quarter_over_quarter is sent in place of month_over_month, with no year_to_date.

Annual World Bank history

ABW, AFG, ALB, ATG, AZE, BDI, BEN, BFA, BHR, BHS, BLR, BLZ, BOL, BRB, BRN, BTN, CAF, CMR, COD, COG, COM, CPV, CUW, CYM, DJI, DMA, DOM, ECU, EGY, ETH, FJI, FSM, GAB, GHA, GIN, GMB, GNB, GNQ, GRD, GTM, GUY, HND, IRN, IRQ, JAM, KAZ, KGZ, KHM, KIR, KNA, LBR, LBY, LCA, MAC, MDA, MDG, MDV, MLI, MMR, MNE, MNG, MOZ, MRT, MUS, NAM, NCL, NER, NIC, NPL, PAN, PLW, PNG, PSE, RUS, RWA, SDN, SLB, SLE, SMR, SSD, STP, SUR, SWZ, SXM, SYC, SYR, TCD, TGO, TJK, TLS, TON, TTO, TUN, TZA, URY, VCT, VUT, WSM, YEM, ZWE

Narwhal uses the World Bank only where no national, OECD, Eurostat or BIS series exists for the country. The history route returns yearly figures from the World Bank, World Development Indicators (CC BY 4.0). Periods are years in YYYY format, the response has frequency set to annual, and the source object names the publisher and the World Bank as distributor. World Bank figures are never joined to a national series.

Example request
curl --request GET \
  --url "https://api.narwhalapi.com/v1/economics/NGA/inflation/observations?start=2024&limit=100" \
  --header "Authorization: Bearer $NARWHAL_API_KEY"
Example response
{
  "country": "NGA",
  "as_of": "2026-10-08T00:00:00Z",
  "source": {
    "publisher": "International Monetary Fund (IMF), International Financial Statistics: consumer price index, annual average",
    "distributor": "World Bank, World Development Indicators (CC BY 4.0)"
  },
  "frequency": "annual",
  "observations": [
    {
      "period": "2024",
      "year_over_year": "33.2"
    },
    {
      "period": "2025",
      "year_over_year": "23.0"
    }
  ],
  "next_cursor": null
}

Daily FX is available through the FX API.

Return to all Economics operations.

Was this page helpful?