瀏覽全部文件

各國 經濟成長率 API:單季實質 GDP 成長

取得一季的官方實質 GDP 成長率,按固定價格計算,以百分比表示。

economics_get_gdp_growth 可透過 REST 或 economics_get_gdp_growth MCP 工具呼叫。兩者回傳相同的資料結構,並使用同一份額度。

端點與請求

REST 端點
GET /v1/economics/{country}/gdp-growth
請求範例
curl --request GET \
  --url "https://api.narwhalapi.com/v1/economics/USA/gdp-growth?period=2026-Q2" \
  --header "Authorization: Bearer $NARWHAL_API_KEY"

MCP 使用工具 economics_get_gdp_growth ,並使用下列對應參數。

參數

此操作接受的期間格式是 YYYY-QN。

名稱必填類型含義
country是路徑·ISO alpha-3一個受支援的大寫國家代碼;請參閱此操作的涵蓋清單。
period否查詢·YYYY-QN省略此參數可取得已採納的最新完整發布資料,或傳入一個確切期間。
version_id否查詢·UUID選填的不可變發布版本。可使用 `dataset.published` 或 `dataset.revised` 事件中的 `resource_version`;省略時讀取目前已收錄的指標。

回應

回應範例
{
  "country": "USA",
  "period": "2026-Q2",
  "year_over_year": "2.2",
  "quarter_over_quarter": "0.6",
  "released_on": "2026-10-29",
  "calculated": [
    "quarter_over_quarter"
  ]
}
欄位類型必填含義
country字串是所請求的大寫 ISO 三字母國家代碼。
period字串是回傳的官方觀測期間。
year_over_year十進位數值字串是與去年同季相比的實質 GDP 變動率,單位為百分比。
quarter_over_quarter十進位數值字串否與上一季相比的實質 GDP 變動率,單位為百分比,未換算為年率。發布機構只發布年增率時,以及年度期間,此欄位會省略。
year_to_date十進位數值字串否來源發布時提供的官方年初至今成長率,單位為百分比;否則省略。
seasonal_adjustment字串或 null是該數據是否經過季節調整,以發布機構的說明為準:seasonally_adjusted、not_seasonally_adjusted、calendar_adjusted 或 trend。null 表示發布機構沒有說明。請勿將 null 理解為已調整。mixed 表示兩個成長數據的基準不同。日本就是一例:其年增率未經調整,季增率經過調整。
year_over_year_seasonal_adjustment字串或 null是每個成長數據各自的基準,取值與上述相同。僅當 seasonal_adjustment 為 mixed 時才會填入。其他情況,或發布內容沒有說明該成長數據的基準時,為 null。
quarter_over_quarter_seasonal_adjustment字串或 null是每個成長數據各自的基準,取值與上述相同。僅當 seasonal_adjustment 為 mixed 時才會填入。其他情況,或發布內容沒有說明該成長數據的基準時,為 null。
annualization字串或 null是季增率是否已年化:annualized 或 not_annualized。如果回應中沒有季增率數據,則為 null。年增率從不年化。
not_seasonally_adjustedtrue否僅在成長率未經季節調整時出現,值為 true。
annualizedtrue否僅在已發布的成長率換算為年率時出現,值為 true。
year_over_year_not_seasonally_adjustedtrue否僅當某國混用不同基準且其年增率數值未經季節調整時出現,值為 true。此時頂層旗標不會出現。
quarter_over_quarter_not_seasonally_adjustedtrue否僅當某國混用不同基準且其季增率數值未經季節調整時出現,值為 true。此時頂層旗標不會出現。
seasonally_adjustedtrue否僅當兩個數值均記錄為經季節調整時出現,值為 true。
year_over_year_seasonally_adjustedtrue否僅當某國混用不同基準且其年增率數值經季節調整時出現,值為 true。此時頂層旗標不會出現。
quarter_over_quarter_seasonally_adjustedtrue否僅當某國混用不同基準且其季增率數值經季節調整時出現,值為 true。此時頂層旗標不會出現。
released_on日期是官方發布日期,而不是 Narwhal 的檢索時間。
source對象否Who published the figure: the statistics office or central bank, for example {"publisher": "Office for National Statistics"}. Where the data reaches us through another body, distributor names that body too. If we cannot tell who published a figure, source is left out. 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字串否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 時間戳記否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"], ["quarter_over_quarter"] 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.

Newest figure read from the release

The newest answer can come from Narwhal's own read of the statistics office's release, before the stored series has it. Such an answer adds source、 stage、 published_at 與 provisional (only when true). An answer with none of these fields is the stored value. A stored answer can also carry calculated, which lists the figures Narwhal calculated from the publisher's own numbers.

For a country with a stored series, a read value is shown when it is for a later period than the stored one, or a later final reading of the same period.

Where a stored series reaches Narwhal through a distributor, the statistics office's own printed figure for the same period replaces it. The answer then names the office as the source and no distributor.

