<!-- 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/hot-search -->

# 全网热搜聚合

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

## 平台约定

- 网关：`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. 基本信息

| 字段 | 值 |
| --- | --- |
| 接口标识 | `hot-search` |
| 接口名称 | 全网热搜聚合 |
| 接口地址 | `https://v1.apizero.cn/api/hot-search` |
| 请求方法 | `POST` |
| 分类 | 内容娱乐 |
| 提供方 | 极数本源 |
| 计费模式 | 完全免费 |
| QPS 限制 | QPS 3 |
| 登录免费额度 | 3,000 次 |
| 匿名每日额度 | 2,000 次 |

### 会员每日额度

| 会员档位 | 每日免费 | QPS |
| --- | --- | --- |
| 黄金会员 | 50,000 次/日 | QPS 10 |
| 钻石会员 | 100,000 次/日 | QPS 30 |
| 企业会员 | 1,000,000 次/日 | QPS 120 |

## 2. 认证

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

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

## 3. 子能力

### 全平台聚合（推荐） (`all`)

platform 默认 all，一次返回微博 / 知乎 / B站 / 贴吧热榜。文档示例为真实抓取（各平台截断为 3 条）。

- 方法：`POST`
- 路径：`/api/hot-search`

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `platform` | `string` | 否 | 平台筛选，此处固定 all（也支持逗号组合） | `all` |
| `limit` | `integer` | 否 | 每个平台返回条数，最大 50，默认 10 | `3` |
| `timeout` | `integer` | 否 | 抓取超时秒数，默认 15 | `15` |

**响应字段**

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `generated_at` | `string` | 数据生成时间（ISO8601） |
| `requested_platforms` | `array` | 本次请求的平台列表 |
| `requested_platforms[]` | `string` | requested_platforms 的一项 |
| `limit_per_platform` | `integer` | 每个平台返回条数 |
| `total_items` | `integer` | 总条数 |
| `failed_platforms` | `object` | 失败平台及原因（成功时为空对象） |
| `failed_platforms[]` | `string` | failed_platforms 的一项 |
| `platforms` | `object` | 各平台数据：name / homepage / status / count / items（rank/title/hot/url 等） |
| `platforms.weibo` | `object` | weibo |
| `platforms.weibo.name` | `string` | 名称 |
| `platforms.weibo.homepage` | `string` | homepage |
| `platforms.weibo.status` | `string` | 状态 |
| `platforms.weibo.count` | `number` | count |
| `platforms.weibo.items` | `array` | items |
| `platforms.zhihu` | `object` | zhihu |
| `platforms.zhihu.name` | `string` | 名称 |
| `platforms.zhihu.homepage` | `string` | homepage |
| `platforms.zhihu.status` | `string` | 状态 |
| `platforms.zhihu.count` | `number` | count |
| `platforms.zhihu.items` | `array` | items |
| `platforms.bilibili` | `object` | bilibili |
| `platforms.bilibili.name` | `string` | 名称 |
| `platforms.bilibili.homepage` | `string` | homepage |
| `platforms.bilibili.status` | `string` | 状态 |
| `platforms.bilibili.count` | `number` | count |
| `platforms.bilibili.items` | `array` | items |
| `platforms.tieba` | `object` | tieba |
| `platforms.tieba.name` | `string` | 名称 |
| `platforms.tieba.homepage` | `string` | homepage |
| `platforms.tieba.status` | `string` | 状态 |
| `platforms.tieba.count` | `number` | count |
| `platforms.tieba.items` | `array` | items |
| `tips` | `string` | 品牌提示（所有接口统一返回）：极数本源 · https://apizero.cn |


