比较各国通胀
把最新的通胀率排序,并保留每次发布的日期。
阅读指南 →各国官方机构发布的月度通胀率。
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"/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_atRFC 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.
calculatedarray of stringsPresent 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.
/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_ofRFC 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_atRFC 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[].calculatedarray of stringsPresent 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。
获取某一个月的同比、环比和年初至今通胀率。
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 美元免费额度,无需绑卡。