返回提交历史
Modified
README.md
+14
-4
Modified
login/login_action/QR.md
+1
-1
Added
search/hot.md
+349
-0
Modified
search/search_request.md
+571
-1
XFEstudio/bilibili-API-collect
添加综合搜索 热搜 以及默认搜索
0183d88
代码差异
4 个文件
+935
-6
@@ -21,9 +21,9 @@
21
21
<h3 align="center">不断更新中....</h3>
22
22
本项目旨在对B站web端、移动端以及TV端散落在世界各地的野生api进行收集整理,研究使用方法并对其进行说明,运用了黑箱法、控制变量法、js逆向分析法、网络抓包法等研究办法
23
23
24
所有api均为标准http协议,返回值大都为json
24
所有api均为标准http协议,返回数据大都为json或protobuf
25
25
26
所有http协议地址均可使用https
26
PS:所有http协议地址均可使用https,文档中为了统一写作`http`,为了数据安全建议所有接口使用https
27
27
28
28
小小的Demo:[av583785685](https://www.bilibili.com/video/av583785685)
29
29
@@ -94,9 +94,9 @@
94
94
- [排行榜](ranking&dynamic/ranking.md)x
95
95
- [最新动态](ranking&dynamic/dynamic.md)x
96
96
- [搜索](search)
97
- [搜索请求](search/search_request.md)×
97
- [搜索请求](search/search_request.md)√
98
98
- [搜索结果](search/search_response.md)√
99
- 热搜
99
- [默认搜索&热搜](search/hot.md)√
100
100
- 搜索建议
101
101
- [小黑屋](blackroom)
102
102
- 基本信息
@@ -191,10 +191,16 @@ https://github.com/Hsury/Bilibili-Toolkit
191
191
192
192
https://github.com/whjstc/openbilibili-go-common-1
193
193
194
https://github.com/wnstar/bili-utils
195
194
196
成品:
195
197
198
https://github.com/AncientLysine/BiliLocal
199
196
200
https://github.com/zyzsdy/biliroku
197
201
202
https://github.com/otakustay/danmaku-to-ass
203
198
204
https://github.com/bilibili-helper/bilibili-helper-o
199
205
200
206
https://github.com/apachecn/BiliDriveEx
@@ -205,8 +211,12 @@ https://github.com/Hsury/BiliDrive
205
211
206
212
https://github.com/Tsuk1ko/bilibili-live-chat
207
213
214
https://github.com/ironmanic/crawler_target_users_good
215
208
216
其他:
209
217
218
https://github.com/kuresaru/geetest-validator
219
210
220
https://github.com/Hsury/Geetest3-Crack
211
221
212
222
https://github.com/SocialSisterYi/bv2av_convert
@@ -96,7 +96,7 @@ curl 'http://passport.bilibili.com/qrcode/getLoginUrl'
96
96
| message | str | 错误信息 | 正确无 |
97
97
| ts | num | 扫码时间 | 错误无 |
98
98
| status | bool | 扫码是否成功 | true:成功<br />false:未成功 |
99
| data | 正确时:obj<br />错误时:num | 正确时:游戏分站url<br />错误时:错误代码 | 未成功时:<br />-1:秘钥错误<br />-2:秘钥超时<br />-4:未扫描<br />-5:未确认 |
99
| data | 正确时:obj<br />错误时:num | 正确时:游戏分站url<br />错误时:错误代码 | 未成功时:<br />-1:密钥错误<br />-2:密钥超时<br />-4:未扫描<br />-5:未确认 |
100
100
101
101
data 对象:
102
102
| 字段 | 类型 | 内容 | 备注 |
@@ -0,0 +1,349 @@
1
# 默认搜索&热搜
2
3
## 获取默认搜索内容(web端)
4
5
> http://api.bilibili.com/x/web-interface/search/default
6
7
*请求方式:GET*
8
9
默认搜索为搜索框中默认填充内容,用于官方推荐内容,若不输入点击搜索按钮跳转为`url`中的链接
10
11
**json回复:**
12
13
根对象:
14
15
| 字段 | 类型 | 内容 | 备注 |
16
| ------- | ---- | -------- | ------- |
17
| code | num | 返回值 | 0:成功 |
18
| message | str | 错误信息 | 默认为0 |
19
| ttl | num | 1 | |
20
| data | obj | 信息本体 | |
21
22
`data`对象:
23
24
| 字段 | 类型 | 内容 | 备注 |
25
| ---------- | ---- | --------------- | -------------- |
26
| seid | str | 搜索seID | |
27
| id | num | 默认搜索ID | |
28
| type | num | 0 | |
29
| show_name | str | 显示文字 | |
30
| name | str | 空 | |
31
| goto_type | num | 跳转类型 | 1:视频 |
32
| goto_value | str | 搜索目标ID | 视频:视频avID |
33
| url | str | 搜索目标跳转url | |
34
35
**示例:**
36
37
```shell
38
curl 'http://api.bilibili.com/x/web-interface/search/default'
39
```
40
41
```json
42
{
43
"code": 0,
44
"message": "0",
45
"ttl": 1,
46
"data": {
47
"seid": "17607543598496143098",
48
"id": 3296036255232726331,
49
"type": 0,
50
"show_name": "歪果仁在中国做模特能赚多少钱?",
51
"name": "",
52
"goto_type": 1,
53
"goto_value": "243920322",
54
"url": "https://www.bilibili.com/video/BV1Tv411q7gx"
55
}
56
}
57
```
58
59
## 获取热搜列表(web端)
60
61
> http://s.search.bilibili.com/main/hotword
62
63
*请求方式:GET*
64
65
榜单每隔固定时间统计一次,请求后返回搜索前20的关键词
66
67
**json回复:**
68
69
根对象:
70
71
| 字段 | 类型 | 内容 | 备注 |
72
| --------- | ----- | ------------ | ------------- |
73
| exp_str | str | ??? | |
74
| code | num | 返回值 | 0:成功 |
75
| cost | obj | 响应时间? | |
76
| seid | str | 搜索seID | |
77
| timestamp | num | 榜单统计时间 | 时间戳 |
78
| message | str | 错误信息 | 默认为success |
79
| list | array | 热搜列表 | |
80
81
`list`数组:
82
83
| 项 | 类型 | 内容 | 备注 |
84
| ---- | ---- | --------------- | ------------ |
85
| 0 | obj | 榜单第1名 | |
86
| n | obj | 榜单第(n+1)名 | 按照名次顺序 |
87
| 19 | obj | 榜单第20名 | 最后一项 |
88
89
`list`数组中的对象:
90
91
| 字段 | 类型 | 内容 | 备注 |
92
| ---------- | ---- | -------- | ----------------------------- |
93
| status | str | 空 | |
94
| keyword | str | 关键词 | |
95
| goto_type | num | 0 | |
96
| pos | num | 名次 | 1-20 |
97
| word_type | num | 条目属性 | 1:正常<br />4:新<br />5:热 |
98
| id | num | 名次 | 1-20 |
99
| goto_value | str | 空 | |
100
| name_type | str | 空 | |
101
| icon | str | 图标url | |
102
103
**示例:**
104
105
```shell
106
curl 'http://s.search.bilibili.com/main/hotword'
107
```
108
109
```json
110
{
111
"exp_str": "8104#8200#8300#8401#8500#5502#6699",
112
"code": 0,
113
"cost": {
114
"reas_request": "0.001895",
115
"params_check": "0.000127",
116
"reas_response_format": "0.000098",
117
"deserialize_response": "0.000080",
118
"reas_request_format": "0.000076",
119
"total": "0.002479",
120
"main_handler": "0.002252"
121
},
122
"seid": "9318821020548476185",
123
"timestamp": 1596034742,
124
"message": "success",
125
"list": [
126
{
127
"status": "",
128
"keyword": "特朗普",
129
"goto_type": 0,
130
"pos": 1,
131
"word_type": 1,
132
"id": 1,
133
"goto_value": "",
134
"name_type": "",
135
"icon": ""
136
},
137
{
138
"status": "",
139
"keyword": "武汉协和医院",
140
"goto_type": 0,
141
"pos": 2,
142
"word_type": 5,
143
"id": 2,
144
"goto_value": "",
145
"name_type": "",
146
"icon": "http://i0.hdslb.com/bfs/feed-admin/e9e7a2d8497d4063421b685e72680bf1cfb99a0d.png"
147
},
148
{
149
"status": "",
150
"keyword": "元龙",
151
"goto_type": 0,
152
"pos": 3,
153
"word_type": 5,
154
"id": 3,
155
"goto_value": "",
156
"name_type": "",
157
"icon": "http://i0.hdslb.com/bfs/feed-admin/e9e7a2d8497d4063421b685e72680bf1cfb99a0d.png"
158
},
159
{
160
"status": "",
161
"keyword": "周深",
162
"goto_type": 0,
163
"pos": 4,
164
"word_type": 4,
165
"id": 4,
166
"goto_value": "",
167
"name_type": "",
168
"icon": "http://i0.hdslb.com/bfs/feed-admin/4d579fb61f9655316582db193118bba3a721eec0.png"
169
},
170
{
171
"status": "",
172
"keyword": "徐大sao",
173
"goto_type": 0,
174
"pos": 5,
175
"word_type": 4,
176
"id": 5,
177
"goto_value": "",
178
"name_type": "",
179
"icon": "http://i0.hdslb.com/bfs/feed-admin/4d579fb61f9655316582db193118bba3a721eec0.png"
180
},
181
{
182
"status": "",
183
"keyword": "FPX",
184
"goto_type": 0,
185
"pos": 6,
186
"word_type": 4,
187
"id": 6,
188
"goto_value": "",
189
"name_type": "",
190
"icon": "http://i0.hdslb.com/bfs/feed-admin/4d579fb61f9655316582db193118bba3a721eec0.png"
191
},
192
{
193
"status": "",
194
"keyword": "BLACKPINK",
195
"goto_type": 0,
196
"pos": 7,
197
"word_type": 1,
198
"id": 7,
199
"goto_value": "",
200
"name_type": "",
201
"icon": ""
202
},
203
{
204
"status": "",
205
"keyword": "沈力",
206
"goto_type": 0,
207
"pos": 8,
208
"word_type": 1,
209
"id": 8,
210
"goto_value": "",
211
"name_type": "",
212
"icon": ""
213
},
214
{
215
"status": "",
216
"keyword": "老番茄",
217
"goto_type": 0,
218
"pos": 9,
219
"word_type": 1,
220
"id": 9,
221
"goto_value": "",
222
"name_type": "",
223
"icon": ""
224
},
225
{
226
"status": "",
227
"keyword": "JDG",
228
"goto_type": 0,
229
"pos": 10,
230
"word_type": 4,
231
"id": 10,
232
"goto_value": "",
233
"name_type": "",
234
"icon": "http://i0.hdslb.com/bfs/feed-admin/4d579fb61f9655316582db193118bba3a721eec0.png"
235
},
236
{
237
"status": "",
238
"keyword": "荒废工厂",
239
"goto_type": 0,
240
"pos": 11,
241
"word_type": 1,
242
"id": 11,
243
"goto_value": "",
244
"name_type": "",
245
"icon": ""
246
},
247
{
248
"status": "",
249
"keyword": "活着",
250
"goto_type": 0,
251
"pos": 12,
252
"word_type": 1,
253
"id": 12,
254
"goto_value": "",
255
"name_type": "",
256
"icon": ""
257
},
258
{
259
"status": "",
260
"keyword": "明日方舟",
261
"goto_type": 0,
262
"pos": 13,
263
"word_type": 1,
264
"id": 13,
265
"goto_value": "",
266
"name_type": "",
267
"icon": ""
268
},
269
{
270
"status": "",
271
"keyword": "创造营2020",
272
"goto_type": 0,
273
"pos": 14,
274
"word_type": 1,
275
"id": 14,
276
"goto_value": "",
277
"name_type": "",
278
"icon": ""
279
},
280
{
281
"status": "",
282
"keyword": "黑人抬棺",
283
"goto_type": 0,
284
"pos": 15,
285
"word_type": 1,
286
"id": 15,
287
"goto_value": "",
288
"name_type": "",
289
"icon": ""
290
},
291
{
292
"status": "",
293
"keyword": "名侦探柯南",
294
"goto_type": 0,
295
"pos": 16,
296
"word_type": 1,
297
"id": 16,
298
"goto_value": "",
299
"name_type": "",
300
"icon": ""
301
},
302
{
303
"status": "",
304
"keyword": "fpx",
305
"goto_type": 0,
306
"pos": 17,
307
"word_type": 1,
308
"id": 17,
309
"goto_value": "",
310
"name_type": "",
311
"icon": ""
312
},
313
{
314
"status": "",
315
"keyword": "csgo",
316
"goto_type": 0,
317
"pos": 18,
318
"word_type": 1,
319
"id": 18,
320
"goto_value": "",
321
"name_type": "",
322
"icon": ""
323
},
324
{
325
"status": "",
326
"keyword": "正道的光",
327
"goto_type": 0,
328
"pos": 19,
329
"word_type": 1,
330
"id": 19,
331
"goto_value": "",
332
"name_type": "",
333
"icon": ""
334
},
335
{
336
"status": "",
337
"keyword": "bts",
338
"goto_type": 0,
339
"pos": 20,
340
"word_type": 1,
341
"id": 20,
342
"goto_value": "",
343
"name_type": "",
344
"icon": ""
345
}
346
]
347
}
348
```
349