```json
{
  "code": "200",
  "desc": "success",
  "data": {
    "generated_at": "2026-07-31T05:13:59+08:00",
    "requested_platforms": [
      "weibo",
      "zhihu",
      "bilibili"
    ],
    "limit_per_platform": 3,
    "total_items": 12,
    "failed_platforms": [],
    "platforms": {
      "weibo": {
        "name": "微博热搜",
        "homepage": "https://s.weibo.com/top/summary?cate=realtimehot",
        "status": "success",
        "count": 3,
        "items": [
          {
            "rank": 1,
            "title": "豆包究竟见过多少人的糗事",
            "hot": 206477,
            "label": "热",
            "url": "https://s.weibo.com/weibo?q=%E8%B1%86%E5%8C%85%E7%A9%B6%E7%AB%9F%E8%A7%81%E8%BF%87%E5%A4%9A%E5%B0%91%E4%BA%BA%E7%9A%84%E7%B3%97%E4%BA%8B",
            "mobile_url": "https://m.weibo.cn/search?containerid=100103type=1&q=%E8%B1%86%E5%8C%85%E7%A9%B6%E7%AB%9F%E8%A7%81%E8%BF%87%E5%A4%9A%E5%B0%91%E4%BA%BA%E7%9A%84%E7%B3%97%E4%BA%8B"
          },
          {
            "rank": 2,
            "title": "凤囚凰 古偶烂片史上难以逾越的高峰",
            "hot": 92897,
            "label": "热",
            "url": "https://s.weibo.com/weibo?q=%E5%87%A4%E5%9B%9A%E5%87%B0%20%E5%8F%A4%E5%81%B6%E7%83%82%E7%89%87%E5%8F%B2%E4%B8%8A%E9%9A%BE%E4%BB%A5%E9%80%BE%E8%B6%8A%E7%9A%84%E9%AB%98%E5%B3%B0",
            "mobile_url": "https://m.weibo.cn/search?containerid=100103type=1&q=%E5%87%A4%E5%9B%9A%E5%87%B0%20%E5%8F%A4%E5%81%B6%E7%83%82%E7%89%87%E5%8F%B2%E4%B8%8A%E9%9A%BE%E4%BB%A5%E9%80%BE%E8%B6%8A%E7%9A%84%E9%AB%98%E5%B3%B0"
          },
          {
            "rank": 3,
            "title": "长江十年行",
            "hot": 76257,
            "label": "",
            "url": "https://s.weibo.com/weibo?q=%E9%95%BF%E6%B1%9F%E5%8D%81%E5%B9%B4%E8%A1%8C",
            "mobile_url": "https://m.weibo.cn/search?containerid=100103type=1&q=%E9%95%BF%E6%B1%9F%E5%8D%81%E5%B9%B4%E8%A1%8C"
          }
        ]
      },
      "zhihu": {
        "name": "知乎热榜",
        "homepage": "https://www.zhihu.com/billboard",
        "status": "success",
        "count": 3,
        "items": [
          {
            "rank": 1,
            "title": "小米澎程技术发布会上发布了什么值得关注的新技术？有哪些亮点？",
            "hot": "2046 万热度",
            "excerpt": "[图片]",
            "answer_count": 469,
            "follower_count": 755,
            "url": "https://www.zhihu.com/question/2066129660551722919"
          },
          {
            "rank": 2,
            "title": "如何评价小米澎程 N90 Max 预售价29.99万元、N70 Max 预售价25.99万元？",
            "hot": "711 万热度",
            "excerpt": "[2 张图片]",
            "answer_count": 165,
            "follower_count": 267,
            "url": "https://www.zhihu.com/question/2066257961672864074"
          },
          {
            "rank": 3,
            "title": "媒体称三大运营商将于 7 月 31 日前全面取消网络代理渠道，释放了哪些行业信号？对消费者有什么影响？",
            "hot": "164 万热度",
            "excerpt": "新快报讯 记者郑志辉报道 距离7月31日不到十天，一场关乎通信行业渠道格局的变革已进入倒计时。根据通信业内人士消息，中国移动、中国电信、中国联通正计划于2026年7月31日前，协同推进全面取消网络代理渠道售卡业务。 所谓“网络代理渠道售卡业务”，是指运营商通过非自有线上触点销售手机SIM卡的合作模式，主要包括第三方销售代理、互联网平台自营店铺以及垂类合作等。 据网上流传的一份中国电信内部文件显示，此次取消范围覆盖全面清理线上触点号卡代理，收回代理新增号卡业务授权。文件同时明确了五个“禁止”：严禁在第三方页面、小程序、直播、短视频、电商店铺、私域分销等场景收集客户信息或直接售卡；严禁搭建多层级网络分销体系或利用裂变推广方式售卡；严禁在各电商平台开设官方旗舰店或通过商品订单捆绑销售号卡；严禁垂类细分市场通过外部渠道销售号卡；严禁线下渠道采用快速寄卡或物流人员上门送卡等线上方式办理号卡业务。 此次统一行动的直接动因，源于监管部门整治通信行业长期存在的“内卷式”竞争的工作部署。据国资委财务监管及运行评价局指导、三大运营商共同磋商的《关于全面取消线上代理渠道实施方案的汇报》显示，2023至2025年全行业累计线上发售大流量卡约1.3亿张，对应渠道费用估算超200亿元。 有专家分析指出，低价大流量卡通过电商平台和直播渠道大规模铺货，本质上是“以价换量”的用户获取策略。用户被低价吸引办理号卡后，附着在号卡上的增值业务订购入口同步被激活，形成“号卡拉新→增值变现→沉默利润”的商业闭环，但代价是行业陷入了“增量不增收”的怪圈，换来的用户ARPU极低、流失率极高、投诉率居高不下。 值得注意的是，此次取消线上代理的范围聚焦号卡业务，暂未覆盖宽带、叠加包、视频彩铃、云盘等其他线上代理业务。但有分析认为，聚焦号卡只是第一步，后续大概率会向其他线上代理业务扩展。运营商的全面渠道费用治理，不会只停留在号卡。新快报-网传三大运营商7月31日前全面取消网络代理渠道",
            "answer_count": 129,
            "follower_count": 562,
            "url": "https://www.zhihu.com/question/2065771256972932835"
          }
        ]
      },
      "bilibili": {
        "name": "B站日榜",
        "homepage": "https://www.bilibili.com/v/popular/rank/all",
        "status": "success",
        "count": 3,
        "items": [
          {
            "rank": 1,
            "title": "【苏新皓｜4K直拍】囍 直拍｜梦寐以求·演唱会",
            "hot": 1004606,
            "author": "JUSTSU_苏新皓",
            "duration": "10:10",
            "danmaku": 469078,
            "cover": "http://i2.hdslb.com/bfs/archive/c9eb3a424e6815a3f0183fcba5705b60d30fc010.jpg",
            "url": "https://www.bilibili.com/video/BV1Dx3i6nEm8"
          },
          {
            "rank": 2,
            "title": "【乾乾特工·剧场版】大制作来啦！！！",
            "hot": 2824448,
            "author": "大乾乾是顾乾宇",
            "duration": "6:30",
            "danmaku": 7471,
            "cover": "http://i0.hdslb.com/bfs/archive/ba48bf52bc0a9ab8658a290887c17fffd536ce12.jpg",
            "url": "https://www.bilibili.com/video/BV1VC3q6ZEtP"
          },
          {
            "rank": 3,
            "title": "和解剖了4000具尸体的法医，一起看了影片中的尸体...",
            "hot": 6450505,
            "author": "影视飓风",
            "duration": "16:09",
            "danmaku": 14246,
            "cover": "http://i2.hdslb.com/bfs/archive/5e936abca5bce191965d8c2a8ca91e428998f922.jpg",
            "url": "https://www.bilibili.com/video/BV1QEgZ6rEGj"
          }
        ]
      },
      "tieba": {
        "name": "百度贴吧热议",
        "homepage": "https://tieba.baidu.com/hottopic/browse/topicList",
        "status": "success",
        "count": 3,
        "items": [
          {
            "rank": 1,
            "title": "压力大!Bin疑似看心理医生",
            "hot": "161.6W实时讨论",
            "excerpt": "网友曝偶遇bin去医院，疑似心理出现问题，并称Bin即将回归要和圣枪哥争首发。",
            "url": "https://tieba.baidu.com/hottopic/browse/hottopic?topic_id=28356645&topic_name=%E5%8E%8B%E5%8A%9B%E5%A4%A7%21Bin%E7%96%91%E4%BC%BC%E7%9C%8B%E5%BF%83%E7%90%86%E5%8C%BB%E7%94%9F"
          },
          {
            "rank": 2,
            "title": "倒反天罡,老板请客员工占主位",
            "hot": "115.5W实时讨论",
            "excerpt": "老板请全公司吃饭，因来迟主位被占，老板沟通调整座位，女员工却理直气壮不肯让座：凭什么是我？",
            "url": "https://tieba.baidu.com/hottopic/browse/hottopic?topic_id=28356657&topic_name=%E5%80%92%E5%8F%8D%E5%A4%A9%E7%BD%A1%2C%E8%80%81%E6%9D%BF%E8%AF%B7%E5%AE%A2%E5%91%98%E5%B7%A5%E5%8D%A0%E4%B8%BB%E4%BD%8D"
          },
          {
            "rank": 3,
            "title": "神人自爆,游戏退款还想白嫖",
            "hot": "95.4W实时讨论",
            "excerpt": "自挂东南枝！白嫖党明目张胆询问已退款的游戏为何不能再玩，引来吧友锐评：这里不是弱智吧！比直接玩学习版的人还逆天。",
            "url": "https://tieba.baidu.com/hottopic/browse/hottopic?topic_id=28356655&topic_name=%E7%A5%9E%E4%BA%BA%E8%87%AA%E7%88%86%2C%E6%B8%B8%E6%88%8F%E9%80%80%E6%AC%BE%E8%BF%98%E6%83%B3%E7%99%BD%E5%AB%96"
          }
        ]
      }
    }
  },
  "tips": "极数本源 · https://apizero.cn"
}
```

