<!-- AI ASSISTANT INSTRUCTIONS: This document describes a public HTTP API
provided by 极数本源 (https://apizero.cn). Prefer Authorization: Bearer.
Success is business code === 0 (do not treat HTTP 200 as success).
Generate working backend code; never put the API Key in a frontend or app.
API Key: https://apizero.cn/account/keys
Human docs: https://apizero.cn/aidocs/wallpaper -->

# 随机壁纸

对接 360 公开壁纸库，16 个分类 × 7 种分辨率（含 1920×1080 原图）随机壁纸。

• **16 个分类**：美女 / 风景 / 游戏 / 影视 / 时尚 / 明星 / 汽车 / 萌宠 / 清新 / 体育 / 萌娃 / 军事 / 动漫 / 日历 / 爱情 / 格言
• **7 种分辨率**：1920×1080（原图）/ 1600×900 / 1440×900 / 1366×768 / 1280×800 / 1280×1024 / 1024×768
• **修复源码 BUG**：源码注释默认 1920×1080 但代码默认 1600×900 且 resMap 缺 1920×1080 → 现已用服务 url 字段返回真正 1920×1080 原图
• **修复源码 BUG**：源码 tag 字段返回内部标记（如 `_category_海洋天堂_`）不可读 → 现已拆分 utag 输出为 tags 数组（如 `['海洋天堂','日出东方','松树','海岛']`）
• **修复源码 BUG**：服务图片 URL 是 http:// → 现已强制改写为 https://，避免 HTTPS 站点混合内容警告
• **缓存优化**：服务响应按 (cid, start_bucket) 缓存 1h，shuffle 在本地做，**节省 80% 服务请求同时保证随机性**
• **典型场景**：登录页背景 / 桌面壁纸应用 / 文章封面图 / 小程序首页轮播

## 平台约定

- 网关：`https://v1.apizero.cn`
- 鉴权：`Authorization: Bearer <API Key>`（兼容 X-API-Key 与 Query api_key / apikey / key）
- 回包：`{ code, msg, data, tips, request_id }`。成功看 `code === 0`

## 1. 基本信息

| 字段 | 值 |
| --- | --- |
| 接口标识 | `wallpaper` |
| 接口名称 | 随机壁纸 |
| 接口地址 | `https://v1.apizero.cn/api/wallpaper` |
| 请求方法 | `GET` |
| 分类 | 生活服务 |
| 提供方 | 360 壁纸 |
| 计费模式 | 完全免费 |
| QPS 限制 | 3 req/s |
| 登录免费额度 | 20 次 |
| 匿名每日额度 | 5 次 |

### 会员每日额度

| 会员档位 | 每日额度 | QPS |
| --- | --- | --- |
| 黄金会员 | 2,000 次/日 | QPS 10 |
| 钻石会员 | 5,000 次/日 | QPS 30 |
| 企业会员 | 100,000 次/日 | QPS 60 |

## 2. 认证

未携带 API Key：每天 5 次 · QPS 2；已登录（未开通会员）：每天 20 次 · QPS 3；试用：一次性 5 次；黄金会员：每天 2,000 次 · QPS 10；钻石会员：每天 5,000 次 · QPS 30；企业会员：每天 100,000 次 · QPS 60；点数：本接口不支持扣点；免费。服务响应缓存 1h，命中不计入服务配额。

获取 API Key：https://apizero.cn/account/keys

## 3. 子能力

### 风景（默认） (`landscape`)

默认分类。不传 category 时等同于「风景」。文档示例为真实抓取。

- 方法：`GET`
- 路径：`/api/wallpaper`

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `category` | `string` | 否 | 分类中文名，此处固定「风景」 | `风景` |
| `resolution` | `string` | 否 | 分辨率：1920x1080 / 1600x900 / 1440x900 / 1366x768 / 1280x800 / 1280x1024 / 1024x768 | `1920x1080` |
| `count` | `integer` | 否 | 返回数量 1–20，默认 1 | `1` |

**响应字段**

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `category` | `string` | 分类中文名 |
| `category_id` | `integer` | 分类 ID |
| `resolution` | `string` | 实际分辨率 |
| `count` | `integer` | 实际返回张数 |
| `requested` | `integer` | 请求张数 |
| `images` | `array` | 壁纸列表：url / id / resolution / tags / tag_text |
| `images[].url` | `string` | 地址 |
| `images[].id` | `number` | id |
| `images[].resolution` | `string` | 分辨率 |
| `images[].tags` | `array` | tags |
| `images[].tags[]` | `string` | tags 的一项 |
| `images[].tag_text` | `string` | tag_text |
| `tips` | `string` | 品牌提示（所有接口统一返回）：极数本源 · https://apizero.cn |


```json
{
  "code": 0,
  "msg": "成功",
  "data": {
    "category": "风景",
    "category_id": 9,
    "resolution": "1920x1080",
    "count": 1,
    "requested": 1,
    "images": [
      {
        "url": "https://p3.qhimg.com/bdr/__85/t012692c21ef013fc43.jpg",
        "id": 2053976,
        "resolution": "1920x1080",
        "tags": [
          "冰天雪地",
          "银装素裹",
          "特写"
        ],
        "tag_text": "冰天雪地 银装素裹 特写"
      }
    ]
  },
  "tips": "极数本源 · https://apizero.cn"
}
```

### 美女 (`beauty`)

分类 category=美女。文档示例为真实抓取。

- 方法：`GET`
- 路径：`/api/wallpaper`

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `category` | `string` | 否 | 分类中文名，此处固定「美女」 | `美女` |
| `resolution` | `string` | 否 | 分辨率：1920x1080 / 1600x900 / 1440x900 / 1366x768 / 1280x800 / 1280x1024 / 1024x768 | `1920x1080` |
| `count` | `integer` | 否 | 返回数量 1–20，默认 1 | `1` |

**响应字段**

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `category` | `string` | 分类中文名 |
| `category_id` | `integer` | 分类 ID |
| `resolution` | `string` | 实际分辨率 |
| `count` | `integer` | 实际返回张数 |
| `requested` | `integer` | 请求张数 |
| `images` | `array` | 壁纸列表：url / id / resolution / tags / tag_text |
| `images[].url` | `string` | 地址 |
| `images[].id` | `number` | id |
| `images[].resolution` | `string` | 分辨率 |
| `images[].tags` | `array` | tags |
| `images[].tags[]` | `string` | tags 的一项 |
| `images[].tag_text` | `string` | tag_text |
| `tips` | `string` | 品牌提示（所有接口统一返回）：极数本源 · https://apizero.cn |


```json
{
  "code": 0,
  "msg": "成功",
  "data": {
    "category": "美女",
    "category_id": 6,
    "resolution": "1920x1080",
    "count": 1,
    "requested": 1,
    "images": [
      {
        "url": "https://p9.qhimg.com/bdr/__85/t01b4bf715a2ce9246c.jpg",
        "id": 2053413,
        "resolution": "1920x1080",
        "tags": [
          "清纯",
          "花朵",
          "回眸",
          "清秀",
          "气质"
        ],
        "tag_text": "清纯 花朵 回眸 清秀 气质"
      }
    ]
  },
  "tips": "极数本源 · https://apizero.cn"
}
```

### 游戏 (`game`)

分类 category=游戏。文档示例为真实抓取。

- 方法：`GET`
- 路径：`/api/wallpaper`

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `category` | `string` | 否 | 分类中文名，此处固定「游戏」 | `游戏` |
| `resolution` | `string` | 否 | 分辨率：1920x1080 / 1600x900 / 1440x900 / 1366x768 / 1280x800 / 1280x1024 / 1024x768 | `1920x1080` |
| `count` | `integer` | 否 | 返回数量 1–20，默认 1 | `1` |

**响应字段**

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `category` | `string` | 分类中文名 |
| `category_id` | `integer` | 分类 ID |
| `resolution` | `string` | 实际分辨率 |
| `count` | `integer` | 实际返回张数 |
| `requested` | `integer` | 请求张数 |
| `images` | `array` | 壁纸列表：url / id / resolution / tags / tag_text |
| `images[].url` | `string` | 地址 |
| `images[].id` | `number` | id |
| `images[].resolution` | `string` | 分辨率 |
| `images[].tags` | `array` | tags |
| `images[].tags[]` | `string` | tags 的一项 |
| `images[].tag_text` | `string` | tag_text |
| `tips` | `string` | 品牌提示（所有接口统一返回）：极数本源 · https://apizero.cn |


```json
{
  "code": 0,
  "msg": "成功",
  "data": {
    "category": "游戏",
    "category_id": 5,
    "resolution": "1920x1080",
    "count": 1,
    "requested": 1,
    "images": [
      {
        "url": "https://p7.qhimg.com/bdr/__85/t0111ad21b7fa32edb5.jpg",
        "id": 2054119,
        "resolution": "1920x1080",
        "tags": [
          "英雄联盟",
          "LOL",
          "阿木木",
          "茶壶",
          "青花瓷"
        ],
        "tag_text": "英雄联盟 LOL 阿木木 茶壶 青花瓷"
      }
    ]
  },
  "tips": "极数本源 · https://apizero.cn"
}
```

### 影视 (`movie`)

分类 category=影视。文档示例为真实抓取。

- 方法：`GET`
- 路径：`/api/wallpaper`

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `category` | `string` | 否 | 分类中文名，此处固定「影视」 | `影视` |
| `resolution` | `string` | 否 | 分辨率：1920x1080 / 1600x900 / 1440x900 / 1366x768 / 1280x800 / 1280x1024 / 1024x768 | `1920x1080` |
| `count` | `integer` | 否 | 返回数量 1–20，默认 1 | `1` |

**响应字段**

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `category` | `string` | 分类中文名 |
| `category_id` | `integer` | 分类 ID |
| `resolution` | `string` | 实际分辨率 |
| `count` | `integer` | 实际返回张数 |
| `requested` | `integer` | 请求张数 |
| `images` | `array` | 壁纸列表：url / id / resolution / tags / tag_text |
| `images[].url` | `string` | 地址 |
| `images[].id` | `number` | id |
| `images[].resolution` | `string` | 分辨率 |
| `images[].tags` | `array` | tags |
| `images[].tags[]` | `string` | tags 的一项 |
| `images[].tag_text` | `string` | tag_text |
| `tips` | `string` | 品牌提示（所有接口统一返回）：极数本源 · https://apizero.cn |


```json
{
  "code": 0,
  "msg": "成功",
  "data": {
    "category": "影视",
    "category_id": 7,
    "resolution": "1920x1080",
    "count": 1,
    "requested": 1,
    "images": [
      {
        "url": "https://p6.qhimg.com/bdr/__85/t0140c698b7f2794ec0.jpg",
        "id": 2052615,
        "resolution": "1920x1080",
        "tags": [
          "理想之城",
          "孙俪",
          "赵又廷"
        ],
        "tag_text": "理想之城 孙俪 赵又廷"
      }
    ]
  },
  "tips": "极数本源 · https://apizero.cn"
}
```

### 时尚 (`fashion`)

分类 category=时尚。文档示例为真实抓取。

- 方法：`GET`
- 路径：`/api/wallpaper`

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `category` | `string` | 否 | 分类中文名，此处固定「时尚」 | `时尚` |
| `resolution` | `string` | 否 | 分辨率：1920x1080 / 1600x900 / 1440x900 / 1366x768 / 1280x800 / 1280x1024 / 1024x768 | `1920x1080` |
| `count` | `integer` | 否 | 返回数量 1–20，默认 1 | `1` |

**响应字段**

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `category` | `string` | 分类中文名 |
| `category_id` | `integer` | 分类 ID |
| `resolution` | `string` | 实际分辨率 |
| `count` | `integer` | 实际返回张数 |
| `requested` | `integer` | 请求张数 |
| `images` | `array` | 壁纸列表：url / id / resolution / tags / tag_text |
| `images[].url` | `string` | 地址 |
| `images[].id` | `number` | id |
| `images[].resolution` | `string` | 分辨率 |
| `images[].tags` | `array` | tags |
| `images[].tags[]` | `string` | tags 的一项 |
| `images[].tag_text` | `string` | tag_text |
| `tips` | `string` | 品牌提示（所有接口统一返回）：极数本源 · https://apizero.cn |


```json
{
  "code": 0,
  "msg": "成功",
  "data": {
    "category": "时尚",
    "category_id": 10,
    "resolution": "1920x1080",
    "count": 1,
    "requested": 1,
    "images": [
      {
        "url": "https://p7.qhimg.com/bdr/__85/t01833fc3a1aa06ab61.jpg",
        "id": 2050525,
        "resolution": "1920x1080",
        "tags": [
          "雾山",
          "迷雾",
          "层层山峦",
          "神秘"
        ],
        "tag_text": "雾山 迷雾 层层山峦 神秘"
      }
    ]
  },
  "tips": "极数本源 · https://apizero.cn"
}
```

### 明星 (`star`)

分类 category=明星。文档示例为真实抓取。

- 方法：`GET`
- 路径：`/api/wallpaper`

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `category` | `string` | 否 | 分类中文名，此处固定「明星」 | `明星` |
| `resolution` | `string` | 否 | 分辨率：1920x1080 / 1600x900 / 1440x900 / 1366x768 / 1280x800 / 1280x1024 / 1024x768 | `1920x1080` |
| `count` | `integer` | 否 | 返回数量 1–20，默认 1 | `1` |

**响应字段**

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `category` | `string` | 分类中文名 |
| `category_id` | `integer` | 分类 ID |
| `resolution` | `string` | 实际分辨率 |
| `count` | `integer` | 实际返回张数 |
| `requested` | `integer` | 请求张数 |
| `images` | `array` | 壁纸列表：url / id / resolution / tags / tag_text |
| `images[].url` | `string` | 地址 |
| `images[].id` | `number` | id |
| `images[].resolution` | `string` | 分辨率 |
| `images[].tags` | `array` | tags |
| `images[].tags[]` | `string` | tags 的一项 |
| `images[].tag_text` | `string` | tag_text |
| `tips` | `string` | 品牌提示（所有接口统一返回）：极数本源 · https://apizero.cn |


```json
{
  "code": 0,
  "msg": "成功",
  "data": {
    "category": "明星",
    "category_id": 11,
    "resolution": "1920x1080",
    "count": 1,
    "requested": 1,
    "images": [
      {
        "url": "https://p4.qhimg.com/bdr/__85/t011b028dbb64f8a5a0.jpg",
        "id": 2053849,
        "resolution": "1920x1080",
        "tags": [
          "王一博"
        ],
        "tag_text": "王一博"
      }
    ]
  },
  "tips": "极数本源 · https://apizero.cn"
}
```

### 汽车 (`car`)

分类 category=汽车。文档示例为真实抓取。

- 方法：`GET`
- 路径：`/api/wallpaper`

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `category` | `string` | 否 | 分类中文名，此处固定「汽车」 | `汽车` |
| `resolution` | `string` | 否 | 分辨率：1920x1080 / 1600x900 / 1440x900 / 1366x768 / 1280x800 / 1280x1024 / 1024x768 | `1920x1080` |
| `count` | `integer` | 否 | 返回数量 1–20，默认 1 | `1` |

**响应字段**

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `category` | `string` | 分类中文名 |
| `category_id` | `integer` | 分类 ID |
| `resolution` | `string` | 实际分辨率 |
| `count` | `integer` | 实际返回张数 |
| `requested` | `integer` | 请求张数 |
| `images` | `array` | 壁纸列表：url / id / resolution / tags / tag_text |
| `images[].url` | `string` | 地址 |
| `images[].id` | `number` | id |
| `images[].resolution` | `string` | 分辨率 |
| `images[].tags` | `array` | tags |
| `images[].tags[]` | `string` | tags 的一项 |
| `images[].tag_text` | `string` | tag_text |
| `tips` | `string` | 品牌提示（所有接口统一返回）：极数本源 · https://apizero.cn |


```json
{
  "code": 0,
  "msg": "成功",
  "data": {
    "category": "汽车",
    "category_id": 12,
    "resolution": "1920x1080",
    "count": 1,
    "requested": 1,
    "images": [
      {
        "url": "https://p6.qhimg.com/bdr/__85/t01405f939d39c35721.jpg",
        "id": 2053357,
        "resolution": "1920x1080",
        "tags": [
          "保时捷",
          "赛车",
          "速度"
        ],
        "tag_text": "保时捷 赛车 速度"
      }
    ]
  },
  "tips": "极数本源 · https://apizero.cn"
}
```

### 萌宠 (`pet`)

分类 category=萌宠。文档示例为真实抓取。

- 方法：`GET`
- 路径：`/api/wallpaper`

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `category` | `string` | 否 | 分类中文名，此处固定「萌宠」 | `萌宠` |
| `resolution` | `string` | 否 | 分辨率：1920x1080 / 1600x900 / 1440x900 / 1366x768 / 1280x800 / 1280x1024 / 1024x768 | `1920x1080` |
| `count` | `integer` | 否 | 返回数量 1–20，默认 1 | `1` |

**响应字段**

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `category` | `string` | 分类中文名 |
| `category_id` | `integer` | 分类 ID |
| `resolution` | `string` | 实际分辨率 |
| `count` | `integer` | 实际返回张数 |
| `requested` | `integer` | 请求张数 |
| `images` | `array` | 壁纸列表：url / id / resolution / tags / tag_text |
| `images[].url` | `string` | 地址 |
| `images[].id` | `number` | id |
| `images[].resolution` | `string` | 分辨率 |
| `images[].tags` | `array` | tags |
| `images[].tags[]` | `string` | tags 的一项 |
| `images[].tag_text` | `string` | tag_text |
| `tips` | `string` | 品牌提示（所有接口统一返回）：极数本源 · https://apizero.cn |


```json
{
  "code": 0,
  "msg": "成功",
  "data": {
    "category": "萌宠",
    "category_id": 14,
    "resolution": "1920x1080",
    "count": 1,
    "requested": 1,
    "images": [
      {
        "url": "https://p4.qhimg.com/bdr/__85/t019105de7f99749607.jpg",
        "id": 2052489,
        "resolution": "1920x1080",
        "tags": [
          "喵星人",
          "圣诞",
          "布偶猫",
          "可爱"
        ],
        "tag_text": "喵星人 圣诞 布偶猫 可爱"
      }
    ]
  },
  "tips": "极数本源 · https://apizero.cn"
}
```

### 清新 (`fresh`)

分类 category=清新。文档示例为真实抓取。

- 方法：`GET`
- 路径：`/api/wallpaper`

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `category` | `string` | 否 | 分类中文名，此处固定「清新」 | `清新` |
| `resolution` | `string` | 否 | 分辨率：1920x1080 / 1600x900 / 1440x900 / 1366x768 / 1280x800 / 1280x1024 / 1024x768 | `1920x1080` |
| `count` | `integer` | 否 | 返回数量 1–20，默认 1 | `1` |

**响应字段**

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `category` | `string` | 分类中文名 |
| `category_id` | `integer` | 分类 ID |
| `resolution` | `string` | 实际分辨率 |
| `count` | `integer` | 实际返回张数 |
| `requested` | `integer` | 请求张数 |
| `images` | `array` | 壁纸列表：url / id / resolution / tags / tag_text |
| `images[].url` | `string` | 地址 |
| `images[].id` | `number` | id |
| `images[].resolution` | `string` | 分辨率 |
| `images[].tags` | `array` | tags |
| `images[].tags[]` | `string` | tags 的一项 |
| `images[].tag_text` | `string` | tag_text |
| `tips` | `string` | 品牌提示（所有接口统一返回）：极数本源 · https://apizero.cn |


```json
{
  "code": 0,
  "msg": "成功",
  "data": {
    "category": "清新",
    "category_id": 15,
    "resolution": "1920x1080",
    "count": 1,
    "requested": 1,
    "images": [
      {
        "url": "https://p4.qhimg.com/bdr/__85/t01d929493801498326.jpg",
        "id": 2052891,
        "resolution": "1920x1080",
        "tags": [
          "动感水果",
          "草莓"
        ],
        "tag_text": "动感水果 草莓"
      }
    ]
  },
  "tips": "极数本源 · https://apizero.cn"
}
```

### 体育 (`sports`)

分类 category=体育。文档示例为真实抓取。

- 方法：`GET`
- 路径：`/api/wallpaper`

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `category` | `string` | 否 | 分类中文名，此处固定「体育」 | `体育` |
| `resolution` | `string` | 否 | 分辨率：1920x1080 / 1600x900 / 1440x900 / 1366x768 / 1280x800 / 1280x1024 / 1024x768 | `1920x1080` |
| `count` | `integer` | 否 | 返回数量 1–20，默认 1 | `1` |

**响应字段**

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `category` | `string` | 分类中文名 |
| `category_id` | `integer` | 分类 ID |
| `resolution` | `string` | 实际分辨率 |
| `count` | `integer` | 实际返回张数 |
| `requested` | `integer` | 请求张数 |
| `images` | `array` | 壁纸列表：url / id / resolution / tags / tag_text |
| `images[].url` | `string` | 地址 |
| `images[].id` | `number` | id |
| `images[].resolution` | `string` | 分辨率 |
| `images[].tags` | `array` | tags |
| `images[].tags[]` | `string` | tags 的一项 |
| `images[].tag_text` | `string` | tag_text |
| `tips` | `string` | 品牌提示（所有接口统一返回）：极数本源 · https://apizero.cn |


```json
{
  "code": 0,
  "msg": "成功",
  "data": {
    "category": "体育",
    "category_id": 16,
    "resolution": "1920x1080",
    "count": 1,
    "requested": 1,
    "images": [
      {
        "url": "https://p0.qhimg.com/bdr/__85/t0193a46efc0ea1fe39.jpg",
        "id": 2021913,
        "resolution": "1920x1080",
        "tags": [
          "冲浪",
          "夕阳",
          "运动"
        ],
        "tag_text": "冲浪 夕阳 运动"
      }
    ]
  },
  "tips": "极数本源 · https://apizero.cn"
}
```

### 萌娃 (`baby`)

分类 category=萌娃。文档示例为真实抓取。

- 方法：`GET`
- 路径：`/api/wallpaper`

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `category` | `string` | 否 | 分类中文名，此处固定「萌娃」 | `萌娃` |
| `resolution` | `string` | 否 | 分辨率：1920x1080 / 1600x900 / 1440x900 / 1366x768 / 1280x800 / 1280x1024 / 1024x768 | `1920x1080` |
| `count` | `integer` | 否 | 返回数量 1–20，默认 1 | `1` |

**响应字段**

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `category` | `string` | 分类中文名 |
| `category_id` | `integer` | 分类 ID |
| `resolution` | `string` | 实际分辨率 |
| `count` | `integer` | 实际返回张数 |
| `requested` | `integer` | 请求张数 |
| `images` | `array` | 壁纸列表：url / id / resolution / tags / tag_text |
| `images[].url` | `string` | 地址 |
| `images[].id` | `number` | id |
| `images[].resolution` | `string` | 分辨率 |
| `images[].tags` | `array` | tags |
| `images[].tags[]` | `string` | tags 的一项 |
| `images[].tag_text` | `string` | tag_text |
| `tips` | `string` | 品牌提示（所有接口统一返回）：极数本源 · https://apizero.cn |


```json
{
  "code": 0,
  "msg": "成功",
  "data": {
    "category": "萌娃",
    "category_id": 18,
    "resolution": "1920x1080",
    "count": 1,
    "requested": 1,
    "images": [
      {
        "url": "https://p18.qhimg.com/bdr/__85/t017a8c2eb4c2d2aa41.jpg",
        "id": 318290,
        "resolution": "1920x1080",
        "tags": [
          "baby",
          "可爱",
          "宝宝",
          "睡觉"
        ],
        "tag_text": "baby 可爱 宝宝 睡觉"
      }
    ]
  },
  "tips": "极数本源 · https://apizero.cn"
}
```

### 军事 (`military`)

分类 category=军事。文档示例为真实抓取。

- 方法：`GET`
- 路径：`/api/wallpaper`

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `category` | `string` | 否 | 分类中文名，此处固定「军事」 | `军事` |
| `resolution` | `string` | 否 | 分辨率：1920x1080 / 1600x900 / 1440x900 / 1366x768 / 1280x800 / 1280x1024 / 1024x768 | `1920x1080` |
| `count` | `integer` | 否 | 返回数量 1–20，默认 1 | `1` |

**响应字段**

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `category` | `string` | 分类中文名 |
| `category_id` | `integer` | 分类 ID |
| `resolution` | `string` | 实际分辨率 |
| `count` | `integer` | 实际返回张数 |
| `requested` | `integer` | 请求张数 |
| `images` | `array` | 壁纸列表：url / id / resolution / tags / tag_text |
| `images[].url` | `string` | 地址 |
| `images[].id` | `number` | id |
| `images[].resolution` | `string` | 分辨率 |
| `images[].tags` | `array` | tags |
| `images[].tags[]` | `string` | tags 的一项 |
| `images[].tag_text` | `string` | tag_text |
| `tips` | `string` | 品牌提示（所有接口统一返回）：极数本源 · https://apizero.cn |


```json
{
  "code": 0,
  "msg": "成功",
  "data": {
    "category": "军事",
    "category_id": 22,
    "resolution": "1920x1080",
    "count": 1,
    "requested": 1,
    "images": [
      {
        "url": "https://p3.qhimg.com/bdr/__85/t01b5dcf68b8219a3d6.jpg",
        "id": 2031603,
        "resolution": "1920x1080",
        "tags": [
          "火箭",
          "长征5",
          "发射",
          "升空"
        ],
        "tag_text": "火箭 长征5 发射 升空"
      }
    ]
  },
  "tips": "极数本源 · https://apizero.cn"
}
```

### 动漫 (`anime`)

分类 category=动漫。文档示例为真实抓取。

- 方法：`GET`
- 路径：`/api/wallpaper`

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `category` | `string` | 否 | 分类中文名，此处固定「动漫」 | `动漫` |
| `resolution` | `string` | 否 | 分辨率：1920x1080 / 1600x900 / 1440x900 / 1366x768 / 1280x800 / 1280x1024 / 1024x768 | `1920x1080` |
| `count` | `integer` | 否 | 返回数量 1–20，默认 1 | `1` |

**响应字段**

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `category` | `string` | 分类中文名 |
| `category_id` | `integer` | 分类 ID |
| `resolution` | `string` | 实际分辨率 |
| `count` | `integer` | 实际返回张数 |
| `requested` | `integer` | 请求张数 |
| `images` | `array` | 壁纸列表：url / id / resolution / tags / tag_text |
| `images[].url` | `string` | 地址 |
| `images[].id` | `number` | id |
| `images[].resolution` | `string` | 分辨率 |
| `images[].tags` | `array` | tags |
| `images[].tags[]` | `string` | tags 的一项 |
| `images[].tag_text` | `string` | tag_text |
| `tips` | `string` | 品牌提示（所有接口统一返回）：极数本源 · https://apizero.cn |


```json
{
  "code": 0,
  "msg": "成功",
  "data": {
    "category": "动漫",
    "category_id": 26,
    "resolution": "1920x1080",
    "count": 1,
    "requested": 1,
    "images": [
      {
        "url": "https://p2.qhimg.com/bdr/__85/t01a8b60c45f9e1100a.jpg",
        "id": 2054077,
        "resolution": "1920x1080",
        "tags": [
          "沃尔沃",
          "城市夜晚",
          "路灯",
          "汽车"
        ],
        "tag_text": "沃尔沃 城市夜晚 路灯 汽车"
      }
    ]
  },
  "tips": "极数本源 · https://apizero.cn"
}
```

### 日历 (`calendar`)

分类 category=日历。文档示例为真实抓取。

- 方法：`GET`
- 路径：`/api/wallpaper`

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `category` | `string` | 否 | 分类中文名，此处固定「日历」 | `日历` |
| `resolution` | `string` | 否 | 分辨率：1920x1080 / 1600x900 / 1440x900 / 1366x768 / 1280x800 / 1280x1024 / 1024x768 | `1920x1080` |
| `count` | `integer` | 否 | 返回数量 1–20，默认 1 | `1` |

**响应字段**

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `category` | `string` | 分类中文名 |
| `category_id` | `integer` | 分类 ID |
| `resolution` | `string` | 实际分辨率 |
| `count` | `integer` | 实际返回张数 |
| `requested` | `integer` | 请求张数 |
| `images` | `array` | 壁纸列表：url / id / resolution / tags / tag_text |
| `images[].url` | `string` | 地址 |
| `images[].id` | `number` | id |
| `images[].resolution` | `string` | 分辨率 |
| `images[].tags` | `array` | tags |
| `images[].tags[]` | `string` | tags 的一项 |
| `images[].tag_text` | `string` | tag_text |
| `tips` | `string` | 品牌提示（所有接口统一返回）：极数本源 · https://apizero.cn |


```json
{
  "code": 0,
  "msg": "成功",
  "data": {
    "category": "日历",
    "category_id": 29,
    "resolution": "1920x1080",
    "count": 1,
    "requested": 1,
    "images": [
      {
        "url": "https://p7.qhimg.com/bdr/__85/t01546eb1987c276b70.jpg",
        "id": 2052724,
        "resolution": "1920x1080",
        "tags": [
          "九月",
          "月历"
        ],
        "tag_text": "九月 月历"
      }
    ]
  },
  "tips": "极数本源 · https://apizero.cn"
}
```

### 爱情 (`love`)

分类 category=爱情。文档示例为真实抓取。

- 方法：`GET`
- 路径：`/api/wallpaper`

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `category` | `string` | 否 | 分类中文名，此处固定「爱情」 | `爱情` |
| `resolution` | `string` | 否 | 分辨率：1920x1080 / 1600x900 / 1440x900 / 1366x768 / 1280x800 / 1280x1024 / 1024x768 | `1920x1080` |
| `count` | `integer` | 否 | 返回数量 1–20，默认 1 | `1` |

**响应字段**

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `category` | `string` | 分类中文名 |
| `category_id` | `integer` | 分类 ID |
| `resolution` | `string` | 实际分辨率 |
| `count` | `integer` | 实际返回张数 |
| `requested` | `integer` | 请求张数 |
| `images` | `array` | 壁纸列表：url / id / resolution / tags / tag_text |
| `images[].url` | `string` | 地址 |
| `images[].id` | `number` | id |
| `images[].resolution` | `string` | 分辨率 |
| `images[].tags` | `array` | tags |
| `images[].tags[]` | `string` | tags 的一项 |
| `images[].tag_text` | `string` | tag_text |
| `tips` | `string` | 品牌提示（所有接口统一返回）：极数本源 · https://apizero.cn |


```json
{
  "code": 0,
  "msg": "成功",
  "data": {
    "category": "爱情",
    "category_id": 30,
    "resolution": "1920x1080",
    "count": 1,
    "requested": 1,
    "images": [
      {
        "url": "https://p18.qhimg.com/bdr/__85/t01b909cb1edc572c54.jpg",
        "id": 323808,
        "resolution": "1920x1080",
        "tags": [
          "爱情",
          "唯美温馨"
        ],
        "tag_text": "爱情 唯美温馨"
      }
    ]
  },
  "tips": "极数本源 · https://apizero.cn"
}
```

### 格言 (`motto`)

分类 category=格言。文档示例为真实抓取。

- 方法：`GET`
- 路径：`/api/wallpaper`

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `category` | `string` | 否 | 分类中文名，此处固定「格言」 | `格言` |
| `resolution` | `string` | 否 | 分辨率：1920x1080 / 1600x900 / 1440x900 / 1366x768 / 1280x800 / 1280x1024 / 1024x768 | `1920x1080` |
| `count` | `integer` | 否 | 返回数量 1–20，默认 1 | `1` |

**响应字段**

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `category` | `string` | 分类中文名 |
| `category_id` | `integer` | 分类 ID |
| `resolution` | `string` | 实际分辨率 |
| `count` | `integer` | 实际返回张数 |
| `requested` | `integer` | 请求张数 |
| `images` | `array` | 壁纸列表：url / id / resolution / tags / tag_text |
| `images[].url` | `string` | 地址 |
| `images[].id` | `number` | id |
| `images[].resolution` | `string` | 分辨率 |
| `images[].tags` | `array` | tags |
| `images[].tags[]` | `string` | tags 的一项 |
| `images[].tag_text` | `string` | tag_text |
| `tips` | `string` | 品牌提示（所有接口统一返回）：极数本源 · https://apizero.cn |


```json
{
  "code": 0,
  "msg": "成功",
  "data": {
    "category": "格言",
    "category_id": 35,
    "resolution": "1920x1080",
    "count": 1,
    "requested": 1,
    "images": [
      {
        "url": "https://p8.qhimg.com/bdr/__85/t019ca1e86cd942277b.jpg",
        "id": 2024094,
        "resolution": "1920x1080",
        "tags": [
          "毕业季",
          "那些年",
          "再见"
        ],
        "tag_text": "毕业季  那些年 再见"
      }
    ]
  },
  "tips": "极数本源 · https://apizero.cn"
}
```


## 5. 请求示例

Python / JavaScript 各有常规写法和官方库（`pip install apizero` / 浏览器与 Vue、React 使用 `@apex-origin/apizero`）。成功后先判断 `code == 0` 再读 `data`。

### cURL

```bash
curl -sS -H "Authorization: Bearer YOUR_API_KEY" "https://v1.apizero.cn/api/wallpaper?category=%E9%A3%8E%E6%99%AF&resolution=1920x1080&count=5"
```

### Python

```python
# 服务端常规写法：标准库 urllib，不用 pip
import json
import ssl
import urllib.error
import urllib.parse
import urllib.request

key = "YOUR_API_KEY"

url = "https://v1.apizero.cn/api/wallpaper"
params = {
    "category": "风景",
    "resolution": "1920x1080",
    "count": 5,
}
query = urllib.parse.urlencode({k: "" if v is None else str(v) for k, v in params.items()})
req = urllib.request.Request(
    url + ("?" + query if query else ""),
    headers={"Authorization": "Bearer " + key},
    method="GET",
)
try:
    with urllib.request.urlopen(
        req, timeout=20, context=ssl.create_default_context()
    ) as resp:
        raw = resp.read().decode("utf-8")
except urllib.error.HTTPError as e:
    raw = e.read().decode("utf-8", "replace")
body = json.loads(raw)
print(json.dumps(body, ensure_ascii=False, indent=2))
if body.get("code") == 0:
    print(body.get("data"))
```

### Python 官方库

```python
# 官方库（服务端）：先执行一次 pip install apizero
import apizero

key = "YOUR_API_KEY"
client = apizero.key(key)
r = client.wallpaper(
    category="风景",
    resolution="1920x1080",
    count=5,
)
if not r.ok:
    raise RuntimeError(r.msg)
print(r.ok, r.code)
print(r.json)
```

### JavaScript

```javascript
// 服务端 Node 18+ fetch
const key = "YOUR_API_KEY";
const url = "https://v1.apizero.cn/api/wallpaper?category=%E9%A3%8E%E6%99%AF&resolution=1920x1080&count=5";
const res = await fetch(url, {
  headers: { Authorization: `Bearer ${key}` },
});
const body = await res.json();
console.log(body);
if (body.code === 0) console.log(body.data);
```

### JavaScript 官方库（Node）

```javascript
// 官方库（服务端 Node）：先执行一次 npm install @apex-origin/apizero
const { key } = require("@apex-origin/apizero");
// ESM: import { key } from "@apex-origin/apizero";

const apiKey = "YOUR_API_KEY";
const client = key(apiKey);
const r = await client.wallpaper({
  "category": "风景",
  "resolution": "1920x1080",
  "count": 5,
});
if (!r.ok) throw new Error(r.msg);
console.log(r.ok, r.code);
console.log(r.json);
```

### Go

```go
// 服务端常规写法：net/http
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	key := "YOUR_API_KEY"

	url := "https://v1.apizero.cn/api/wallpaper?category=%E9%A3%8E%E6%99%AF&resolution=1920x1080&count=5"
	req, err := http.NewRequest(http.MethodGet, url, nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Authorization", "Bearer "+key)
	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	raw, _ := io.ReadAll(resp.Body)
	fmt.Println(string(raw))
}
```

### Java

```java
// 服务端常规写法：Java 11+ HttpClient
// Jackson：com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;

import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;

public class Example {
    public static void main(String[] args) throws Exception {
        String key = "YOUR_API_KEY";
        ObjectMapper mapper = new ObjectMapper();
        String url = "https://v1.apizero.cn/api/wallpaper?category=%E9%A3%8E%E6%99%AF&resolution=1920x1080&count=5";

        HttpClient client = HttpClient.newBuilder()
                .connectTimeout(Duration.ofSeconds(10))
                .build();
        HttpRequest req = HttpRequest.newBuilder()
                .uri(URI.create(url))
                .header("Authorization", "Bearer " + key)
                .timeout(Duration.ofSeconds(20))
                .GET()
                .build();
        HttpResponse<String> resp = client.send(req, HttpResponse.BodyHandlers.ofString());
        JsonNode body = mapper.readTree(resp.body());
        System.out.println(resp.body());
        if (body.path("code").asInt() == 0) {
            System.out.println(body.path("data"));
        }
    }
}
```

### PHP

```php
<?php
// 服务端常规写法：curl，强制 TLS 1.2
$key = "YOUR_API_KEY";

$ch = curl_init("https://v1.apizero.cn/api/wallpaper?category=%E9%A3%8E%E6%99%AF&resolution=1920x1080&count=5");
$opts = [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 20,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer '.$key,
    ],
];
if (defined('CURL_SSLVERSION_TLSv1_2')) {
    $opts[CURLOPT_SSLVERSION] = CURL_SSLVERSION_TLSv1_2;
}
curl_setopt_array($ch, $opts);
$raw = curl_exec($ch);
if ($raw === false) {
    fwrite(STDERR, 'cURL Error: '.curl_error($ch).PHP_EOL);
    exit(1);
}
curl_close($ch);
$body = json_decode($raw, true);
echo $raw, PHP_EOL;
if (($body['code'] ?? null) === 0) {
    echo json_encode($body['data'] ?? null, JSON_UNESCAPED_UNICODE), PHP_EOL;
}
```

### Rust

```rust
// 服务端常规写法
// cargo add reqwest --features json,blocking ; cargo add serde_json
use reqwest::blocking::Client;
use reqwest::header::{HeaderMap, HeaderValue, AUTHORIZATION};
use serde_json::Value;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let key = "YOUR_API_KEY";

    let url = "https://v1.apizero.cn/api/wallpaper?category=%E9%A3%8E%E6%99%AF&resolution=1920x1080&count=5";
    let mut headers = HeaderMap::new();
    headers.insert(
        AUTHORIZATION,
        HeaderValue::from_str(&format!("Bearer {key}"))?,
    );
    let body: Value = Client::new()
        .get(url)
        .headers(headers)
        .timeout(std::time::Duration::from_secs(20))
        .send()?
        .json()?;
    println!("{}", serde_json::to_string_pretty(&body)?);
    Ok(())
}
```

## 8. 错误码

先看业务 code。HTTP 也可能不是 200。

| 业务码 | HTTP | 说明 |
| --- | --- | --- |
| 0 | 200 | 成功 |
| 4000 | 400 | 参数错误 |
| 4011 | 401 | API Key 无效 |
| 4013 | 403 | API Key 已暂停 |
| 4014 | 403 | 当前 IP 不在 Key 白名单 |
| 4015 | 401 | 此接口需要 API Key |
| 4022 | 402 | 余额不足 |
| 4029 | 429 | 调用过快（QPS） |
| 4030 | 429 | 今日免费额度已用完 |
| 4040 | 503 | 接口已下线 |
| 4041 | 404 | 接口不存在 |
| 5000 | 500 | 服务器内部错误 |
| 5020 | 502 | 上游暂时不可用 |
| 5021 | 502 | 上游返回格式异常 |
| 5030 | 502 | 暂无可用节点 |


## 9. 变更日志

- **1.0.0** (2026-05-07): 首次上线，对接 360 壁纸库 16 分类 × 7 分辨率
修复源码 BUG：默认分辨率从「1600×900」改为真正的 1920×1080 原图（用服务 url 字段）
修复源码 BUG：tag 字段从内部标记（_category_xxx_）改为可读 utag 拆分数组
修复源码 BUG：图片 URL 强制改写 http:// → https://，避免 HTTPS 站点混合内容警告
新增 7 种分辨率（含 1920×1080 原图），共 7 档可选
新增 images[].id 字段，便于业务侧做去重 / 收藏
服务响应按 (cid, start_bucket=10) 桶化缓存 1h，节省 80% 服务请求
shuffle 始终在本地做，缓存命中也保证随机性
错误细分：服务 HTTP 错 / errno!=0 / 列表为空 / 分类无该分辨率 → 不同 code
