Browse all documentation

Gross Domestic Product history API

Retrieve the current accepted gross domestic product time series for one country.

economics_get_gdp_history is available through REST and the economics_get_gdp_history MCP tool. Both return the same data shape and consume the same monthly quota.

Endpoint and request

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

MCP uses tool economics_get_gdp_history with the corresponding arguments below.

Parameters

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

NameRequiredTypeMeaning
countryYespath · ISO alpha-3One supported uppercase country code: AUS, CAN, DEU, FRA, GBR, JPN, MYS, NLD, SGP, and USA.
startNoquery · YYYY-QNInclusive first observation period.
endNoquery · YYYY-QNInclusive last observation period.
limitNoquery · integer, 1–1000Maximum observations returned. Defaults to 100.
cursorNoquery · opaque stringThe next_cursor from the previous page.

Response

Example response
{
  "observations": [
    {
      "country": "USA",
      "measure": "gdp",
      "value": "31000100000000",
      "unit": "USD",
      "transformation": "",
      "period": "2026-Q2"
    }
  ],
  "next_cursor": null,
  "as_of": "2026-08-29T16:00:00Z"
}
FieldTypeRequiredMeaning
observationsarrayYesOldest-first accepted observations. Missing source values are omitted, never filled.
observations[].countrystringYesThe requested uppercase ISO alpha-3 country code.
observations[].measurestringYesThe canonical measure represented by this observation.
observations[].periodstringYesThe official month or quarter represented by the observation.
observations[].valuedecimal stringYesThe accepted source value without binary floating-point conversion.
observations[].unitstringYesThe source unit or currency code for the measure.
observations[].transformationstringYesThe measure transformation, or an empty string for a level.
next_cursorstring or nullNoPass this unchanged as cursor to read the next page.
as_ofRFC 3339 timestampNoWhen Narwhal accepted the current stored series snapshot.

Errors and quota

  • 400 invalid_query — the country, period, or filter format is invalid.
  • 401 invalid_api_key — the Bearer key is missing or rejected.
  • 404 series_not_found — no approved observation matches the request.
  • 429 quota_exhausted — the account has reached its monthly allowance.
  • 503 economics_unavailable — Narwhal cannot safely serve an accepted publication.

Only a successful data response consumes quota. See all errors, headers, and retry rules.

Freshness

This route returns Narwhal's current accepted series as of as_of. It is current-vintage history, not a reconstruction of every past publication vintage.

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

Available official history is public for AUS, CAN, DEU, FRA, GBR, JPN, MYS, NLD, SGP, and USA. The first available period varies by source.

Indonesia, regional routes, and Commodities are not public. Current FX is available through the separate FX API.

Return to all Economics operations.