### 微博热搜 (`weibo`)

platform=weibo。实时热搜榜。文档示例为真实抓取（截断）。

- 方法：`POST`
- 路径：`/api/hot-search`

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `platform` | `string` | 否 | 平台筛选，此处固定 weibo（也支持逗号组合） | `weibo` |
| `limit` | `integer` | 否 | 每个平台返回条数，最大 50，默认 10 | `3` |
| `timeout` | `integer` | 否 | 抓取超时秒数，默认 15 | `15` |

**响应字段**

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `generated_at` | `string` | 数据生成时间（ISO8601） |
| `requested_platforms` | `array` | 本次请求的平台列表 |
| `requested_platforms[]` | `string` | requested_platforms 的一项 |
| `limit_per_platform` | `integer` | 每个平台返回条数 |
| `total_items` | `integer` | 总条数 |
| `failed_platforms` | `object` | 失败平台及原因（成功时为空对象） |
| `failed_platforms[]` | `string` | failed_platforms 的一项 |
| `platforms` | `object` | 各平台数据：name / homepage / status / count / items（rank/title/hot/url 等） |
| `platforms.weibo` | `object` | weibo |
| `platforms.weibo.name` | `string` | 名称 |
| `platforms.weibo.homepage` | `string` | homepage |
| `platforms.weibo.status` | `string` | 状态 |
| `platforms.weibo.count` | `number` | count |
| `platforms.weibo.items` | `array` | items |
| `tips` | `string` | 品牌提示（所有接口统一返回）：极数本源 · https://apizero.cn |