It also answers the newest figure for a country that has no stored series, from the release alone, with the same fields and the same charge: Cameroon, Chad, Comoros, Cyprus, Fiji, Guadeloupe, Hong Kong, Hungary, Iceland, Martinique, Morocco, New Caledonia, Niger, Papua New Guinea, Senegal and Taiwan。It has no history: a period 或 version_id request for such a country returns 404 series_not_found。

For these countries GDP growth is answered only when the office's release or its own tables state whether each figure is seasonally adjusted. A year-over-year figure whose basis is not stated is a 404 series_not_found, and a quarter-over-quarter figure whose basis is not stated, or that is annualised, is left out of the answer.

請求範例
curl --request GET \
  --url "https://api.narwhalapi.com/v1/economics/SEN/gdp-growth" \
  --header "Authorization: Bearer $NARWHAL_API_KEY"
回應範例
{
  "country": "SEN",
  "period": "2026-Q2",
  "year_over_year": "6.1",
  "quarter_over_quarter": "0.1",
  "released_on": "2026-10-02",
  "source": {
    "publisher": "Agence Nationale de la Statistique et de la Démographie"
  },
  "stage": "preliminary",
  "published_at": "2026-10-02T10:00:00Z"
}
請求範例
curl --request GET \
  --url "https://api.narwhalapi.com/v1/economics/GBR/gdp-growth" \
  --header "Authorization: Bearer $NARWHAL_API_KEY"
回應範例
{
  "country": "GBR",
  "period": "2026-Q3",
  "year_over_year": "1.9",
  "quarter_over_quarter": "0.7",
  "released_on": "2026-11-12",
  "source": {
    "publisher": "Office for National Statistics"
  },
  "stage": "preliminary",
  "published_at": "2026-11-12T07:00:00Z"
}

API 錯誤 處理:錯誤碼、額度與重試

  • 400 invalid_query — 國家、期間或篩選格式無效。
  • 401 invalid_api_key — Bearer 金鑰缺失或被拒絕。
  • 404 series_not_found — 沒有已核准的觀測值符合請求。
  • 429 rate_limit_exceeded — 已達到網路或帳戶的短時間視窗限制;請依下列標頭指定的等待時間重試: Retry-After。
  • 402 insufficient_credits ,您的餘額不足以支付該次呼叫。
  • 503 economics_unavailable — Narwhal 無法安全提供已接受的發布版本。

Only a successful data response costs credit. 查看 所有錯誤、標頭與重試規則。

資料時效

省略 period 回傳 Narwhal 最新儲存且已接受的發布版本。API 呼叫會讀取 Narwhal 的資料庫,不會即時呼叫官方發布機構。

released_on 是官方發布日期。

The newest figure can be shown as soon as the publisher releases it, from Narwhal's read of the release. Until the stored series has the same period, the answer carries the read fields described above.

讀取 來源檢查、驗證、發布版本儲存,以及檢查失敗時的處理方式。

目前公開測試版的涵蓋範圍

44 國家

ARG, AUS, AUT, BEL, BRA, CAN, 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, USA, ZAF

季度年增率與季增率資料涵蓋下列國家。選用的 year_to_date 欄位僅在官方來源發布該資料時才會出現。

世界銀行年度歷史資料

165 國家

ABW, AFG, AGO, ALB, AND, ARE, ARM, ASM, ATG, AZE, BDI, BEN, BFA, BGR, BHR, BHS, BIH, BLR, BLZ, BMU, BOL, BRB, BRN, BTN, BWA, CAF, CIV, CMR, COD, COG, COM, CPV, CRI, CUB, CUW, CYM, CYP, DJI, DMA, DOM, DZA, ECU, EGY, ERI, ETH, FJI, FRO, FSM, GAB, GEO, GHA, GIN, GMB, GNB, GNQ, GRC, GRD, GRL, GTM, GUM, GUY, HKG, HND, HTI, HUN, IMN, IRN, IRQ, ISL, JAM, JOR, KAZ, KEN, KGZ, KHM, KIR, KNA, KWT, LAO, LBN, LBR, LBY, LCA, LIE, LKA, LSO, MAC, MAF, MAR, MCO, MDA, MDG, MDV, MHL, MKD, MLI, MLT, MMR, MNE, MNG, MNP, MOZ, MRT, MUS, MWI, NAM, NCL, NER, NGA, NIC, NPL, NRU, OMN, PAN, PER, PLW, PNG, PRI, PRY, PSE, PYF, ROU, RUS, RWA, SDN, SEN, SLB, SLE, SLV, SMR, SOM, SRB, SSD, STP, SUR, SVK, SWZ, SXM, SYC, SYR, TCA, TCD, TGO, TJK, TKM, TLS, TON, TTO, TUN, TUR, TUV, TZA, UGA, UKR, URY, UZB, VCT, VEN, VIR, VNM, VUT, WSM, YEM, ZMB, ZWE

這些國家沒有最新值路由。對此路由發出的請求會回傳 404 series_not_found,請改用歷史路由。

每日 FX 資料可透過以下 API 取得: 外匯 API。

回傳 所有 經濟數據 操作。

此頁面對你有幫助嗎?