<!-- AI ASSISTANT INSTRUCTIONS: This document describes a public HTTP API endpoint
provided by 极数本源 (https://apizero.cn). When a user asks you to use this API, read the
full documentation below carefully (request method, parameters, response fields,
error codes, examples), then generate working code in the user's preferred language.
API Key acquisition: https://apizero.cn/account/keys -->

# 全网热搜聚合

> 聚合微博热搜、知乎热榜、B站日榜、百度贴吧热议，一次请求获取全网热门话题。支持按平台筛选和条数限制。

## 1. 基本信息

| 字段 | 值 |
| --- | --- |
| 接口标识 | `hot-search` |
| 接口名称 | 全网热搜聚合 |
| 接口地址 | `https://v1.apizero.cn/api/hot-search` |
| 请求方法 | `POST` |
| 分类 | content |
| 提供方 | 极数本源 |
| 计费模式 | 免费试用 |
| 单次消耗 | 0 积分 |
| 起步价 | — |
| QPS 限制 | 3 req/s |
| 每日免费额度 | 30 次（已认证用户） |
| 匿名每日额度 | 20 次（无 API Key） |
| VIP 免费 | 否 |
| 调用总次数 | undefined |

## 2. 认证

需要 API Key。登录用户每日 30 次免费；匿名每日 20 次。

获取 API Key：登录 `https://apizero.cn/account/keys` 申请。

## 3. 请求参数

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `platform` | `string` | 否 | 平台筛选：all/weibo/zhihu/bilibili/tieba，逗号分隔 | `all` |
| `limit` | `int` | 否 | 每个平台返回条数，最大50 | `10` |
| `timeout` | `int` | 否 | 请求超时秒数 | `15` |

## 4. 请求头

| Header | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `Authorization` | `string` | 是 | — | — |

## 5. 请求示例 (cURL)

```bash
curl -X POST "https://v1.apizero.cn/api/hot-search" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "platform": "all",
  "limit": "10",
  "timeout": "15"
}'
```

## 6. 响应字段

| 字段 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- |
| `generated_at` | `string` | 数据生成时间（ISO8601） | — |
| `requested_platforms` | `array` | 本次请求的平台列表 | — |
| `limit_per_platform` | `int` | 每个平台返回条数 | — |
| `total_items` | `int` | 总条数 | — |
| `failed_platforms` | `object` | 失败平台及原因 | — |
| `platforms` | `object` | 各平台数据（name/homepage/status/count/items） | — |

## 7. 响应示例

```json
{
    "code": 0,
    "msg": "成功",
    "data": {
        "generated_at": "2026-05-08T13:00:00+08:00",
        "requested_platforms": [
            "weibo",
            "zhihu",
            "bilibili",
            "tieba"
        ],
        "limit_per_platform": 10,
        "total_items": 40,
        "failed_platforms": {},
        "platforms": {
            "weibo": {
                "name": "微博热搜",
                "status": "success",
                "count": 10,
                "items": [
                    {
                        "rank": 1,
                        "title": "热搜标题",
                        "hot": "5234567"
                    }
                ]
            }
        }
    },
    "request_id": "req_abc123"
}
```

## 8. 错误码

| code | status | 说明 |
| --- | --- | --- |
| `4000` | `—` | 无效的 platform 值 |
| `5020` | `—` | 所有平台抓取失败 |

## 9. 变更日志

- **1.0.0** (2026-05-08)
  - 首次上线
  - 支持微博/知乎/B站/贴吧四平台

---

**极数本源** · 全部 API: `https://apizero.cn/aidocs` · 人类版本：`https://apizero.cn/marketplace/hot-search`

Source: `https://apizero.cn/aidocs/hot-search/raw.md`
Last updated: 2026-05-08T14:14:53+08:00