```json
{
  "code": "200",
  "desc": "success",
  "data": {
    "generated_at": "2026-07-31T05:14:00+08:00",
    "requested_platforms": [
      "weibo"
    ],
    "limit_per_platform": 3,
    "total_items": 3,
    "failed_platforms": [],
    "platforms": {
      "weibo": {
        "name": "微博热搜",
        "homepage": "https://s.weibo.com/top/summary?cate=realtimehot",
        "status": "success",
        "count": 3,
        "items": [
          {
            "rank": 1,
            "title": "豆包究竟见过多少人的糗事",
            "hot": 206477,
            "label": "热",
            "url": "https://s.weibo.com/weibo?q=%E8%B1%86%E5%8C%85%E7%A9%B6%E7%AB%9F%E8%A7%81%E8%BF%87%E5%A4%9A%E5%B0%91%E4%BA%BA%E7%9A%84%E7%B3%97%E4%BA%8B",
            "mobile_url": "https://m.weibo.cn/search?containerid=100103type=1&q=%E8%B1%86%E5%8C%85%E7%A9%B6%E7%AB%9F%E8%A7%81%E8%BF%87%E5%A4%9A%E5%B0%91%E4%BA%BA%E7%9A%84%E7%B3%97%E4%BA%8B"
          },
          {
            "rank": 2,
            "title": "凤囚凰 古偶烂片史上难以逾越的高峰",
            "hot": 92897,
            "label": "热",
            "url": "https://s.weibo.com/weibo?q=%E5%87%A4%E5%9B%9A%E5%87%B0%20%E5%8F%A4%E5%81%B6%E7%83%82%E7%89%87%E5%8F%B2%E4%B8%8A%E9%9A%BE%E4%BB%A5%E9%80%BE%E8%B6%8A%E7%9A%84%E9%AB%98%E5%B3%B0",
            "mobile_url": "https://m.weibo.cn/search?containerid=100103type=1&q=%E5%87%A4%E5%9B%9A%E5%87%B0%20%E5%8F%A4%E5%81%B6%E7%83%82%E7%89%87%E5%8F%B2%E4%B8%8A%E9%9A%BE%E4%BB%A5%E9%80%BE%E8%B6%8A%E7%9A%84%E9%AB%98%E5%B3%B0"
          },
          {
            "rank": 3,
            "title": "长江十年行",
            "hot": 76257,
            "label": "",
            "url": "https://s.weibo.com/weibo?q=%E9%95%BF%E6%B1%9F%E5%8D%81%E5%B9%B4%E8%A1%8C",
            "mobile_url": "https://m.weibo.cn/search?containerid=100103type=1&q=%E9%95%BF%E6%B1%9F%E5%8D%81%E5%B9%B4%E8%A1%8C"
          }
        ]
      }
    }
  },
  "tips": "极数本源 · https://apizero.cn"
}
```

