所有 API

经济数据 API

一个来源,提供官方统计机构发布的 CPI、通胀、劳动力、GDP 和贸易数据。

在线99.99% uptime, last 30天364 ms 典型响应

首次请求

获取最新 CPI

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

端点

GET消费者价格指数/v1/economics/{country}/cpi

获取某个国家某个月份的居民消费价格总指数。

参数

  • country必填

    一个受支持的大写国家代码;请参阅此操作的覆盖列表。

  • period可选

    省略此参数可获取已采纳的最新完整发布数据,也可传入一个具体期间。

  • version_id可选

    可选的不可变发布版本。使用 dataset.published 或 dataset.revised 事件中的 resource_version;省略则读取当前已收录的指标。

响应字段

  • country字符串

    所请求的大写 ISO 三字母国家代码。

  • period字符串

    返回的官方观测期间。

  • value表示正数的十进制字符串

    总体指数水平。

  • index_base字符串

    指数的基期和基值,例如 1982-84=100。

  • released_on日期

    官方发布日期,而不是 Narwhal 的检索时间。

  • source对象

    可选的 source 对象仅在统计数据经由分发方获得时出现,包含 publisher(分发方所注明的原始发布方)和 distributor(分发机构)。存在 source 时,released_on 是分发方的发布日期,而不是原始发布方的发布日期。由发布方直接提供的序列没有 source。


完整参考文档 →
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_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 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.


完整参考文档 →
GET失业率/v1/economics/{country}/unemployment

获取一个观测期的官方失业率。

参数

  • country必填

    一个受支持的大写国家代码;请参阅此操作的覆盖列表。

  • period可选

    省略此参数可获取已采纳的最新完整发布数据,也可传入一个具体期间。

  • version_id可选

    可选的不可变发布版本。使用 dataset.published 或 dataset.revised 事件中的 resource_version;省略则读取当前已收录的指标。

响应字段

  • country字符串

    所请求的大写 ISO 三字母国家代码。

  • period字符串

    返回的官方观测期间。

  • rate十进制字符串

    已发布的比率,单位为百分比,范围为 0 至 100,包含两端。

  • released_on日期

    官方发布日期,而不是 Narwhal 的检索时间。

  • 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.

  • 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.

  • provisional是

    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: ["rate"]. A printed figure always wins over a calculated one. A stored answer can carry it too, not only an answer read from the release.


完整参考文档 →
GET劳动力参与率/v1/economics/{country}/labour-force-participation

获取一个观测期的官方劳动力参与率。

参数

  • country必填

    一个受支持的大写国家代码;请参阅此操作的覆盖列表。

  • period可选

    省略此参数可获取已采纳的最新完整发布数据,也可传入一个具体期间。

  • version_id可选

    可选的不可变发布版本。使用 dataset.published 或 dataset.revised 事件中的 resource_version;省略则读取当前已收录的指标。

响应字段

  • country字符串

    所请求的大写 ISO 三字母国家代码。

  • period字符串

    返回的官方观测期间。

  • rate十进制字符串

    已发布的比率,单位为百分比,范围为 0 至 100,包含两端。

  • released_on日期

    官方发布日期,而不是 Narwhal 的检索时间。

  • source对象

    可选的 source 对象仅在统计数据经由分发方获得时出现,包含 publisher(分发方所注明的原始发布方)和 distributor(分发机构)。存在 source 时,released_on 是分发方的发布日期,而不是原始发布方的发布日期。由发布方直接提供的序列没有 source。


完整参考文档 →
GET国内生产总值/v1/economics/{country}/gdp

获取一个季度的全国 GDP,始终按现价计算。

参数

  • country必填

    一个受支持的大写国家代码;请参阅此操作的覆盖列表。

  • period可选

    省略此参数可获取已采纳的最新完整发布数据,也可传入一个具体期间。

  • version_id可选

    可选的不可变发布版本。使用 dataset.published 或 dataset.revised 事件中的 resource_version;省略则读取当前已收录的指标。

响应字段

  • country字符串

    所请求的大写 ISO 三字母国家代码。

  • period字符串

    返回的官方观测期间。

  • value表示正数的十进制字符串

    按现价计算的GDP数值。

  • currencyISO 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.


完整参考文档 →
GETGDP 增长率/v1/economics/{country}/gdp-growth

获取一个季度的官方实际 GDP 增长率,按不变价格计算,以百分比表示。

参数

  • country必填

    一个受支持的大写国家代码;请参阅此操作的覆盖列表。

  • period可选

    省略此参数可获取已采纳的最新完整发布数据,也可传入一个具体期间。

  • version_id可选

    可选的不可变发布版本。使用 dataset.published 或 dataset.revised 事件中的 resource_version;省略则读取当前已收录的指标。

