失业率 API 参考
获取一个观测期的官方失业率。
economics_ 可通过 REST 和 economics_ MCP 工具调用。两者返回相同的数据结构,并使用同一额度。
端点与请求
GET /v1/economics/{country}/unemploymentcurl --request GET \
--url "https://api.narwhalapi.com/v1/economics/USA/unemployment?period=2026-07" \
--header "Authorization: Bearer $NARWHAL_API_KEY"MCP 使用工具 economics_ ,并传入下方对应的参数。
参数
此操作接受的期间格式是 YYYY, YYYY-MM, or YYYY-QN。
| 名称 | 必填 | 类型 | 含义 |
|---|---|---|---|
country | 是 | 路径·ISO alpha-3 | 一个受支持的大写国家代码;请参阅此操作的覆盖列表。 |
period | 否 | 查询·YYYY、YYYY-MM 或 YYYY-QN | 省略此参数可获取已采纳的最新完整发布数据,也可传入一个具体期间。 |
version_ | 否 | 查询·UUID | 可选的不可变发布版本。可使用 `dataset.published` 或 `dataset.revised` 事件中的 `resource_version`;省略时读取当前已收录的指标。 |
响应
{
"country": "USA",
"period": "2026-07",
"rate": "4.1",
"released_on": "2026-11-06"
}| 字段 | 类型 | 必填 | 含义 |
|---|---|---|---|
country | 字符串 | 是 | 所请求的大写 ISO 三字母国家代码。 |
period | 字符串 | 是 | 返回的官方观测期间。 |
rate | 十进制字符串 | 是 | 已发布的比率,单位为百分比,范围为 0 至 100,包含两端。 |
released_ | 日期 | 是 | 官方发布日期,而不是 Narwhal 的检索时间。 |
seasonal_ | 字符串或 null | 是 | 该数据是否经过季节调整,以发布机构的说明为准:seasonally_、not_、calendar_ 或 trend。null 表示发布机构没有说明。请勿将 null 理解为已调整。 |
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_ 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_ | RFC 3339 时间戳 | 否 | Appears only on a newest figure read from the publisher's release. When the publisher released the figure. |
provisional | true | 否 | 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: ["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. |
Newest figure read from the release
The newest answer can come from Narwhal's own read of the statistics office's release, before the stored series has it. Such an answer adds source、 stage、 published_at 和 provisional (only when true). An answer with none of these fields is the stored value. A stored answer can also carry calculated, which lists the figures Narwhal calculated from the publisher's own numbers.
For a country with a stored series, a read value is shown when it is for a later period than the stored one, or a later final reading of the same period.
Where a stored series reaches Narwhal through a distributor, the statistics office's own printed figure for the same period replaces it. The answer then names the office as the source and no distributor.
It also answers the newest figure for a country that has no stored series, from the release alone, with the same fields and the same charge: Anguilla, Bulgaria, Guyana, Hungary, Iceland, Kazakhstan, Macao, Morocco, Taiwan, Uruguay, Vanuatu, Vietnam and Zambia。It has no history: a period 或 version_id request for such a country returns 404 series_not_found。
curl --request GET \
--url "https://api.narwhalapi.com/v1/economics/BGR/unemployment" \
--header "Authorization: Bearer $NARWHAL_API_KEY"{
"country": "BGR",
"period": "2026-Q3",
"rate": "3.1",
"released_on": "2026-11-13",
"source": {
"publisher": "National Statistical Institute"
},
"stage": "final",
"published_at": "2026-11-13T09:00:00Z"
}curl --request GET \
--url "https://api.narwhalapi.com/v1/economics/DEU/unemployment" \
--header "Authorization: Bearer $NARWHAL_API_KEY"{
"country": "DEU",
"period": "2026-09",
"rate": "4.1",
"released_on": "2026-10-30",
"source": {
"publisher": "Statistisches Bundesamt"
},
"stage": "final",
"published_at": "2026-10-30T08:55:00Z"
}API 错误码与额度
400 invalid_— 国家、期间或筛选格式无效。query 401 invalid_— Bearer 密钥缺失或被拒绝。api_ key 404 series_— 没有已批准的观测值符合请求。not_ found 429 rate_— 已达到网络或账户的短时窗口限额;请按以下响应头指定的等待时间重试:limit_ exceeded Retry-After。402 insufficient_,余额不足以支付该调用。credits 503 economics_— Narwhal 无法安全提供已接受的发布版本。unavailable
Only a successful data response costs credit. 查看 所有错误、响应头和重试规则。
数据时效性
省略 period 返回 Narwhal 最新存储的已接受发布版本。API 调用读取 Narwhal 数据库,不会实时调用官方发布机构。
released_ 是官方发布日期。
The newest figure can be shown as soon as the publisher releases it, from Narwhal's read of the release. Until the stored series has the same period, the answer carries the read fields described above.
当前公开测试覆盖范围
39 国家
AUS, AUT, BEL, CAN, CHE, CHL, COL, CZE, DEU, DNK, ESP, EST, FIN, FRA, GBR, HRV, IND, IRL, ISR, ITA, JPN, KOR, LTU, LUX, LVA, MEX, MYS, NLD, NOR, NZL, PHL, POL, PRT, SAU, SGP, SVN, SWE, USA, ZAF
观测频率以各国官方发布数据的频率为准。
世界银行年度历史数据
163 国家
ABW, AFG, AGO, ALB, ARE, ARM, ASM, ATG, AZE, BDI, BEN, BFA, BGR, BHR, BHS, BIH, BLR, BLZ, BMU, BOL, BRB, BRN, BTN, BWA, CAF, CHN, CIV, CMR, COD, COG, COM, CPV, CRI, CUB, CUW, CYM, CYP, DJI, DMA, DOM, DZA, ECU, EGY, ERI, ETH, FJI, FRO, GAB, GEO, GHA, GIN, GMB, GNB, GNQ, GRC, GRD, GRL, GTM, GUM, GUY, HKG, HND, HTI, HUN, IMN, IRN, IRQ, ISL, JAM, JOR, KAZ, KEN, KGZ, KHM, KIR, KWT, LAO, LBN, LBR, LBY, LCA, LIE, LKA, LSO, MAC, MAR, MDA, MDG, MDV, MHL, MKD, MLI, MLT, MMR, MNE, MNG, MNP, MOZ, MRT, MUS, MWI, NAM, NCL, NER, NGA, NIC, NPL, NRU, OMN, PAK, PAN, PER, PLW, PNG, PRI, PRK, PRY, PSE, PYF, QAT, ROU, RUS, RWA, SDN, SEN, SLB, SLE, SLV, SMR, SOM, SRB, SSD, STP, SUR, SVK, SWZ, SYC, SYR, TCA, TCD, TGO, TJK, TKM, TLS, TON, TTO, TUN, TUR, TUV, TZA, UGA, UKR, URY, UZB, VCT, VEN, VIR, VNM, VUT, WSM, YEM, ZMB, ZWE
这些国家没有最新值路由。向此路由发出的请求会返回 404 series_,请改用历史路由。
日频外汇数据可通过以下 API 获取: 外汇 API。
返回 所有经济数据操作。
从免费密钥开始
每月赠送 10 美元免费额度,无需绑卡。每月 10 美元免费额度,无需绑卡。
此页面对你有帮助吗?