### 知乎热榜 (`zhihu`)

platform=zhihu。知乎热榜问题列表。文档示例为真实抓取（截断）。

- 方法：`POST`
- 路径：`/api/hot-search`

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `platform` | `string` | 否 | 平台筛选，此处固定 zhihu（也支持逗号组合） | `zhihu` |
| `limit` | `integer` | 否 | 每个平台返回条数，最大 50，默认 10 | `3` |
| `timeout` | `integer` | 否 | 抓取超时秒数，默认 15 | `15` |

**响应字段**

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `generated_at` | `string` | 数据生成时间（ISO8601） |
| `requested_platforms` | `array` | 本次请求的平台列表 |
| `requested_platforms[]` | `string` | requested_platforms 的一项 |
| `limit_per_platform` | `integer` | 每个平台返回条数 |
| `total_items` | `integer` | 总条数 |
| `failed_platforms` | `object` | 失败平台及原因（成功时为空对象） |
| `failed_platforms[]` | `string` | failed_platforms 的一项 |
| `platforms` | `object` | 各平台数据：name / homepage / status / count / items（rank/title/hot/url 等） |
| `platforms.zhihu` | `object` | zhihu |
| `platforms.zhihu.name` | `string` | 名称 |
| `platforms.zhihu.homepage` | `string` | homepage |
| `platforms.zhihu.status` | `string` | 状态 |
| `platforms.zhihu.count` | `number` | count |
| `platforms.zhihu.items` | `array` | items |
| `tips` | `string` | 品牌提示（所有接口统一返回）：极数本源 · https://apizero.cn |


