返回提交历史
Modified
.github/ISSUE_TEMPLATE/1-update-request.yml
+6
-5
Modified
docs/message/msg.md
+1
-0
Modified
docs/user/relation.md
+7
-5
Modified
docs/video/info.md
+1
-1
Modified
docs/video/tags.md
+249
-125
XFEstudio/bilibili-API-collect
feat & fix: update docs & fix typo in issue template
dc3f6d6
代码差异
5 个文件
+264
-136
@@ -14,12 +14,13 @@ body:
14
14
attributes:
15
15
label: "API 来源"
16
16
description: "该 API 在何平台中使用"
17
multiple: true
17
18
options:
18
19
- "Web 端(含 h5)"
19
20
- "PC 客户端(Electron)"
20
21
- "Android 客户端(含粉版、平板版、蓝版、概念版、国际版等)"
21
- "TV 客户端(含云试听小电视、车机、物联网版等)"
22
- "IOS 客户端(含粉版、平板版、概念版等)"
22
- "TV 客户端(含云视听小电视、车机、物联网版等)"
23
- "iOS 客户端(含粉版、平板版、概念版等)"
23
24
- "必剪客户端"
24
25
- "漫画客户端"
25
26
- "其他(请在详情中备注)"
@@ -33,16 +34,16 @@ body:
33
34
options:
34
35
- "REST"
35
36
- "gRPC"
36
- "长连接数据帧(含 ws、TCP)"
37
- "长连接数据帧(含 WebSocket、TCP)"
37
38
- "其他类型(请在详情中备注)"
38
39
validations:
39
40
required: true
40
41
- type: input
41
id: adderss
42
id: address
42
43
attributes:
43
44
label: "API 地址"
44
45
description: "REST 的 url,或 gRPC 的包名+服务名,更新时可为原文档链接"
45
placeholder: "eg: https://api.bilibili.com/2333333"
46
placeholder: "e.g.: https://api.bilibili.com/x/..."
46
47
validations:
47
48
required: false
48
49
- type: textarea
@@ -3,6 +3,7 @@
3
3
## 获取未读消息数
4
4
5
5
> https://api.bilibili.com/x/msgfeed/unread
6
6
7
> https://api.vc.bilibili.com/x/im/web/msgfeed/unread (新接口)
7
8
8
9
*请求方式:GET*
@@ -1348,7 +1348,7 @@ curl 'https://api.bilibili.com/x/relation/modify' \
1348
1348
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
1349
1349
| ---------- | ---- | ------------------------- | --------------- | ------------------------------------------------- |
1350
1350
| access_key | str | APP 登录 Token | APP 方式必要 | |
1351
| fids | nums | 目标用户 mid 列表 | 必要 | 每个之间用`,`间隔 |
1351
| fids | nums | 目标用户 mid 列表 | 必要 | 每个成员之间用 `,` 间隔,最多 50 个成员,不能包含自己的 mid |
1352
1352
| act | num | 操作代码 | 必要 | 同上<br />仅可为 1 或 5,故只能进行批量关注和拉黑 |
1353
1353
| re_src | num | 关注来源代码 | 必要 | 同上 |
1354
1354
| csrf | str | CSRF Token(位于 Cookie) | Cookie 方式必要 | |
@@ -1485,13 +1485,15 @@ curl -G 'https://api.bilibili.com/x/relation' \
1485
1485
1486
1486
### 查询用户与自己关系(互相关系)
1487
1487
1488
> https://api.bilibili.com/x/space/wbi/acc/relation
1488
> 接口1:https://api.bilibili.com/x/space/wbi/acc/relation
1489
1490
> 接口2:https://api.bilibili.com/x/web-interface/relation
1489
1491
1490
1492
*请求方式:GET*
1491
1493
1492
1494
认证方式:Cookie(SESSDATA)或 APP
1493
1495
1494
鉴权方式:[Wbi 签名](../misc/sign/wbi.md)
1496
鉴权方式(仅接口1):[Wbi 签名](../misc/sign/wbi.md)
1495
1497
1496
1498
~~该接口的旧版 API :https://api.bilibili.com/x/space/acc/relation~~(已废弃,不建议使用)
1497
1499
@@ -1501,8 +1503,8 @@ curl -G 'https://api.bilibili.com/x/relation' \
1501
1503
| ---------- | ---- | ------------ | ----------- | ------------------------------------ |
1502
1504
| access_key | str | APP登录Token | APP方式必要 | |
1503
1505
| mid | num | 目标用户mid | 必要 | |
1504
| w_rid | str | Wbi 签名 | 必要 | 详见 [Wbi 签名](../misc/sign/wbi.md) |
1505
| wts | num | 当前时间戳 | 必要 | 详见 [Wbi 签名](../misc/sign/wbi.md) |
1506
| w_rid | str | Wbi 签名 | 仅接口1必要 | 详见 [Wbi 签名](../misc/sign/wbi.md) |
1507
| wts | num | 当前时间戳 | 仅接口1必要 | 详见 [Wbi 签名](../misc/sign/wbi.md) |
1506
1508
1507
1509
**json回复:**
1508
1510
@@ -676,7 +676,7 @@ https://i1.hdslb.com/bfs/archive/ea0dd34bf41e23a68175680a00e3358cd249105f.jpg
676
676
677
677
`data`中的`Tags`数组:
678
678
679
基本同「[获取视频TAG信息](tags.md#获取视频TAG信息)」中的data数组
679
基本同「[获取视频TAG信息(新)](tags.md#获取视频TAG信息新)」中的data数组
680
680
681
681
`data`中的`Reply`对象:
682
682
@@ -1,8 +1,132 @@
1
1
# 视频TAG
2
2
3
## 获取视频TAG信息
3
## 获取视频TAG信息(新)
4
4
5
> https://api.bilibili.com/x/tag/archive/tags
5
> <https://api.bilibili.com/x/web-interface/view/detail/tag>
6
7
*请求方式:GET*
8
9
认证方式:Cookie(SESSDATA)
10
11
**url参数:**
12
13
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
14
| ------ | ---- | -------- | ------------ | -------------------------------- |
15
| aid | num | 稿件avid | 必要(可选) | avid与bvid任选一个 |
16
| bvid | str | 稿件bvid | 必要(可选) | avid与bvid任选一个 |
17
| cid | num | 分P cid | 非必要 | 提供此参数可返回对应分P的BGM信息 |
18
19
**json回复:**
20
21
根对象:
22
23
| 字段 | 类型 | 内容 | 备注 |
24
| ------- | ----- | -------- | --------------------------- |
25
| code | num | 返回值 | 0:成功<br />-400:请求错误 |
26
| message | str | 错误信息 | 默认为0 |
27
| ttl | num | 1 | |
28
| data | array | TAG列表 | 无TAG为空 |
29
30
`data`数组:
31
32
| 项 | 类型 | 内容 | 备注 |
33
| ---- | ---- | -------------- | ---- |
34
| 0 | obj | 第1个TAG | |
35
| n | obj | 第(n+1)个TAG | |
36
| …… | obj | …… | …… |
37
38
`data`数组中的对象:
39
40
| 字段 | 类型 | 内容 | 备注 |
41
| -------- | ---- | ---------- | ------------------------------------------------------------ |
42
| tag_id | num | tag_id | 当`tag_type`不为`bgm`时有效 |
43
| tag_name | str | TAG名称 | |
44
| music_id | str | 背景音乐id | 当`tag_type`为`bgm`时有效,以`MA`开头 |
45
| tag_type | str | TAG类型 | `old_channel`:普通标签<br />`topic`:话题<br />`bgm`:背景音乐 |
46
| jump_url | str | 跳转url | 当`tag_type`为`topic`或`bgm`时有效 |
47
48
**示例:**
49
50
查询视频`av89772773`/`BV1M741177Kg`的TAG
51
52
avid方式:
53
54
```shell
55
curl -G 'https://api.bilibili.com/x/web-interface/view/detail/tag' \
56
--data-urlencode 'aid=89772773' \
57
--data-urlencode 'cid=153322313' \
58
-b 'SESSDATA=xxx'
59
```
60
61
bvid方式:
62
63
```shell
64
curl -G 'https://api.bilibili.com/x/web-interface/view/detail/tag' \
65
--data-urlencode 'bvid=BV1M741177Kg' \
66
--data-urlencode 'cid=153322313' \
67
-b 'SESSDATA=xxx'
68
```
69
70
<details>
71
<summary>查看响应示例:</summary>
72
73
```json
74
{
75
"code": 0,
76
"message": "0",
77
"ttl": 1,
78
"data": [
79
{
80
"tag_id": 0,
81
"tag_name": "发现《Other Side》",
82
"music_id": "MA456128506519140428",
83
"tag_type": "bgm",
84
"jump_url": "https://music.bilibili.com/h5/music-detail?music_id=MA456128506519140428&cid=153322313&aid=89772773&na_close_hide=1"
85
},
86
{
87
"tag_id": 12620189,
88
"tag_name": "异度侵入",
89
"music_id": "",
90
"tag_type": "old_channel",
91
"jump_url": ""
92
},
93
{
94
"tag_id": 707,
95
"tag_name": "ED",
96
"music_id": "",
97
"tag_type": "old_channel",
98
"jump_url": ""
99
},
100
{
101
"tag_id": 1394,
102
"tag_name": "动漫",
103
"music_id": "",
104
"tag_type": "old_channel",
105
"jump_url": ""
106
},
107
{
108
"tag_id": 13289329,
109
"tag_name": "异度侵入ed原图",
110
"music_id": "",
111
"tag_type": "old_channel",
112
"jump_url": ""
113
},
114
{
115
"tag_id": 7520816,
116
"tag_name": "bilibili新星计划",
117
"music_id": "",
118
"tag_type": "old_channel",
119
"jump_url": ""
120
}
121
]
122
}
123
```
124
125
</details>
126
127
## 获取视频TAG信息(旧)
128
129
> <https://api.bilibili.com/x/tag/archive/tags>
6
130
7
131
*请求方式:GET*
8
132
@@ -19,12 +143,12 @@
19
143
20
144
根对象:
21
145
22
| 字段 | 类型 | 内容 | 备注 |
23
| ------- | ------ | -------- | ---------------------------- |
24
| code | num | 返回值 | 0:成功 <br />-400:请求错误 |
25
| message | str | 错误信息 | 默认为0 |
26
| ttl | num | 1 | |
27
| data | array | TAG列表 | 无TAG为空 |
146
| 字段 | 类型 | 内容 | 备注 |
147
| ------- | ----- | -------- | --------------------------- |
148
| code | num | 返回值 | 0:成功<br />-400:请求错误 |
149
| message | str | 错误信息 | 默认为0 |
150
| ttl | num | 1 | |
151
| data | array | TAG列表 | 无TAG为空 |
28
152
29
153
`data`数组:
30
154
@@ -38,7 +162,7 @@
38
162
39
163
| 字段 | 类型 | 内容 | 备注 |
40
164
| ------------- | ---- | -------------- | ------------------------------------------------------------ |
41
| tag_id | num | tag_id | |
165
| tag_id | num | tag_id | |
42
166
| tag_name | str | TAG名称 | |
43
167
| cover | str | TAG图片url | |
44
168
| head_cover | str | TAG页面头图url | |
@@ -46,7 +170,7 @@
46
170
| short_content | str | TAG简介 | |
47
171
| type | num | ??? | |
48
172
| state | num | 0 | |
49
| ctime | num | 创建时间 | 时间戳 |
173
| ctime | num | 创建时间 | 秒级时间戳 |
50
174
| count | obj | 状态数 | |
51
175
| is_atten | num | 是否关注 | 0:未关注<br />1:已关注<br />需要登录(Cookie) <br />未登录为0 |
52
176
| likes | num | 0 | 作用尚不明确 |
@@ -54,7 +178,7 @@
54
178
| attribute | num | 0 | 作用尚不明确 |
55
179
| liked | num | 是否已经点赞 | 0:未点赞<br />1:已点赞<br />需要登录(Cookie) <br />未登录为0 |
56
180
| hated | num | 是否已经点踩 | 0:未点踩<br />1:已点踩<br />需要登录(Cookie) <br />未登录为0 |
57
| extra_attr | num | ? ? ? | |
181
| extra_attr | num | ? ? ? | |
58
182
59
183
`data`数组中的对象中的`count`对象:
60
184
@@ -89,115 +213,115 @@ curl -G 'https://api.bilibili.com/x/tag/archive/tags' \
89
213
90
214
```json
91
215
{
92
"code": 0,
93
"message": "0",
94
"ttl": 1,
95
"data": [{
96
"tag_id": 12620189,
97
"tag_name": "异度侵入",
98
"cover": "",
99
"head_cover": "",
100
"content": "",
101
"short_content": "",
102
"type": 1,
103
"state": 0,
104
"ctime": 1576235749,
105
"count": {
106
"view": 0,
107
"use": 6392,
108
"atten": 8938
109
},
110
"is_atten": 1,
111
"likes": 1,
112
"hates": 0,
113
"attribute": 0,
114
"liked": 0,
115
"hated": 0
116
}, {
117
"tag_id": 7520816,
118
"tag_name": "bilibili新星计划",
119
"cover": "",
120
"head_cover": "",
121
"content": "",
122
"short_content": "",
123
"type": 4,
124
"state": 0,
125
"ctime": 1529717850,
126
"count": {
127
"view": 0,
128
"use": 1967314,
129
"atten": 65082
130
},
131
"is_atten": 0,
132
"likes": 0,
133
"hates": 0,
134
"attribute": 0,
135
"liked": 0,
136
"hated": 0
137
}, {
138
"tag_id": 707,
139
"tag_name": "ED",
140
"cover": "",
141
"head_cover": "",
142
"content": "",
143
"short_content": "",
144
"type": 3,
145
"state": 0,
146
"ctime": 1436866637,
147
"count": {
148
"view": 0,
149
"use": 62646,
150
"atten": 75642
151
},
152
"is_atten": 1,
153
"likes": 0,
154
"hates": 0,
155
"attribute": 0,
156
"liked": 0,
157
"hated": 0
158
}, {
159
"tag_id": 1394,
160
"tag_name": "动漫",
161
"cover": "http://i0.hdslb.com/bfs/tag/d08c5fe17ceb793e7ce95d9c67392743b33b46d0.jpg",
162
"head_cover": "",
163
"content": " “动漫”是动画和漫画的合称与缩写。在其他语言相当少用。随着现代传媒技术的发展,动画(animation或anime)和漫画(comics,manga;特别是故事性漫画)之间联系日趋紧密,两者常被合而为“动漫”。\n 由于漫画本身的发展形成了现代故事漫画的表现形式,将影视艺术融入漫画之中,使得漫画与动画更容易结合,影视艺术独特的地方在于它能通过镜头的推拉摇移和片段剪辑的蒙太奇技巧来表达想法和感受。漫画正是吸收了影视艺术的这两个特点。当讲述的故事越发复杂、人物越发丰富的时候,传统单线式叙事的方法就越行不通,蒙太奇的介入就成为一种需要了;当漫画家在传统表现手段中无法找到更合适的抒发感情的方法的时候,当读者需要作品有更强的冲击力和表现力的时候,各种镜头的灵活运用就成为一种必需了。一部现代故事漫画往往集远、中、近、特四种镜头于一身,漫画家往往能熟练地运用镜头的移动和各种蒙太奇剪接,对故事特定部分的情绪和氛围进行渲染。这就是现代故事漫画容易和动画结合的一个原因,因为它天生就像动画的分镜头剧本,读者在看漫画时如同在看一部电影。正是有着这样的相似性所以如今将动画和漫画合称为“动漫”。",
164
"short_content": "",
165
"type": 3,
166
"state": 0,
167
"ctime": 1436866637,
168
"count": {
169
"view": 0,
170
"use": 1134143,
171
"atten": 113030
172
},
173
"is_atten": 0,
174
"likes": 0,
175
"hates": 0,
176
"attribute": 0,
177
"liked": 0,
178
"hated": 0
179
}, {
180
"tag_id": 13289329,
181
"tag_name": "异度侵入ed原图",
182
"cover": "",
183
"head_cover": "",
184
"content": "",
185
"short_content": "",
186
"type": 1,
187
"state": 0,
188
"ctime": 1581948411,
189
"count": {
190
"view": 0,
191
"use": 3,
192
"atten": 0
193
},
194
"is_atten": 0,
195
"likes": 0,
196
"hates": 0,
197
"attribute": 0,
198
"liked": 0,
199
"hated": 0
200
}]
216
"code": 0,
217
"message": "0",
218
"ttl": 1,
219
"data": [{
220
"tag_id": 12620189,
221
"tag_name": "异度侵入",
222
"cover": "",
223
"head_cover": "",
224
"content": "",
225
"short_content": "",
226
"type": 1,
227
"state": 0,
228
"ctime": 1576235749,
229
"count": {
230
"view": 0,
231
"use": 6392,
232
"atten": 8938
233
},
234
"is_atten": 1,
235
"likes": 1,
236
"hates": 0,
237
"attribute": 0,
238
"liked": 0,
239
"hated": 0
240
}, {
241
"tag_id": 7520816,
242
"tag_name": "bilibili新星计划",
243
"cover": "",
244
"head_cover": "",
245
"content": "",
246
"short_content": "",
247
"type": 4,
248
"state": 0,
249
"ctime": 1529717850,
250
"count": {
251
"view": 0,
252
"use": 1967314,
253
"atten": 65082
254
},
255
"is_atten": 0,
256
"likes": 0,
257
"hates": 0,
258
"attribute": 0,
259
"liked": 0,
260
"hated": 0
261
}, {
262
"tag_id": 707,
263
"tag_name": "ED",
264
"cover": "",
265
"head_cover": "",
266
"content": "",
267
"short_content": "",
268
"type": 3,
269
"state": 0,
270
"ctime": 1436866637,
271
"count": {
272
"view": 0,
273
"use": 62646,
274
"atten": 75642
275
},
276
"is_atten": 1,
277
"likes": 0,
278
"hates": 0,
279
"attribute": 0,
280
"liked": 0,
281
"hated": 0
282
}, {
283
"tag_id": 1394,
284
"tag_name": "动漫",
285
"cover": "http://i0.hdslb.com/bfs/tag/d08c5fe17ceb793e7ce95d9c67392743b33b46d0.jpg",
286
"head_cover": "",
287
"content": " “动漫”是动画和漫画的合称与缩写。在其他语言相当少用。随着现代传媒技术的发展,动画(animation或anime)和漫画(comics,manga;特别是故事性漫画)之间联系日趋紧密,两者常被合而为“动漫”。\n 由于漫画本身的发展形成了现代故事漫画的表现形式,将影视艺术融入漫画之中,使得漫画与动画更容易结合,影视艺术独特的地方在于它能通过镜头的推拉摇移和片段剪辑的蒙太奇技巧来表达想法和感受。漫画正是吸收了影视艺术的这两个特点。当讲述的故事越发复杂、人物越发丰富的时候,传统单线式叙事的方法就越行不通,蒙太奇的介入就成为一种需要了;当漫画家在传统表现手段中无法找到更合适的抒发感情的方法的时候,当读者需要作品有更强的冲击力和表现力的时候,各种镜头的灵活运用就成为一种必需了。一部现代故事漫画往往集远、中、近、特四种镜头于一身,漫画家往往能熟练地运用镜头的移动和各种蒙太奇剪接,对故事特定部分的情绪和氛围进行渲染。这就是现代故事漫画容易和动画结合的一个原因,因为它天生就像动画的分镜头剧本,读者在看漫画时如同在看一部电影。正是有着这样的相似性所以如今将动画和漫画合称为“动漫”。",
288
"short_content": "",
289
"type": 3,
290
"state": 0,
291
"ctime": 1436866637,
292
"count": {
293
"view": 0,
294
"use": 1134143,
295
"atten": 113030
296
},
297
"is_atten": 0,
298
"likes": 0,
299
"hates": 0,
300
"attribute": 0,
301
"liked": 0,
302
"hated": 0
303
}, {
304
"tag_id": 13289329,
305
"tag_name": "异度侵入ed原图",
306
"cover": "",
307
"head_cover": "",
308
"content": "",
309
"short_content": "",
310
"type": 1,
311
"state": 0,
312
"ctime": 1581948411,
313
"count": {
314
"view": 0,
315
"use": 3,
316
"atten": 0
317
},
318
"is_atten": 0,
319
"likes": 0,
320
"hates": 0,
321
"attribute": 0,
322
"liked": 0,
323
"hated": 0
324
}]
201
325
}
202
326
```
203
327
@@ -205,7 +329,7 @@ curl -G 'https://api.bilibili.com/x/tag/archive/tags' \
205
329
206
330
## 点赞&取消点赞视频TAG
207
331
208
> https://api.bilibili.com/x/tag/archive/like2
332
> <https://api.bilibili.com/x/tag/archive/like2>
209
333
210
334
*请求方式:POST*
211
335
@@ -218,7 +342,7 @@ curl -G 'https://api.bilibili.com/x/tag/archive/tags' \
218
342
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
219
343
| ------ | ---- | ------------------------ | ------ | ---- |
220
344
| aid | num | 稿件avid | 必要 | |
221
| tag_id | num | tag_id | 必要 | |
345
| tag_id | num | tag_id | 必要 | |
222
346
| csrf | str | CSRF Token(位于cookie) | 必要 | |
223
347
224
348
**json回复:**
@@ -258,20 +382,20 @@ curl 'https://api.bilibili.com/x/tag/archive/like2' \
258
382
259
383
## 点踩&取消点踩视频TAG
260
384
261
> https://api.bilibili.com/x/tag/archive/hate2
385
> <https://api.bilibili.com/x/tag/archive/hate2>
262
386
263
387
*请求方式:POST*
264
388
265
389
认证方式:Cookie(SESSDATA)
266
390
267
重复访问为取消
391
重复请求为取消
268
392
269
393
**正文参数( application/x-www-form-urlencoded ):**
270
394
271
395
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
272
396
| ------ | ---- | ------------------------ | ------ | ---- |
273
397
| aid | num | 稿件avid | 必要 | |
274
| tag_id | num | tag_id | 必要 | |
398
| tag_id | num | tag_id | 必要 | |
275
399
| csrf | str | CSRF Token(位于cookie) | 必要 | |
276
400
277
401
**json回复:**