---
title: "通胀 API | Narwhal API"
description: "通胀 API，提供来自各国官方来源的同比和环比通胀率，并在已发布时提供年初至今数据。可获取单月数据或历史数据。"
url: "https://narwhalapi.com/zh/api/economics/inflation"
---

所有 API

# 通胀率 API 参考

各国官方机构发布的月度通胀率。

[获取免费 API 密钥](https://narwhalapi.com/zh/signup)
[阅读文档 →](https://narwhalapi.com/zh/docs/api/economics.md)

## 首次请求

### 获取最新值

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

### 获取历史数据

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

## 端点

GET 通胀`/v1/economics/{country}/inflation`

获取某一个月的同比、环比和年初至今通胀率。

#### 参数

- `country` 必填 一个受支持的大写国家代码；请参阅此操作的覆盖列表。
- `period` 可选 省略此参数可获取已采纳的最新完整发布数据，也可传入一个具体期间。
- `version_id` 可选 可选的不可变发布版本。使用 dataset.published 或 dataset.revised 事件中的 resource_version；省略则读取当前已收录的指标。

#### 响应字段

- `country` 字符串 所请求的大写 ISO 三字母国家代码。
- `period` 字符串 返回的官方观测期间。
- `year_over_year` 十进制字符串 与上年同月相比的变化率，单位为百分比。
- `month_over_month` 十进制字符串 与上月相比的变化率，单位为百分比。Left out where the publisher releases only the year-over-year figure.
- `quarter_over_quarter` 十进制字符串 Change from the previous quarter, in percent. Sent instead of month_over_month for New Zealand, whose figures are quarterly.
- `year_to_date` 十进制字符串 与上年十二月相比的变化率，单位为百分比。发布机构未发布时省略。
- `released_on` 日期 官方发布日期，而不是 Narwhal 的检索时间。
- `source` 对象 The optional source object appears only when the statistic is received through a distributor. It contains publisher (the original publisher named by the distributor) and distributor (the distributing organisation). When source is present, released_on is the distributor's publication date, not the original publisher's release date. Publisher-direct series omit source. 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_at` RFC 3339 时间戳 Appears only on a newest figure read from the publisher's release. When the publisher released the figure.
- `provisional` 是 Present, as true, only when the figure read from the release is marked provisional.
- `calculated` array 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"], ["month_over_month"] 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.

---

[完整参考文档 →](https://narwhalapi.com/zh/docs/api/economics/inflation.md)

GET 通胀历史数据`/v1/economics/{country}/inflation/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` 对象 通过分发机构获取的统计数据的来源信息；请参阅最新值操作。
- `frequency` 字符串 Present, as annual, only for yearly World Bank history. Periods are then years in YYYY format.
- `observations` 数组 按时间从早到晚排列的已采纳观测记录，每个期间一条。来源缺失的值会被省略，绝不填补。每页观测记录数可能小于 limit；请继续使用 next_cursor，直到其值为 null。
- `observations[].period` 字符串 观测值所代表的官方月份、季度或年份。
- `observations[].first_reported_at` RFC 3339 时间戳 仅在 version=first_reported 时出现。这个 UTC 时间戳记录 Narwhal 首次存储该期间的时间（如果各项指标是分开存储的，则取最晚的时间）。在开始采集之前发布的期间，显示的是 Narwhal 的首次采集时间。
- `observations[].year_over_year` 十进制字符串 与上年同月相比的变化率，单位为百分比。
- `observations[].month_over_month` 十进制字符串 与上月相比的变化率，单位为百分比。
- `observations[].quarter_over_quarter` 十进制字符串 Change from the previous quarter, in percent. Sent instead of month_over_month for New Zealand, whose figures are quarterly.
- `observations[].year_to_date` 十进制字符串 与上年十二月相比的变化率，单位为百分比。发布机构未发布时省略。
- `observations[].calculated` array of strings Present 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_cursor` 字符串或 null 将此值原样作为 cursor 传入，以读取下一页；最后一页为 null。

---

[完整参考文档 →](https://narwhalapi.com/zh/docs/api/economics/inflation-history.md)

## 使用场景

### 比较各国通胀

把最新的通胀率排序，并保留每次发布的日期。

[阅读指南 →](https://narwhalapi.com/zh/how-to/compare-inflation-between-countries.md)

### CPI 同比与环比

从 API 直接获取变化率，或者由指数水平自行计算。

[阅读指南 →](https://narwhalapi.com/zh/how-to/calculate-cpi-year-over-year-and-month-over-month.md)

### 计算实际利率

用费雪公式从名义收益率中扣除通胀。

[阅读指南 →](https://narwhalapi.com/zh/how-to/calculate-the-real-interest-rate.md)

### 查找下一次 CPI 发布

读取下一次发布的参考月份和预定时间。

[阅读指南 →](https://narwhalapi.com/zh/how-to/find-the-next-cpi-release-date.md)

### 按通胀调整价格

用 CPI 指数水平看一个旧价格在今天值多少。

[阅读指南 →](https://narwhalapi.com/zh/how-to/adjust-a-price-for-inflation.md)

### 在发布前收到提醒

通过日历订阅源或每日脚本设置提醒。

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

## 覆盖范围

- [澳大利亚](https://narwhalapi.com/zh/economics/australia.md)
- [奥地利](https://narwhalapi.com/zh/economics/austria.md)
- [比利时](https://narwhalapi.com/zh/economics/belgium.md)
- [巴西](https://narwhalapi.com/zh/economics/brazil.md)
- [加拿大](https://narwhalapi.com/zh/economics/canada.md)
- [瑞士](https://narwhalapi.com/zh/economics/switzerland.md)
- [智利](https://narwhalapi.com/zh/economics/chile.md)
- [中国](https://narwhalapi.com/zh/economics/china.md)
- [哥伦比亚](https://narwhalapi.com/zh/economics/colombia.md)
- [捷克](https://narwhalapi.com/zh/economics/czechia.md)
- [德国](https://narwhalapi.com/zh/economics/germany.md)
- [丹麦](https://narwhalapi.com/zh/economics/denmark.md)

显示全部 42 个国家

- [西班牙](https://narwhalapi.com/zh/economics/spain.md)
- [爱沙尼亚](https://narwhalapi.com/zh/economics/estonia.md)
- [芬兰](https://narwhalapi.com/zh/economics/finland.md)
- [法国](https://narwhalapi.com/zh/economics/france.md)
- [英国](https://narwhalapi.com/zh/economics/united-kingdom.md)
- [克罗地亚](https://narwhalapi.com/zh/economics/croatia.md)
- [印度尼西亚](https://narwhalapi.com/zh/economics/indonesia.md)
- [爱尔兰](https://narwhalapi.com/zh/economics/ireland.md)
- [意大利](https://narwhalapi.com/zh/economics/italy.md)
- [日本](https://narwhalapi.com/zh/economics/japan.md)
- [韩国](https://narwhalapi.com/zh/economics/south-korea.md)
- [立陶宛](https://narwhalapi.com/zh/economics/lithuania.md)
- [卢森堡](https://narwhalapi.com/zh/economics/luxembourg.md)
- [拉脱维亚](https://narwhalapi.com/zh/economics/latvia.md)
- [墨西哥](https://narwhalapi.com/zh/economics/mexico.md)
- [马来西亚](https://narwhalapi.com/zh/economics/malaysia.md)
- [荷兰](https://narwhalapi.com/zh/economics/netherlands.md)
- [挪威](https://narwhalapi.com/zh/economics/norway.md)
- [新西兰](https://narwhalapi.com/zh/economics/new-zealand.md)
- [巴基斯坦](https://narwhalapi.com/zh/economics/pakistan.md)
- [菲律宾](https://narwhalapi.com/zh/economics/philippines.md)
- [波兰](https://narwhalapi.com/zh/economics/poland.md)
- [葡萄牙](https://narwhalapi.com/zh/economics/portugal.md)
- [卡塔尔](https://narwhalapi.com/zh/economics/qatar.md)
- [沙特阿拉伯](https://narwhalapi.com/zh/economics/saudi-arabia.md)
- [新加坡](https://narwhalapi.com/zh/economics/singapore.md)
- [斯洛文尼亚](https://narwhalapi.com/zh/economics/slovenia.md)
- [瑞典](https://narwhalapi.com/zh/economics/sweden.md)
- [泰国](https://narwhalapi.com/zh/economics/thailand.md)
- [美国](https://narwhalapi.com/zh/economics/united-states.md)

## 来源

- 澳大利亚 澳大利亚统计局（ABS）
- 奥地利 奥地利统计局、欧盟统计局（Eurostat）
- 比利时 比利时统计局（Statbel）、比利时国家银行、欧盟统计局（Eurostat）
- 巴西 Brazilian Institute of Geography and Statistics (IBGE), Secretariat of Foreign Trade (SECEX)
- 加拿大 加拿大统计局
- 瑞士 瑞士联邦统计局(FSO)、Eurostat
- 智利 智利中央银行（BCCh）、智利国家统计局（INE）
- 中国 National Bureau of Statistics of China, General Administration of Customs of China
- 哥伦比亚 国家统计行政部（DANE）
- 捷克 捷克统计局（ČSÚ）
- 德国 德国联邦统计局（Destatis）
- 丹麦 丹麦统计局、欧盟统计局（Eurostat）

显示全部 42 个来源

- 西班牙 西班牙国家统计局（INE）、西班牙税务局（AEAT）
- 爱沙尼亚 爱沙尼亚统计局
- 芬兰 芬兰统计局、芬兰海关（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/api/economic-calendar.md)

### 经济数据 API

价格、劳动力、产出、贸易和利率的官方指标。

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

### 方法论

数据发布版本的检查和修订方式。

[阅读方法说明 →](https://narwhalapi.com/zh/methodology/economics.md)

## 常见问题

响应包含哪些内容？

获取某一个月的同比、环比和年初至今通胀率。

可以请求哪些时间段？

YYYY-MM 或 YYYY-QN

支持哪些数据范围？

全国通胀数据覆盖的国家见下方列表；年初至今数据是否可用取决于各数据源的接口约定。欧元区国家使用的是本国指数，而非欧盟统计局的 HICP，因此数值可能与欧盟统计局的数值不同。澳大利亚使用的是月度 CPI，而非季度 CPI，因此月度数值可能与季度数值不同。A country with no stored series can still answer the newest figure from the publisher's release: it has no history, so a period or version_id request for it returns 404 series_not_found.

## 从免费密钥开始

每月赠送 10 美元免费额度，无需绑卡。每月 10 美元免费额度，无需绑卡。

[获取免费 API 密钥](https://narwhalapi.com/zh/signup)