```json
{
  "code": "200",
  "desc": "success",
  "data": {
    "generated_at": "2026-07-31T05:14:00+08:00",
    "requested_platforms": [
      "zhihu"
    ],
    "limit_per_platform": 3,
    "total_items": 3,
    "failed_platforms": [],
    "platforms": {
      "zhihu": {
        "name": "知乎热榜",
        "homepage": "https://www.zhihu.com/billboard",
        "status": "success",
        "count": 3,
        "items": [
          {
            "rank": 1,
            "title": "小米澎程技术发布会上发布了什么值得关注的新技术？有哪些亮点？",
            "hot": "2046 万热度",
            "excerpt": "[图片]",
            "answer_count": 469,
            "follower_count": 755,
            "url": "https://www.zhihu.com/question/2066129660551722919"
          },
          {
            "rank": 2,
            "title": "如何评价小米澎程 N90 Max 预售价29.99万元、N70 Max 预售价25.99万元？",
            "hot": "711 万热度",
            "excerpt": "[2 张图片]",
            "answer_count": 165,
            "follower_count": 267,
            "url": "https://www.zhihu.com/question/2066257961672864074"
          },
          {
            "rank": 3,
            "title": "媒体称三大运营商将于 7 月 31 日前全面取消网络代理渠道，释放了哪些行业信号？对消费者有什么影响？",
            "hot": "164 万热度",
            "excerpt": "新快报讯 记者郑志辉报道 距离7月31日不到十天，一场关乎通信行业渠道格局的变革已进入倒计时。根据通信业内人士消息，中国移动、中国电信、中国联通正计划于2026年7月31日前，协同推进全面取消网络代理渠道售卡业务。 所谓“网络代理渠道售卡业务”，是指运营商通过非自有线上触点销售手机SIM卡的合作模式，主要包括第三方销售代理、互联网平台自营店铺以及垂类合作等。 据网上流传的一份中国电信内部文件显示，此次取消范围覆盖全面清理线上触点号卡代理，收回代理新增号卡业务授权。文件同时明确了五个“禁止”：严禁在第三方页面、小程序、直播、短视频、电商店铺、私域分销等场景收集客户信息或直接售卡；严禁搭建多层级网络分销体系或利用裂变推广方式售卡；严禁在各电商平台开设官方旗舰店或通过商品订单捆绑销售号卡；严禁垂类细分市场通过外部渠道销售号卡；严禁线下渠道采用快速寄卡或物流人员上门送卡等线上方式办理号卡业务。 此次统一行动的直接动因，源于监管部门整治通信行业长期存在的“内卷式”竞争的工作部署。据国资委财务监管及运行评价局指导、三大运营商共同磋商的《关于全面取消线上代理渠道实施方案的汇报》显示，2023至2025年全行业累计线上发售大流量卡约1.3亿张，对应渠道费用估算超200亿元。 有专家分析指出，低价大流量卡通过电商平台和直播渠道大规模铺货，本质上是“以价换量”的用户获取策略。用户被低价吸引办理号卡后，附着在号卡上的增值业务订购入口同步被激活，形成“号卡拉新→增值变现→沉默利润”的商业闭环，但代价是行业陷入了“增量不增收”的怪圈，换来的用户ARPU极低、流失率极高、投诉率居高不下。 值得注意的是，此次取消线上代理的范围聚焦号卡业务，暂未覆盖宽带、叠加包、视频彩铃、云盘等其他线上代理业务。但有分析认为，聚焦号卡只是第一步，后续大概率会向其他线上代理业务扩展。运营商的全面渠道费用治理，不会只停留在号卡。新快报-网传三大运营商7月31日前全面取消网络代理渠道",
            "answer_count": 129,
            "follower_count": 562,
            "url": "https://www.zhihu.com/question/2065771256972932835"
          }
        ]
      }
    }
  },
  "tips": "极数本源 · https://apizero.cn"
}
```

### B站日榜 (`bilibili`)

platform=bilibili。B站全站日榜。文档示例为真实抓取（截断）。

- 方法：`POST`
- 路径：`/api/hot-search`

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `platform` | `string` | 否 | 平台筛选，此处固定 bilibili（也支持逗号组合） | `bilibili` |
| `limit` | `integer` | 否 | 每个平台返回条数，最大 50，默认 10 | `3` |
| `timeout` | `integer` | 否 | 抓取超时秒数，默认 15 | `15` |

**响应字段**

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `generated_at` | `string` | 数据生成时间（ISO8601） |
| `requested_platforms` | `array` | 本次请求的平台列表 |
| `requested_platforms[]` | `string` | requested_platforms 的一项 |
| `limit_per_platform` | `integer` | 每个平台返回条数 |
| `total_items` | `integer` | 总条数 |
| `failed_platforms` | `object` | 失败平台及原因（成功时为空对象） |
| `failed_platforms[]` | `string` | failed_platforms 的一项 |
| `platforms` | `object` | 各平台数据：name / homepage / status / count / items（rank/title/hot/url 等） |
| `platforms.bilibili` | `object` | bilibili |
| `platforms.bilibili.name` | `string` | 名称 |
| `platforms.bilibili.homepage` | `string` | homepage |
| `platforms.bilibili.status` | `string` | 状态 |
| `platforms.bilibili.count` | `number` | count |
| `platforms.bilibili.items` | `array` | items |
| `tips` | `string` | 品牌提示（所有接口统一返回）：极数本源 · https://apizero.cn |