响应字段

  • country字符串

    所请求的大写 ISO 三字母国家代码。

  • period字符串

    返回的官方观测期间。

  • year_over_year十进制字符串

    与上年同一季度相比的实际 GDP 变化率,单位为百分比。

  • quarter_over_quarter十进制字符串

    与上一季度相比的实际 GDP 变化率,单位为百分比,未换算为年率。发布机构只发布同比数据时,以及年度期间,该字段会被省略。

  • year_to_date十进制字符串

    来源发布时提供的官方年初至今增长率,单位为百分比;否则省略。

  • 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. mixed means the two growth figures are on different bases. Japan is one example: its year on year growth is not adjusted, and its quarter on quarter growth is.

  • year_over_year_seasonal_adjustment字符串或 null

    The basis of each growth figure on its own, using the same values. They are filled only when seasonal_adjustment is mixed. Otherwise, or where the release does not state that figure's basis, they are null.

  • quarter_over_quarter_seasonal_adjustment字符串或 null

    The basis of each growth figure on its own, using the same values. They are filled only when seasonal_adjustment is mixed. Otherwise, or where the release does not state that figure's basis, they are null.

  • annualization字符串或 null

    Whether quarter on quarter growth is annualized: annualized or not_annualized. It is null when the answer has no quarter on quarter figure. Year on year growth is never annualized.

  • not_seasonally_adjusted是

    仅在增长率未经季节性调整时出现,值为 true。

  • annualized是

    仅在已发布的增长率经过年化时出现,值为 true。

  • year_over_year_not_seasonally_adjusted是

    仅当某国混用不同基准且其同比数值未经季节性调整时出现,值为 true。此时顶层标志不出现。

  • quarter_over_quarter_not_seasonally_adjusted是

    仅当某国混用不同基准且其季度环比数值未经季节性调整时出现,值为 true。此时顶层标志不出现。

  • seasonally_adjusted是

    仅当两个数值均记录为经季节性调整时出现,值为 true。

  • year_over_year_seasonally_adjusted是

    仅当某国混用不同基准且其同比数值经季节性调整时出现,值为 true。此时顶层标志不出现。

  • quarter_over_quarter_seasonally_adjusted是

    仅当某国混用不同基准且其季度环比数值经季节性调整时出现,值为 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.

  • provisional是

    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.


完整参考文档 →
GET货物贸易/v1/economics/{country}/trade

获取一个期间的出口额、进口额和精确的货物贸易差额。不包含服务。

参数

  • country必填

    一个受支持的大写国家代码;请参阅此操作的覆盖列表。

  • period可选

    省略此参数可获取已采纳的最新完整发布数据,也可传入一个具体期间。

  • version_id可选

    可选的不可变发布版本。使用 dataset.published 或 dataset.revised 事件中的 resource_version;省略则读取当前已收录的指标。

响应字段

  • country字符串

    所请求的大写 ISO 三字母国家代码。

  • period字符串

    返回的官方观测期间。

  • exports非负十进制字符串

    货物出口总额。

  • imports非负十进制字符串

    货物进口总额。

  • balance十进制字符串

    精确的出口额减进口额;结果可能为负。

  • currencyISO 4217 字符串

    三个货币值所使用的货币。

  • 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.

  • scope字符串

    What the totals cover. goods is trade in goods only, so services are not included. A headline figure that adds services is a different series and is not served here.

  • not_seasonally_adjusted是

    仅在数值为未经季节性调整的原始序列时出现,值为 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.


完整参考文档 →

使用场景

比较各国通胀

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

阅读指南 →

由 GDP 水平计算增长率

计算季度增长率并折算成年率。

阅读指南 →

如何检查收益率曲线倒挂

比较两个收益率,用基点读出利差。

阅读指南 →

计算实际利率

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

阅读指南 →

按国家和日期搭建经济日历

按 UTC 列出你所选国家和日期的发布时间。

阅读指南 →

回填历史数据

分页下载整个序列,中断后可继续。

阅读指南 →

覆盖范围

指标

显示全部 14 个指标

国家

显示全部 42 个国家

来源

  • 澳大利亚澳大利亚统计局(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 总览

通过 REST 和 MCP 获取9个国家和地区的国债收益率曲线。读取单个来源日期的数据或分页历史数据,数值以十进制百分数字符串表示。

探索 API →

常见问题

支持哪些国家?

请查看覆盖范围表,了解已发布数据所涵盖的国家。可用指标和历史数据涵盖的期间因国家而异。

API 是否包含历史经济数据?

是的。七个最新发布操作各有对应的 observations 路由,用于获取当前采纳的历史序列。

经济数据来自哪里?

每条已上线数据流都来自覆盖范围矩阵中列出的政府统计机构或其他国家级官方发布机构。

新发布数据多久可以获取?

Narwhal 会在数据通过验证后发布。公开测试版不承诺从来源机构发布到 Narwhal 公布之间的固定延迟。