add & fix hot.md (#501)

更改获取热搜列表(web端)返回数据和字段说明
新增 获取热搜列表(手机端)返回数据和字段说明
This commit is contained in:
I Am I
2022-09-28 10:58:57 +08:00
committed by GitHub
parent 97638df4a7
commit a2cd2a61a1
+456 -252
View File
@@ -2,12 +2,13 @@
- [获取默认搜索内容(web端)](#获取默认搜索内容web端) - [获取默认搜索内容(web端)](#获取默认搜索内容web端)
- [获取热搜列表(web端)](#获取热搜列表web端) - [获取热搜列表(web端)](#获取热搜列表web端)
- [获取热搜列表(手机端)](#获取热搜列表手机端)
--- ---
## 获取默认搜索内容(web端) ## 获取默认搜索内容(web端)
> http://api.bilibili.com/x/web-interface/search/default > https://api.bilibili.com/x/web-interface/search/default
*请求方式:GET* *请求方式:GET*
@@ -40,7 +41,7 @@
**示例:** **示例:**
```shell ```shell
curl 'http://api.bilibili.com/x/web-interface/search/default' curl 'https://api.bilibili.com/x/web-interface/search/default'
``` ```
<details> <details>
@@ -68,11 +69,11 @@ curl 'http://api.bilibili.com/x/web-interface/search/default'
## 获取热搜列表(web端) ## 获取热搜列表(web端)
> http://s.search.bilibili.com/main/hotword > https://s.search.bilibili.com/main/hotword
*请求方式:GET* *请求方式:GET*
榜单每隔固定时间统计一次,请求后返回搜索前20的关键词 榜单每隔固定时间统计一次,请求后返回搜索前10的关键词
带有转义 带有转义
@@ -96,26 +97,31 @@ curl 'http://api.bilibili.com/x/web-interface/search/default'
| ---- | ---- | --------------- | ------------ | | ---- | ---- | --------------- | ------------ |
| 0 | obj | 榜单第1名 | | | 0 | obj | 榜单第1名 | |
| n | obj | 榜单第(n+1)名 | 按照名次顺序 | | n | obj | 榜单第(n+1)名 | 按照名次顺序 |
| 19 | obj | 榜单第20名 | 最后一项 | | 10 | obj | 榜单第10名 | 最后一项 |
`list`数组中的对象: `list`数组中的对象:
| 字段 | 类型 | 内容 | 备注 | | 字段 | 类型 | 内容 | 备注 |
| ---------- | ---- | -------- | ----------------------------- | | ---------- | ---- | -------- | ------- |
| status | str | 空 | | | status | str | 空 | |
| keyword | str | 关键词 | | | hot_id | num | 热词id | 大概是吧? |
| goto_type | num | 0 | | | keyword | str | 关键词 | |
| pos | num | 名次 | 1-20 | | resource_id| num | 资源id | |
| word_type | num | 条目属性 | 1:正常<br />4:新<br />5:热 | | goto_type | num | 0 | |
| id | num | 名次 | 1-20 | | res | array| null | |
| goto_value | str | 空 | | | show_name | str | 完整关键词| |
| name_type | str | 空 | | | pos | num | 名次 | 1-10 |
| icon | str | 图标url | | | word_type | num | 条目属性 | 均返回8 |
| id | num | 名次 | 1-10 |
| goto_value | str | 空 | |
| live_id | array| null | |
| name_type | str | 空 | |
| icon | str | 图标url | |
**示例:** **示例:**
```shell ```shell
curl 'http://s.search.bilibili.com/main/hotword' curl 'https://s.search.bilibili.com/main/hotword'
``` ```
<details> <details>
@@ -123,242 +129,440 @@ curl 'http://s.search.bilibili.com/main/hotword'
```json ```json
{ {
"exp_str": "8104#8200#8300#8401#8500#5502#6699", "exp_str": "8104#8200#8300#8401#8500#5502#6699",
"code": 0, "code": 0,
"cost": { "cost": {
"reas_request": "0.001895", "reas_request": "0.001895",
"params_check": "0.000127", "params_check": "0.000127",
"reas_response_format": "0.000098", "reas_response_format": "0.000098",
"deserialize_response": "0.000080", "deserialize_response": "0.000080",
"reas_request_format": "0.000076", "reas_request_format": "0.000076",
"total": "0.002479", "total": "0.002479",
"main_handler": "0.002252" "main_handler": "0.002252"
}, },
"seid": "9318821020548476185", "seid": "9318821020548476185",
"timestamp": 1596034742, "timestamp": 1596034742,
"message": "success", "message": "success",
"list": [{
"status": "",
"hot_id": 11003,
"keyword": "流浪地球2刘德华",
"resource_id": 0,
"goto_type": 0,
"res": [
],
"show_name": "流浪地球2刘德华造型",
"pos": 1,
"word_type": 8,
"id": 1,
"goto_value": "",
"live_id": [
],
"name_type": "",
"icon": "http://i0.hdslb.com/bfs/feed-admin/e9e7a2d8497d4063421b685e72680bf1cfb99a0d.png"
},
{
"status": "",
"hot_id": 11012,
"keyword": "QQ飞车手游飞跃黄河",
"resource_id": 0,
"goto_type": 0,
"res": [
],
"show_name": "QQ飞车手游飞跃黄河",
"pos": 2,
"word_type": 8,
"id": 2,
"goto_value": "",
"live_id": [
],
"name_type": "",
"icon": "http://i0.hdslb.com/bfs/feed-admin/4d579fb61f9655316582db193118bba3a721eec0.png"
},
{
"status": "",
"hot_id": 10996,
"keyword": "西工大遭网络攻击最新调查",
"resource_id": 0,
"goto_type": 0,
"res": [
],
"show_name": "西工大遭网络攻击最新调查",
"pos": 3,
"word_type": 8,
"id": 3,
"goto_value": "",
"live_id": [
],
"name_type": "",
"icon": "http://i0.hdslb.com/bfs/feed-admin/e9e7a2d8497d4063421b685e72680bf1cfb99a0d.png"
},
{
"status": "",
"hot_id": 11004,
"keyword": "EDG 起诉",
"resource_id": 0,
"goto_type": 0,
"res": [
],
"show_name": "EDGJieJie已起诉多家企业",
"pos": 4,
"word_type": 8,
"id": 4,
"goto_value": "",
"live_id": [
],
"name_type": "",
"icon": "http://i0.hdslb.com/bfs/feed-admin/4d579fb61f9655316582db193118bba3a721eec0.png"
},
{
"status": "",
"hot_id": 10992,
"keyword": "隐入尘烟",
"resource_id": 0,
"goto_type": 0,
"res": [
],
"show_name": "隐入尘烟全平台下架",
"pos": 5,
"word_type": 8,
"id": 5,
"goto_value": "",
"live_id": [
],
"name_type": "",
"icon": "http://i0.hdslb.com/bfs/feed-admin/e9e7a2d8497d4063421b685e72680bf1cfb99a0d.png"
},
{
"status": "",
"hot_id": 10987,
"keyword": "原神半年内最良心封神池",
"resource_id": 0,
"goto_type": 0,
"res": [
],
"show_name": "原神半年内最良心封神池",
"pos": 6,
"word_type": 8,
"id": 6,
"goto_value": "",
"live_id": [
],
"name_type": "",
"icon": ""
},
{
"status": "",
"hot_id": 10988,
"keyword": "高校回应设国内首个元宇宙院系",
"resource_id": 0,
"goto_type": 0,
"res": [
],
"show_name": "高校回应设国内首个元宇宙院系",
"pos": 7,
"word_type": 8,
"id": 7,
"goto_value": "",
"live_id": [
],
"name_type": "",
"icon": ""
},
{
"status": "",
"hot_id": 10994,
"keyword": "美宇宙飞船成功撞击小行星",
"resource_id": 0,
"goto_type": 0,
"res": [
],
"show_name": "美宇宙飞船成功撞击小行星",
"pos": 8,
"word_type": 8,
"id": 8,
"goto_value": "",
"live_id": [
],
"name_type": "",
"icon": ""
},
{
"status": "",
"hot_id": 10991,
"keyword": "你薅的羊毛可能已违法",
"resource_id": 0,
"goto_type": 0,
"res": [
],
"show_name": "你薅的羊毛可能已违法",
"pos": 9,
"word_type": 8,
"id": 9,
"goto_value": "",
"live_id": [
],
"name_type": "",
"icon": ""
},
{
"status": "",
"hot_id": 11013,
"keyword": "辛普森一家",
"resource_id": 0,
"goto_type": 0,
"res": [
],
"show_name": "辛普森一家",
"pos": 10,
"word_type": 8,
"id": 10,
"goto_value": "",
"live_id": [
],
"name_type": "",
"icon": "http://i0.hdslb.com/bfs/feed-admin/4d579fb61f9655316582db193118bba3a721eec0.png"
}
]
}
```
</details>
## 获取热搜列表(手机端)
> https://app.bilibili.com/x/v2/search/trending/ranking
*请求方式:GET*
榜单每隔固定时间统计一次,请求后返回搜索前20的关键词
带有转义
**json回复:**
根对象:
| 字段 | 类型 | 内容 | 备注 |
| --------- | ----- | ------------ | ------------- |
| code | num | 返回值 | 0:成功 |
| message | str | 错误信息 | 默认为0 |
| ttl | num | 返回值 | 默认为1 |
`data`对象:
| 字段 | 类型 | 内容 | 备注 |
| ---- | ---- | --------------- | ------------ |
| trackid | num | | 不知用途 |
| list | array | 热搜列表 | |
`list`数组:
| 项 | 类型 | 内容 | 备注 |
| ---- | ---- | --------------- | ------------ |
| 0 | obj | 榜单第1名 | |
| n | obj | 榜单第(n+1)名 | 按照名次顺序 |
| 20 | obj | 榜单第20名 | 最后一项 |
`list`数组中的对象:
| 字段 | 类型 | 内容 | 备注 |
| ---------- | ---- | -------- | ------- |
| position | num | 名次 | 1-20 |
| keyword | str | 关键词 | |
| show_name | str | 完整关键词| |
| word_type | num | 条目属性 | 均返回8 |
| icon | str | 图标url | |
| hot_id | num | 热词id | 大概是吧? |
**示例:**
```shell
curl 'https://app.bilibili.com/x/v2/search/trending/ranking'
```
<details>
<summary>查看响应示例:</summary>
```json
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"trackid": "12666380188451258075",
"list": [ "list": [
{ {
"status": "", "position": 1,
"keyword": "特朗普", "keyword": "流浪地球2刘德华",
"goto_type": 0, "show_name": "流浪地球2刘德华造型",
"pos": 1, "word_type": 8,
"word_type": 1, "icon": "http://i0.hdslb.com/bfs/feed-admin/4d579fb61f9655316582db193118bba3a721eec0.png",
"id": 1, "hot_id": 11003
"goto_value": "", },
"name_type": "", {
"icon": "" "position": 2,
}, "keyword": "QQ飞车手游飞跃黄河",
{ "show_name": "QQ飞车手游飞跃黄河",
"status": "", "word_type": 8,
"keyword": "武汉协和医院", "icon": "http://i0.hdslb.com/bfs/feed-admin/4d579fb61f9655316582db193118bba3a721eec0.png",
"goto_type": 0, "hot_id": 11012
"pos": 2, },
"word_type": 5, {
"id": 2, "position": 3,
"goto_value": "", "keyword": "西工大遭网络攻击最新调查",
"name_type": "", "show_name": "西工大遭网络攻击最新调查",
"icon": "http://i0.hdslb.com/bfs/feed-admin/e9e7a2d8497d4063421b685e72680bf1cfb99a0d.png" "word_type": 8,
}, "icon": "http://i0.hdslb.com/bfs/feed-admin/e9e7a2d8497d4063421b685e72680bf1cfb99a0d.png",
{ "hot_id": 10996
"status": "", },
"keyword": "元龙", {
"goto_type": 0, "position": 4,
"pos": 3, "keyword": "EDG 起诉",
"word_type": 5, "show_name": "EDGJieJie已起诉多家企业",
"id": 3, "word_type": 8,
"goto_value": "", "icon": "http://i0.hdslb.com/bfs/feed-admin/4d579fb61f9655316582db193118bba3a721eec0.png",
"name_type": "", "hot_id": 11004
"icon": "http://i0.hdslb.com/bfs/feed-admin/e9e7a2d8497d4063421b685e72680bf1cfb99a0d.png" },
}, {
{ "position": 5,
"status": "", "keyword": "隐入尘烟",
"keyword": "周深", "show_name": "隐入尘烟全平台下架",
"goto_type": 0, "word_type": 8,
"pos": 4, "icon": "http://i0.hdslb.com/bfs/feed-admin/e9e7a2d8497d4063421b685e72680bf1cfb99a0d.png",
"word_type": 4, "hot_id": 10992
"id": 4, },
"goto_value": "", {
"name_type": "", "position": 6,
"icon": "http://i0.hdslb.com/bfs/feed-admin/4d579fb61f9655316582db193118bba3a721eec0.png" "keyword": "原神半年内最良心封神池",
}, "show_name": "原神半年内最良心封神池",
{ "word_type": 8,
"status": "", "hot_id": 10987
"keyword": "徐大sao", },
"goto_type": 0, {
"pos": 5, "position": 7,
"word_type": 4, "keyword": "高校回应设国内首个元宇宙院系",
"id": 5, "show_name": "高校回应设国内首个元宇宙院系",
"goto_value": "", "word_type": 8,
"name_type": "", "hot_id": 10988
"icon": "http://i0.hdslb.com/bfs/feed-admin/4d579fb61f9655316582db193118bba3a721eec0.png" },
}, {
{ "position": 8,
"status": "", "keyword": "美宇宙飞船成功撞击小行星",
"keyword": "FPX", "show_name": "美宇宙飞船成功撞击小行星",
"goto_type": 0, "word_type": 8,
"pos": 6, "hot_id": 10994
"word_type": 4, },
"id": 6, {
"goto_value": "", "position": 9,
"name_type": "", "keyword": "你薅的羊毛可能已违法",
"icon": "http://i0.hdslb.com/bfs/feed-admin/4d579fb61f9655316582db193118bba3a721eec0.png" "show_name": "你薅的羊毛可能已违法",
}, "word_type": 8,
{ "hot_id": 10991
"status": "", },
"keyword": "BLACKPINK", {
"goto_type": 0, "position": 10,
"pos": 7, "keyword": "火锅店剩锅底重新给顾客",
"word_type": 1, "show_name": "火锅店剩锅底重新给顾客",
"id": 7, "word_type": 1,
"goto_value": "", "hot_id": 11014
"name_type": "", },
"icon": "" {
}, "position": 11,
{ "keyword": "海月",
"status": "", "show_name": "王者海月逆天",
"keyword": "沈力", "word_type": 8,
"goto_type": 0, "hot_id": 10999
"pos": 8, },
"word_type": 1, {
"id": 8, "position": 12,
"goto_value": "", "keyword": "周琦重返NBL",
"name_type": "", "show_name": "徐静雨评周琦重返NBL",
"icon": "" "word_type": 8,
}, "icon": "http://i0.hdslb.com/bfs/feed-admin/4d579fb61f9655316582db193118bba3a721eec0.png",
{ "hot_id": 11007
"status": "", },
"keyword": "老番茄", {
"goto_type": 0, "position": 13,
"pos": 9, "keyword": "小超梦剑魔连招",
"word_type": 1, "show_name": "小超梦剑魔QA连招",
"id": 9, "word_type": 8,
"goto_value": "", "hot_id": 11006
"name_type": "", },
"icon": "" {
}, "position": 14,
{ "keyword": "东八区的先生们已下架",
"status": "", "show_name": "东八区的先生们已下架",
"keyword": "JDG", "word_type": 8,
"goto_type": 0, "hot_id": 10955
"pos": 10, },
"word_type": 4, {
"id": 10, "position": 15,
"goto_value": "", "keyword": "三国杀新武将全惠解",
"name_type": "", "show_name": "三国杀新武将全惠解",
"icon": "http://i0.hdslb.com/bfs/feed-admin/4d579fb61f9655316582db193118bba3a721eec0.png" "word_type": 8,
}, "icon": "http://i0.hdslb.com/bfs/feed-admin/4d579fb61f9655316582db193118bba3a721eec0.png",
{ "hot_id": 11009
"status": "", },
"keyword": "荒废工厂", {
"goto_type": 0, "position": 16,
"pos": 11, "keyword": "ALGS训练赛",
"word_type": 1, "show_name": "ALGS训练赛",
"id": 11, "word_type": 8,
"goto_value": "", "icon": "http://i0.hdslb.com/bfs/feed-admin/4d579fb61f9655316582db193118bba3a721eec0.png",
"name_type": "", "hot_id": 11011
"icon": "" },
}, {
{ "position": 17,
"status": "", "keyword": "王者青白蛇皮肤优化",
"keyword": "活着", "show_name": "王者青白蛇皮肤优化",
"goto_type": 0, "word_type": 8,
"pos": 12, "hot_id": 11000
"word_type": 1, },
"id": 12, {
"goto_value": "", "position": 18,
"name_type": "", "keyword": "普京授予斯诺登俄公民身份",
"icon": "" "show_name": "普京授予斯诺登俄公民身份",
}, "word_type": 1,
{ "hot_id": 10977
"status": "", },
"keyword": "明日方舟", {
"goto_type": 0, "position": 19,
"pos": 13, "keyword": "赛诺角色演示",
"word_type": 1, "show_name": "原神赛诺角色演示",
"id": 13, "word_type": 8,
"goto_value": "", "hot_id": 10998
"name_type": "", },
"icon": "" {
}, "position": 20,
{ "keyword": "COD19被玩坏了",
"status": "", "show_name": "COD19被玩坏了",
"keyword": "创造营2020", "word_type": 8,
"goto_type": 0, "hot_id": 10971
"pos": 14, }
"word_type": 1, ],
"id": 14, "exp_str": "8000#5509#6605#7708"
"goto_value": "", }
"name_type": "",
"icon": ""
},
{
"status": "",
"keyword": "黑人抬棺",
"goto_type": 0,
"pos": 15,
"word_type": 1,
"id": 15,
"goto_value": "",
"name_type": "",
"icon": ""
},
{
"status": "",
"keyword": "名侦探柯南",
"goto_type": 0,
"pos": 16,
"word_type": 1,
"id": 16,
"goto_value": "",
"name_type": "",
"icon": ""
},
{
"status": "",
"keyword": "fpx",
"goto_type": 0,
"pos": 17,
"word_type": 1,
"id": 17,
"goto_value": "",
"name_type": "",
"icon": ""
},
{
"status": "",
"keyword": "csgo",
"goto_type": 0,
"pos": 18,
"word_type": 1,
"id": 18,
"goto_value": "",
"name_type": "",
"icon": ""
},
{
"status": "",
"keyword": "正道的光",
"goto_type": 0,
"pos": 19,
"word_type": 1,
"id": 19,
"goto_value": "",
"name_type": "",
"icon": ""
},
{
"status": "",
"keyword": "bts",
"goto_type": 0,
"pos": 20,
"word_type": 1,
"id": 20,
"goto_value": "",
"name_type": "",
"icon": ""
}
]
} }
``` ```