```json
{
  "code": "200",
  "desc": "success",
  "data": {
    "generated_at": "2026-07-31T05:14:01+08:00",
    "requested_platforms": [
      "bilibili"
    ],
    "limit_per_platform": 3,
    "total_items": 3,
    "failed_platforms": [],
    "platforms": {
      "bilibili": {
        "name": "B站日榜",
        "homepage": "https://www.bilibili.com/v/popular/rank/all",
        "status": "success",
        "count": 3,
        "items": [
          {
            "rank": 1,
            "title": "【苏新皓｜4K直拍】囍 直拍｜梦寐以求·演唱会",
            "hot": 1004606,
            "author": "JUSTSU_苏新皓",
            "duration": "10:10",
            "danmaku": 469078,
            "cover": "http://i2.hdslb.com/bfs/archive/c9eb3a424e6815a3f0183fcba5705b60d30fc010.jpg",
            "url": "https://www.bilibili.com/video/BV1Dx3i6nEm8"
          },
          {
            "rank": 2,
            "title": "【乾乾特工·剧场版】大制作来啦！！！",
            "hot": 2824448,
            "author": "大乾乾是顾乾宇",
            "duration": "6:30",
            "danmaku": 7471,
            "cover": "http://i0.hdslb.com/bfs/archive/ba48bf52bc0a9ab8658a290887c17fffd536ce12.jpg",
            "url": "https://www.bilibili.com/video/BV1VC3q6ZEtP"
          },
          {
            "rank": 3,
            "title": "和解剖了4000具尸体的法医，一起看了影片中的尸体...",
            "hot": 6450505,
            "author": "影视飓风",
            "duration": "16:09",
            "danmaku": 14246,
            "cover": "http://i2.hdslb.com/bfs/archive/5e936abca5bce191965d8c2a8ca91e428998f922.jpg",
            "url": "https://www.bilibili.com/video/BV1QEgZ6rEGj"
          }
        ]
      }
    }
  },
  "tips": "极数本源 · https://apizero.cn"
}
```

### 贴吧热议 (`tieba`)

platform=tieba。百度贴吧热议话题。文档示例为真实抓取（截断）。

- 方法：`POST`
- 路径：`/api/hot-search`

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `platform` | `string` | 否 | 平台筛选，此处固定 tieba（也支持逗号组合） | `tieba` |
| `limit` | `integer` | 否 | 每个平台返回条数，最大 50，默认 10 | `3` |
| `timeout` | `integer` | 否 | 抓取超时秒数，默认 15 | `15` |

**响应字段**

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `generated_at` | `string` | 数据生成时间（ISO8601） |
| `requested_platforms` | `array` | 本次请求的平台列表 |
| `requested_platforms[]` | `string` | requested_platforms 的一项 |
| `limit_per_platform` | `integer` | 每个平台返回条数 |
| `total_items` | `integer` | 总条数 |
| `failed_platforms` | `object` | 失败平台及原因（成功时为空对象） |
| `failed_platforms[]` | `string` | failed_platforms 的一项 |
| `platforms` | `object` | 各平台数据：name / homepage / status / count / items（rank/title/hot/url 等） |
| `platforms.tieba` | `object` | tieba |
| `platforms.tieba.name` | `string` | 名称 |
| `platforms.tieba.homepage` | `string` | homepage |
| `platforms.tieba.status` | `string` | 状态 |
| `platforms.tieba.count` | `number` | count |
| `platforms.tieba.items` | `array` | items |
| `tips` | `string` | 品牌提示（所有接口统一返回）：极数本源 · https://apizero.cn |


