調和通膨 API
取得一個國家的最新調和通膨(HICP):年率,以百分比計。
economics_ 可透過 REST 或 economics_ MCP 工具呼叫。兩者回傳相同的資料結構,並使用同一份額度。
端點與請求
GET /v1/economics/{country}/harmonised-inflationcurl --request GET \
--url "https://api.narwhalapi.com/v1/economics/FRA/harmonised-inflation" \
--header "Authorization: Bearer $NARWHAL_API_KEY"MCP 使用工具 economics_ ,並使用下列對應參數。
參數
此操作接受的期間格式是 YYYY-MM。
| 名稱 | 必填 | 類型 | 含義 |
|---|---|---|---|
country | 是 | 路徑·ISO alpha-3 | 一個受支援的大寫國家代碼;請參閱此操作的涵蓋清單。 |
period | 否 | 查詢·YYYY-MM | 省略此參數可取得已採納的最新完整發布資料,或傳入一個確切期間。 |
series_ | 否 | 查詢·UUID | 選填。省略則為年率,即預設序列。傳入指數水準的 `series_id` 則讀取指數。可透過 `GET /v1/economics/{country}/series?family=harmonised-inflation` 查找:它是 `unit` 為 `index` 的序列。 |
回應
{
"source": {
"publisher": "Eurostat",
"distributor": "Eurostat"
},
"measure": "year_over_year",
"seasonal_adjustment": "not_seasonally_adjusted",
"classification": "COICOP 2018, all items (HICP total)",
"period": "2026-10",
"value": "3.7",
"country": "FRA",
"series_id": "1b1f2448-2ba6-4523-a6ce-55c488ca15d1",
"unit": "percent"
}| 欄位 | 類型 | 必填 | 含義 |
|---|---|---|---|
source | 對象 | 是 | 該數值的發布方。publisher 是該數值所屬的統計機構,distributor 是 Narwhal 讀取資料的機構。每個序列只有一個來源,適用於其全部歷史。沒有 released_。 |
measure | 字串 | 是 | year_ 是年變動率,以百分比計。level 是指數水準。 |
seasonal_ | 字串 | 是 | Always not_. |
classification | 字串 | 是 | 該數值涵蓋的物價總項:全部項目,COICOP 2018。 |
base_ | 字串 | 否 | 指數等於 100 的年份。Present for the index level only. |
base_ | 十進位數值字串 | 否 | 基準年的指數值。僅指數水準提供。 |
period | 字串 | 是 | 回傳的官方觀測期間。 |
value | 十進位數值字串 | 是 | unit 中的數值:年率(百分比,可以為負),或指數水準。 |
status | 字串 | 否 | 僅當發布機構標註該數值時才提供:estimated、break_、definition_ 或 break_。否則省略。 |
release_ | 字串 | 否 | 發布機構將該數值標為暫時值時為 preliminary。否則省略。 |
country | 字串 | 是 | 所請求的大寫 ISO 三字母國家代碼。 |
series_ | 字串 | 是 | 該數值來自的序列。將其作為 series_ 傳入,可再次讀取同一序列。 |
unit | 字串 | 是 | 年率為 percent,指數水準為 index。 |
API 錯誤 處理:錯誤碼、額度與重試
400 invalid_: A query parameter is unknown or repeated,query countryis not three uppercase letters,series_is not a UUID, orid periodis not a month inYYYY-MMformat.version_,id versionandas_are not accepted on this route.of 401 invalid_: Bearer 金鑰缺失或被拒絕。api_ key 402 insufficient_: 你的餘額不足以支付此次呼叫。credits 404 series_: 該國家不在本頁的涵蓋清單中,not_ found series_不是該國的序列,或沒有符合id period的觀測值。清單之外的國家會得到一則說明該系列不適用於它的詳細訊息。404 不收費。429 rate_: 達到了網路或帳戶的短窗口限制。請在limit_ exceeded Retry-After之後重試。503 economics_: Narwhal 無法安全地提供已儲存的序列。unavailable
Only a successful data response costs credit. 查看 所有錯誤、標頭與重試規則。
資料時效
省略 period 時會回傳最新儲存的觀測值。該 API 呼叫讀取 Narwhal 的資料庫,不會即時呼叫發布機構。回應中沒有 released_,因為散布機構顯示的日期不是發布機構的發布日期。
目前公開測試版的涵蓋範圍
10 國家
DNK, ESP, FIN, FRA, IRL, LVA, NLD, PRT, SVN, SWE
月度調和消費者物價指數(HICP),全部項目,來自 Eurostat,未經季節性調整。它不是國家的 inflation 路由,同一國家的兩個數值並不相同。預設序列是年變動率,以百分比計,可以為負。指數水準的基期為 2025=100。期間是 YYYY-MM 格式的月份。其他任何國家會回傳 404 series_,且不收費。要讀取指數水準,請先列出該國家的序列:GET / 會回傳每個序列的 series_、name、unit(percent 或 index)和 is_,帶有 limit 和 cursor 的請求可逐頁瀏覽。將 unit 為 index 的 series_ 傳給最新值或歷史路由。
List the 個系列
curl --request GET \
--url "https://api.narwhalapi.com/v1/economics/FRA/series?family=harmonised-inflation" \
--header "Authorization: Bearer $NARWHAL_API_KEY"{
"series": [
{
"country": "FRA",
"series_id": "11bc022a-cd6e-4847-8ff8-11dae4e93451",
"unit": "index",
"name": "Harmonised index of consumer prices",
"frequency": "monthly",
"first_period": "2000-01",
"last_period": "2026-10",
"family": "harmonised-inflation",
"definition": {
"base_period": "2025",
"base_value": "100",
"seasonal_adjustment": "not_seasonally_adjusted",
"measure": "level",
"classification": "COICOP 2018, all items (HICP total)"
}
},
{
"country": "FRA",
"series_id": "1b1f2448-2ba6-4523-a6ce-55c488ca15d1",
"unit": "percent",
"name": "Harmonised inflation, annual rate",
"is_default": true,
"frequency": "monthly",
"first_period": "2000-01",
"last_period": "2026-10",
"family": "harmonised-inflation",
"definition": {
"measure": "year_over_year",
"seasonal_adjustment": "not_seasonally_adjusted",
"annualization": "not_annualized",
"classification": "COICOP 2018, all items (HICP total)"
}
}
],
"next_cursor": null
}每日 FX 資料可透過以下 API 取得: 外匯 API。
回傳 所有 經濟數據 操作。
從免費金鑰開始
每月 10 美元免費額度,無需綁卡。每月 10 美元免費額度,無需綁卡。
此頁面對你有幫助嗎?