---
title: "國內生產總值（GDP） API | Narwhal API"
description: "透過 Gross Domestic Product API 取得指定單一季度按當期價格計算的全國 GDP。只需一組 API 金鑰，即可透過 REST 與 MCP 兩種方式存取並查詢該季度的資料。"
url: "https://narwhalapi.com/zh-tw/api/economics/gdp"
---

所有 API

# GDP API：國內生產毛額單季資料

官方來源的本幣計價季度 GDP。

[取得免費 API 金鑰](https://narwhalapi.com/zh-tw/signup)
[閱讀文件 →](https://narwhalapi.com/zh-tw/docs/api/economics.md)

## 首次請求

### 取得最新值

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

### 取得歷史資料

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

## 端點

GET 國內生產毛額`/v1/economics/{country}/gdp`

取得一季的全國 GDP，一律按現價計算。

#### 參數

- `country` 必填 一個受支援的大寫國家代碼；請參閱此操作的涵蓋清單。
- `period` 選填 省略此參數可取得已採納的最新完整發布資料，或傳入一個確切期間。
- `version_id` 選填 選填的不可變發布版本。使用 dataset.published 或 dataset.revised 事件中的 resource_version；省略則讀取目前已收錄的指標。

#### 回應欄位

- `country` 字串 所請求的大寫 ISO 三字母國家代碼。
- `period` 字串 回傳的官方觀測期間。
- `value` 表示正數的十進位數值字串 按當期價格計算的 GDP 數值。
- `currency` ISO 4217 字串 GDP數值所使用的本國貨幣。
- `seasonal_adjustment` 字串或 null Whether the figure is seasonally adjusted, as the publisher states it: seasonally_adjusted, not_seasonally_adjusted, calendar_adjusted or trend. null means the publisher does not say. Never read null as adjusted.
- `price_basis` 字串或 null current for nominal GDP at current prices, or constant for real GDP at a reference year's prices. null means the publisher does not say.
- `not_seasonally_adjusted` 是 僅在官方序列未經季節調整時出現，值為 true。
- `annualized` 是 僅在官方總量已換算為年率時出現，值為 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.

---

[完整參考文件 →](https://narwhalapi.com/zh-tw/docs/api/economics/gdp.md)

GET 國內生產毛額歷史資料`/v1/economics/{country}/gdp/observations`

取得指定國家目前已接受的國內生產毛額時間序列。

#### 參數

- `country` 必填 一個受支援的大寫國家代碼；請參閱此操作的涵蓋清單。
- `start` 選填 起始觀測期間（含該期間）。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` 選填 結束觀測期間（含該期間）。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` 選填 傳回的期間數上限。預設值為 100。頁面可能包含較少的期間；請繼續使用 next_cursor。
- `cursor` 選填 上一頁回傳的 next_cursor。
- `version` 選填 只接受 first_reported：回傳每個期間首次儲存的值，並附帶 first_reported_at。不能與 as_of 同時使用。
- `as_of` 選填 回傳截至指定 UTC 日終時已發布的序列。不能與 version 同時使用。

#### 回應欄位

- `country` 字串 請求的大寫 ISO alpha-3 國家代碼。每頁傳回一次，不在每筆觀測資料中重複。
- `start` 字串 僅當 Narwhal 將請求的 start 移至較晚的期間時出現。不會傳回更早的期間。
- `as_of` RFC 3339 時間戳記 來源最後更新本頁最新觀測值的時間，精確到整秒，使用 UTC。
- `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.
- `frequency` 字串 Present, as annual, only for yearly World Bank history. Periods are then years in YYYY format.
- `seasonal_adjustment` 字串或 null Whether the figure is seasonally adjusted, as the publisher states it: seasonally_adjusted, not_seasonally_adjusted, calendar_adjusted or trend. null means the publisher does not say. Never read null as adjusted.
- `price_basis` 字串或 null current for nominal GDP at current prices, or constant for real GDP at a reference year's prices. null means the publisher does not say.
- `currency` ISO 4217 字串 本頁所有數值使用的貨幣：本國貨幣，世界銀行年度歷史資料則為 USD。
- `not_seasonally_adjusted` 是 僅在數值未經季節調整時出現，值為 true。
- `annualized` 是 僅在數值已換算為年率時出現，值為 true。
- `observations` 陣列 按時間由早到晚排列的已採用觀測資料，每個期間一筆。來源缺少的值會省略，絕不補值。每頁觀測資料筆數可能少於 limit；請繼續使用 next_cursor，直到其值為 null。
- `observations[].period` 字串 觀測值所代表的官方月份、季度或年份。
- `observations[].first_reported_at` RFC 3339 時間戳記 僅在 version=first_reported 時出現。這個 UTC 時間戳記錄 Narwhal 首次儲存該期間的時間（如果各項指標是分開儲存的，則取最晚的時間）。在開始擷取之前發布的期間，顯示的是 Narwhal 的首次擷取時間。
- `observations[].value` 十進位數值字串 按當期價格計算的 GDP 數值。
- `next_cursor` 字串或 null 將此值原樣作為 cursor 傳入，以讀取下一頁；最後一頁為 null。

---

[完整參考文件 →](https://narwhalapi.com/zh-tw/docs/api/economics/gdp-history.md)

## 使用情境

### 由 GDP 水準計算成長率

計算季度成長率並換算成年率。

[閱讀指南 →](https://narwhalapi.com/zh-tw/how-to/calculate-gdp-growth-from-gdp-levels.md)

### 建立經濟行事曆

按 UTC 列出你所選國家和日期的發布時間。

[閱讀指南 →](https://narwhalapi.com/zh-tw/how-to/build-an-economic-calendar.md)

### 在發布前收到提醒

透過日曆訂閱源或每日腳本設定提醒。

[閱讀指南 →](https://narwhalapi.com/zh-tw/how-to/get-an-alert-before-an-economic-release.md)

### 回補歷史資料

分頁下載整個序列，中斷後可繼續。

[閱讀指南 →](https://narwhalapi.com/zh-tw/how-to/backfill-historical-data.md)

## 涵蓋範圍

- [澳大利亞](https://narwhalapi.com/zh-tw/economics/australia.md)
- [奧地利](https://narwhalapi.com/zh-tw/economics/austria.md)
- [比利時](https://narwhalapi.com/zh-tw/economics/belgium.md)
- [巴西](https://narwhalapi.com/zh-tw/economics/brazil.md)
- [加拿大](https://narwhalapi.com/zh-tw/economics/canada.md)
- [智利](https://narwhalapi.com/zh-tw/economics/chile.md)
- [中國](https://narwhalapi.com/zh-tw/economics/china.md)
- [哥倫比亞](https://narwhalapi.com/zh-tw/economics/colombia.md)
- [捷克](https://narwhalapi.com/zh-tw/economics/czechia.md)
- [德國](https://narwhalapi.com/zh-tw/economics/germany.md)
- [丹麥](https://narwhalapi.com/zh-tw/economics/denmark.md)
- [西班牙](https://narwhalapi.com/zh-tw/economics/spain.md)

顯示全部 40 個國家

- [愛沙尼亞](https://narwhalapi.com/zh-tw/economics/estonia.md)
- [芬蘭](https://narwhalapi.com/zh-tw/economics/finland.md)
- [法國](https://narwhalapi.com/zh-tw/economics/france.md)
- [英國](https://narwhalapi.com/zh-tw/economics/united-kingdom.md)
- [克羅埃西亞](https://narwhalapi.com/zh-tw/economics/croatia.md)
- [印度尼西亞](https://narwhalapi.com/zh-tw/economics/indonesia.md)
- [愛爾蘭](https://narwhalapi.com/zh-tw/economics/ireland.md)
- [義大利](https://narwhalapi.com/zh-tw/economics/italy.md)
- [日本](https://narwhalapi.com/zh-tw/economics/japan.md)
- [南韓](https://narwhalapi.com/zh-tw/economics/south-korea.md)
- [立陶宛](https://narwhalapi.com/zh-tw/economics/lithuania.md)
- [盧森堡](https://narwhalapi.com/zh-tw/economics/luxembourg.md)
- [拉脫維亞](https://narwhalapi.com/zh-tw/economics/latvia.md)
- [墨西哥](https://narwhalapi.com/zh-tw/economics/mexico.md)
- [馬來西亞](https://narwhalapi.com/zh-tw/economics/malaysia.md)
- [荷蘭](https://narwhalapi.com/zh-tw/economics/netherlands.md)
- [挪威](https://narwhalapi.com/zh-tw/economics/norway.md)
- [紐西蘭](https://narwhalapi.com/zh-tw/economics/new-zealand.md)
- [巴基斯坦](https://narwhalapi.com/zh-tw/economics/pakistan.md)
- [菲律賓](https://narwhalapi.com/zh-tw/economics/philippines.md)
- [波蘭](https://narwhalapi.com/zh-tw/economics/poland.md)
- [葡萄牙](https://narwhalapi.com/zh-tw/economics/portugal.md)
- [卡達](https://narwhalapi.com/zh-tw/economics/qatar.md)
- [沙烏地阿拉伯](https://narwhalapi.com/zh-tw/economics/saudi-arabia.md)
- [新加坡](https://narwhalapi.com/zh-tw/economics/singapore.md)
- [斯洛維尼亞](https://narwhalapi.com/zh-tw/economics/slovenia.md)
- [瑞典](https://narwhalapi.com/zh-tw/economics/sweden.md)
- [美國](https://narwhalapi.com/zh-tw/economics/united-states.md)

## 來源

- 澳大利亞 澳大利亞統計局（ABS）
- 奧地利 奧地利統計局、歐盟統計局（Eurostat）
- 比利時 比利時統計局（Statbel）、比利時國家銀行、歐盟統計局（Eurostat）
- 巴西 Brazilian Institute of Geography and Statistics (IBGE), Secretariat of Foreign Trade (SECEX)
- 加拿大 加拿大統計局
- 智利 智利中央銀行（BCCh）、智利國家統計局（INE）
- 中國 National Bureau of Statistics of China, General Administration of Customs of China
- 哥倫比亞 國家統計行政部（DANE）
- 捷克 捷克統計局（ČSÚ）
- 德國 德國聯邦統計局（Destatis）
- 丹麥 丹麥統計局、歐盟統計局（Eurostat）
- 西班牙 西班牙國家統計局（INE）、西班牙稅務局（AEAT）

顯示全部 40 個來源

- 愛沙尼亞 愛沙尼亞統計局
- 芬蘭 芬蘭統計局、芬蘭海關（Tulli）
- 法國 法國國家統計與經濟研究院（INSEE）、法國海關
- 英國 英國國家統計局（ONS）
- 克羅埃西亞 克羅埃西亞統計局（CBS）
- 印度尼西亞 印尼統計局(BPS)
- 愛爾蘭 中央統計局（CSO）
- 義大利 義大利國家統計局（Istat）、歐盟統計局（Eurostat）
- 日本 日本統計局、日本內閣府、日本 Customs
- 南韓 Bank of Korea, Statistics Korea
- 立陶宛 立陶宛國家資料局
- 盧森堡 STATEC、歐盟統計局（Eurostat）
- 拉脫維亞 拉脫維亞中央統計局（CSB）
- 墨西哥 國家統計、地理與資訊研究所（INEGI）
- 馬來西亞 馬來西亞統計局（DOSM）
- 荷蘭 荷蘭統計局（CBS）
- 挪威 挪威統計局（SSB）
- 紐西蘭 Stats NZ
- 巴基斯坦 巴基斯坦統計局（PBS）
- 菲律賓 菲律賓統計局（PSA）
- 波蘭 波蘭統計局、歐盟統計局（Eurostat）
- 葡萄牙 葡萄牙統計局（INE）
- 卡達 National Planning Council (NPC)，透過 Qatar Open Data 入口網站
- 沙烏地阿拉伯 統計總局（GASTAT）
- 新加坡 新加坡統計局（SingStat）、新加坡政府發布的開放資料
- 斯洛維尼亞 斯洛維尼亞共和國統計局（SURS）
- 瑞典 瑞典統計局（SCB）
- 美國 勞工統計局（BLS）、經濟分析局（BEA）、美國人口普查局

## 相關 API

### 財經日曆 API

發布時程、狀態與發布版本。

[探索 API →](https://narwhalapi.com/zh-tw/api/economic-calendar.md)

### 經濟數據 API

價格、勞動力、產出、貿易與利率的官方指標。

[探索 API →](https://narwhalapi.com/zh-tw/api/economics.md)

### 方法論

數據發布版本的檢查和修訂方式。

[閱讀方法說明 →](https://narwhalapi.com/zh-tw/methodology/economics.md)

## 常見問題

回應包含哪些內容？

取得一季的全國 GDP，一律按現價計算。

可以請求哪些期間？

YYYY-QN

支援哪些資料範圍？

每季全國 GDP（按當期價格計算）的資料涵蓋下列國家。

## 從免費金鑰開始

每月 10 美元免費額度，無需綁卡。每月 10 美元免費額度，無需綁卡。

[取得免費 API 金鑰](https://narwhalapi.com/zh-tw/signup)