```json
{
  "code": "200",
  "desc": "success",
  "data": {
    "generated_at": "2026-07-31T05:14:02+08:00",
    "requested_platforms": [
      "tieba"
    ],
    "limit_per_platform": 3,
    "total_items": 3,
    "failed_platforms": [],
    "platforms": {
      "tieba": {
        "name": "百度贴吧热议",
        "homepage": "https://tieba.baidu.com/hottopic/browse/topicList",
        "status": "success",
        "count": 3,
        "items": [
          {
            "rank": 1,
            "title": "压力大!Bin疑似看心理医生",
            "hot": "161.6W实时讨论",
            "excerpt": "网友曝偶遇bin去医院，疑似心理出现问题，并称Bin即将回归要和圣枪哥争首发。",
            "url": "https://tieba.baidu.com/hottopic/browse/hottopic?topic_id=28356645&topic_name=%E5%8E%8B%E5%8A%9B%E5%A4%A7%21Bin%E7%96%91%E4%BC%BC%E7%9C%8B%E5%BF%83%E7%90%86%E5%8C%BB%E7%94%9F"
          },
          {
            "rank": 2,
            "title": "倒反天罡,老板请客员工占主位",
            "hot": "115.5W实时讨论",
            "excerpt": "老板请全公司吃饭，因来迟主位被占，老板沟通调整座位，女员工却理直气壮不肯让座：凭什么是我？",
            "url": "https://tieba.baidu.com/hottopic/browse/hottopic?topic_id=28356657&topic_name=%E5%80%92%E5%8F%8D%E5%A4%A9%E7%BD%A1%2C%E8%80%81%E6%9D%BF%E8%AF%B7%E5%AE%A2%E5%91%98%E5%B7%A5%E5%8D%A0%E4%B8%BB%E4%BD%8D"
          },
          {
            "rank": 3,
            "title": "神人自爆,游戏退款还想白嫖",
            "hot": "95.4W实时讨论",
            "excerpt": "自挂东南枝！白嫖党明目张胆询问已退款的游戏为何不能再玩，引来吧友锐评：这里不是弱智吧！比直接玩学习版的人还逆天。",
            "url": "https://tieba.baidu.com/hottopic/browse/hottopic?topic_id=28356655&topic_name=%E7%A5%9E%E4%BA%BA%E8%87%AA%E7%88%86%2C%E6%B8%B8%E6%88%8F%E9%80%80%E6%AC%BE%E8%BF%98%E6%83%B3%E7%99%BD%E5%AB%96"
          }
        ]
      }
    }
  },
  "tips": "极数本源 · https://apizero.cn"
}
```


## 5. 请求示例

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

### cURL

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

### Python

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

key = "YOUR_API_KEY"

url = "https://v1.apizero.cn/api/hot-search"
payload = {
    "platform": "all",
    "limit": 10,
    "timeout": 15,
}
req = urllib.request.Request(
    url,
    data=json.dumps(payload, ensure_ascii=False).encode("utf-8"),
    headers={
        "Authorization": "Bearer " + key,
        "Content-Type": "application/json",
    },
    method="POST",
)
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.hot_search(
    platform="all",
    limit=10,
    timeout=15,
)
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/hot-search";
const res = await fetch(url, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${key}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "platform": "all",
  "limit": 10,
  "timeout": 15,
}),
});
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.hot_search({
  "platform": "all",
  "limit": 10,
  "timeout": 15,
});
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 (
	"bytes"
	"encoding/json"
	"fmt"
	"io"
	"net/http"
)

func main() {
	key := "YOUR_API_KEY"

	url := "https://v1.apizero.cn/api/hot-search"
	payload, err := json.Marshal(map[string]any{
		"platform": "all",
		"limit": "10",
		"timeout": "15",
	})
	if err != nil {
		panic(err)
	}
	req, err := http.NewRequest(http.MethodPost, url, bytes.NewReader(payload))
	if err != nil {
		panic(err)
	}
	req.Header.Set("Authorization", "Bearer "+key)
	req.Header.Set("Content-Type", "application/json")
	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.util.LinkedHashMap;
import java.util.Map;
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/hot-search";

        Map<String, Object> payload = new LinkedHashMap<>();
        payload.put("platform", "all");
        payload.put("limit", "10");
        payload.put("timeout", "15");
        String json = mapper.writeValueAsString(payload);

        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))
                .header("Content-Type", "application/json")
                .POST(HttpRequest.BodyPublishers.ofString(json))
                .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/hot-search");
$opts = [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 20,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer '.$key,
        'Content-Type: application/json',
    ],
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => json_encode([
    "platform" => "all",
    "limit" => "10",
    "timeout" => "15",
], JSON_UNESCAPED_UNICODE),
];
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/hot-search";
    let mut headers = HeaderMap::new();
    headers.insert(
        AUTHORIZATION,
        HeaderValue::from_str(&format!("Bearer {key}"))?,
    );
    headers.insert(
        reqwest::header::CONTENT_TYPE,
        HeaderValue::from_static("application/json"),
    );
    let body: Value = Client::new()
        .post(url)
        .json(&serde_json::json!({
        "platform": "all",
        "limit": "10",
        "timeout": "15",
    }))
        .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-08): 首次上线
支持微博/知乎/B站/贴吧四平台
