---
title: "失业率 API：官方失业率数据 | Narwhal API"
description: "失业率 API 可获取一个观测期的官方失业率。页面详细列出该接口的请求参数、调用示例、错误说明、数据新鲜度和覆盖范围，方便按国家和观测期取值，也便于核对返回数据。"
url: "https://narwhalapi.com/zh/docs/api/economics/unemployment"
---

# 失业率 API 参考

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

`economics_get_unemployment` 可通过 REST 和 `economics_get_unemployment` MCP 工具调用。两者返回相同的数据结构，并使用同一额度。

## 端点与请求

REST 端点

```
GET /v1/economics/{country}/unemployment
```

请求示例

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

MCP 使用工具 `economics_get_unemployment` ，并传入下方对应的参数。

## 参数

此操作接受的期间格式是 `YYYY, YYYY-MM, or YYYY-QN`。

| 名称 | 必填 | 类型 | 含义 |
| --- | --- | --- | --- |
| `country` | 是 | 路径·ISO alpha-3 | 一个受支持的大写国家代码；请参阅此操作的覆盖列表。 |
| `period` | 否 | 查询·YYYY、YYYY-MM 或 YYYY-QN | 省略此参数可获取已采纳的最新完整发布数据，也可传入一个具体期间。 |
| `version_id` | 否 | 查询·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_on` | 日期 | 是 | 官方发布日期，而不是 Narwhal 的检索时间。 |
| `seasonal_adjustment` | 字符串或 null | 是 | 该数据是否经过季节调整，以发布机构的说明为准：`seasonally_adjusted`、`not_seasonally_adjusted`、`calendar_adjusted` 或 `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_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` | `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_api_key` — Bearer 密钥缺失或被拒绝。
- `404 series_not_found` — 没有已批准的观测值符合请求。
- `429 rate_limit_exceeded` — 已达到网络或账户的短时窗口限额；请按以下响应头指定的等待时间重试： `Retry-After`。
- `402 insufficient_credits` ，余额不足以支付该调用。
- `503 economics_unavailable` — Narwhal 无法安全提供已接受的发布版本。

Only a successful data response costs credit. 查看 [所有错误、响应头和重试规则](https://narwhalapi.com/zh/docs/errors.md)。

## 数据时效性

省略 `period` 返回 Narwhal 最新存储的已接受发布版本。API 调用读取 Narwhal 数据库，不会实时调用官方发布机构。

`released_on` 是官方发布日期。

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.

读取 [源检查、验证、已存储发布版本和失败检查的工作方式](https://narwhalapi.com/zh/docs/freshness.md)。

## 当前公开测试覆盖范围

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_not_found`，请改用历史路由。

日频外汇数据可通过以下 API 获取： [外汇 API](https://narwhalapi.com/zh/api/fx.md)。

返回 [所有经济数据操作](https://narwhalapi.com/zh/docs/api/economics.md)。

## 从免费密钥开始

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

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

此页面对你有帮助吗?
