Bilibili API

Api 列表:

1.视频信息类:通过(BV/AV) 号获取视频详细信息、通过(BV/AV) 号获取视频数据信息(点赞转发收藏弹幕数量等)(可用于AV BV号转换)
2.(通过AV号)获取视频评论/评论的子评论(评论的评论) (及置顶评论):获取视频评论、获取视频置顶评论、获取评论的子评论
3.个人信息:获取个人信息、获取用户收藏夹
4.主站:综合热门、音乐排行
5.哔哩哔哩公益:公益概览(公益项目个数、总捐款金额、总捐款人数,及首页的项目)、项目详细信息、项目详细捐款记录(最近100条)(脱敏)


前言

这次抓完B站后,才发现B站的老API真的可以用 shi山 形容,包括同一个数据在一个API中同时返回很多次,和明明用不到这个数据却还是返回了(就比如 API 1.1),而且新旧版本的API同时存在,估计现在B站的后端都不知道自家公司有多少API,有多少能用,有多少不能用。
但是B站的新API就没有这些问题,比如公益的API,返回的内容可读性还是比较高的,所以就没有写API解释。
本文有目录,可点击目录快速跳转,同时可以使用 ctrl+f 进行文章内容搜索


1.视频信息类

1.1 通过(BV/AV) 号获取视频详细信息(优先使用)

请求方式:GET
请求URL(AV):https://api.bilibili.com/x/web-interface/view/detail?aid={AV号}
请求URL(BV):https://api.bilibili.com/x/web-interface/view/detail?bvid={BV号}
请求示例:https://api.bilibili.com/x/web-interface/view/detail?bvid=BV1Mt4y1X718
返回解释(部分):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"View": {
"bvid": "BV1Mt4y1X718", //BV号
"aid": 626401766, //AV号
"videos": 1, //视频集数(有视频包含分集)
"tid": 29, //?
"tname": "音乐现场", //视频分类(?)
"copyright": 2, //1为原创,2为转载
"pic": "http://i1.hdslb.com/bfs/archive/6eab612809534ffe057af235fe2d550a7664d12d.jpg", //视频封面
"title": "约德尔满级大佬4k60帧算法重制版", //视频标题
"pubdate": 1595055298,
"ctime": 1595055298,
"desc": "在720p25fps基础上由算法生成,大约跑了100个小时,希望大家三连,点个关注,后续发布更多精彩视频", //视频简介
"desc_v2": [{
"raw_text": "在720p25fps基础上由算法生成,大约跑了100个小时,希望大家三连,点个关注,后续发布更多精彩视频", //视频简介
"type": 1,
"biz_id": 0
}],
"state": 0, //视频状态,具体状态码含义不详
"duration": 126,
"rights": { //字面意思
"bp": 0,
"elec": 0,
"download": 1,
"movie": 0,
"pay": 0,
"hd5": 0,
"no_reprint": 0,
"autoplay": 1,
"ugc_pay": 0,
"is_cooperation": 0,
"ugc_pay_preview": 0,
"no_background": 0,
"clean_mode": 0,
"is_stein_gate": 0,
"is_360": 0,
"no_share": 0,
"arc_pay": 0,
"free_watch": 0
},
"owner": { //所有者(UP主)
"mid": 497021978, //UP主UID
"name": "4k_clear", //UP主昵称
"face": "https://i2.hdslb.com/bfs/face/16383a637e34ca6c4561b76fcd7fc16257895e09.jpg" //UP住头像
},
"stat": { //视频详细信息
"aid": 626401766, //视频AV号
"view": 9762662, //视频播放量
"danmaku": 13454, //视频弹幕数
"reply": 6319, //视频评论数
"favorite": 302595, //视频收藏数
"coin": 93764, //视频硬币数
"share": 45290, //视频分享数
"now_rank": 0, //视频当前排名
"his_rank": 18, //视频历史最高排名
"like": 469588, //视频点赞数
"dislike": 0, //视频点踩数(不反回数据,无意义API)
"evaluation": "",
"argue_msg": ""
},
"dynamic": "#音乐现场##歌曲##现场#", //标签
"cid": 213794602,
"dimension": {
"width": 3840,
"height": 2160,
"rotate": 0
},
"premiere": null,
"teenage_mode": 0,
"is_chargeable_season": false,
"is_story": false,
"no_cache": false,
"pages": [{
"cid": 213794602,
"page": 1,
"from": "vupload",
"part": "12_1",
"duration": 126,
"vid": "",
"weblink": "",
"dimension": {
"width": 3840,
"height": 2160,
"rotate": 0
}
}],
"subtitle": {
"allow_submit": false,
"list": []
},
"is_season_display": false,
"user_garb": {
"url_image_ani_cut": ""
},
"honor_reply": {
"honor": [{
"aid": 626401766,
"type": 3,
"desc": "全站排行榜最高第18名", //视频历史最高排名
"weekly_recommend_num": 0
}, {
"aid": 626401766,
"type": 4,
"desc": "热门", //排名名称
"weekly_recommend_num": 0
}]
},
"like_icon": ""
},
"Card": {
"card": {
"mid": "497021978", //UP主UID
"name": "4k_clear", //UP主名称
"approve": false,
"sex": "保密", //性别
"rank": "10000", //等级(?)
"face": "https://i2.hdslb.com/bfs/face/16383a637e34ca6c4561b76fcd7fc16257895e09.jpg", //UP主头像
"face_nft": 0,
"face_nft_type": 0,
"DisplayRank": "0",
"regtime": 0,
"spacesta": 0,
"birthday": "",
"place": "",
"description": "",
"article": 0,
"attentions": [],
"fans": 24484, //粉丝数
"friend": 20, //关注数
"attention": 20, //关注数
"sign": "算法修复4k视频,不定期更新算法处理后的视频", //个人简介
"level_info": {
"current_level": 6,
"current_min": 0,
"current_exp": 0,
"next_exp": 0
},
"pendant": {
"pid": 0,
"name": "",
"image": "",
"expire": 0,
"image_enhance": "",
"image_enhance_frame": ""
},
"nameplate": {
"nid": 0,
"name": "",
"image": "",
"image_small": "",
"level": "",
"condition": ""
},
"Official": { //官方认证
"role": 0,
"title": "",
"desc": "",
"type": -1
},
"official_verify": {
"type": -1,
"desc": ""
},
"vip": { //大会员状态(?)
"type": 0,
"status": 0,
"due_date": 0,
"vip_pay_type": 0,
"theme_type": 0,
"label": {
"path": "",
"text": "",
"label_theme": "",
"text_color": "",
"bg_style": 0,
"bg_color": "",
"border_color": "",
"use_img_label": true,
"img_label_uri_hans": "",
"img_label_uri_hant": "",
"img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/d7b702ef65a976b20ed854cbd04cb9e27341bb79.png", //无大会员图标(简体)(系统素材)
"img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/KJunwh19T5.png" //无大会员图标(繁体)(系统素材)
},
"avatar_subscript": 0,
"nickname_color": "",
"role": 0,
"avatar_subscript_url": "",
"tv_vip_status": 0,
"tv_vip_pay_type": 0,
"vipType": 0,
"vipStatus": 0
},
"is_senior_member": 0
},
"space": {
"s_img": "http://i2.hdslb.com/bfs/space/768cc4fd97618cf589d23c2711a1d1a729f42235.png", //小号主页背景
"l_img": "http://i2.hdslb.com/bfs/space/cb1c3ef50e22b6096fde67febe863494caefebad.png" //大号主页北京
},
"following": true,
"archive_count": 23,
"article_count": 0,
"follower": 24484, //粉丝数
"like_num": 527137 //获赞数
},
"Tags": [{
"tag_id": 0,
"tag_name": "She Taught Me How to Yodel",
"cover": "",
"head_cover": "",
"content": "",
"short_content": "",
"type": 0,
"state": 0,
"ctime": 0,
"count": {
"view": 0,
"use": 0,
"atten": 0
}
//---省略---
],
"Spec": null,
"Related": {
//---省略---
}
"hot_share": {
"show": false,
"list": []
},
"elec": null,
"recommend": null,
"view_addit": {
"63": false,
"64": false,
"69": false,
"71": false,
"72": false
}
}
}

1.2 通过(BV/AV) 号获取视频数据信息(点赞转发收藏弹幕数量等)(可用于AV BV号转换)

1.2.1 BV 号获取视频数据信息及AV号

请求方式:GET
请求URL:https://api.bilibili.com/x/web-interface/archive/stat?bvid={BV号}
示例请求:https://api.bilibili.com/x/web-interface/archive/stat?bvid=BV1Mt4y1X718
示例返回(已格式化处理):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"aid": 626401766,
"bvid": "BV1Mt4y1X718",
"view": 9762465,
"danmaku": 13454,
"reply": 6318,
"favorite": 302593,
"coin": 93761,
"share": 45287,
"like": 469578,
"now_rank": 0,
"his_rank": 18,
"no_reprint": 0,
"copyright": 2,
"argue_msg": "",
"evaluation": ""
}
}

信息解释:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"aid": //视频AV号,
"bvid": //视频BV号,
"view": //播放量,
"danmaku": //弹幕数,
"reply": //评论数,
"favorite": //收藏数,
"coin": //投币数,
"share": //分享数,
"like": //点赞数,
"now_rank": //当前排名,
"his_rank": //历史最高排名,
"no_reprint": //未知,
"copyright": //1为自制,2为转载,
"argue_msg": //未知,
"evaluation": //未知
}
}

1.2.2 AV 号获取视频数据信息及BV号

请求方式:GET
请求URL:http://api.bilibili.com/archive_stat/stat?aid={AV号}&type=jsonp
示例请求:http://api.bilibili.com/archive_stat/stat?aid=626401766&type=jsonp
示例返回(已格式化处理):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"aid": 626401766,
"view": 9762489,
"danmaku": 13454,
"reply": 6318,
"favorite": 302593,
"coin": 93762,
"share": 45288,
"now_rank": 0,
"his_rank": 18,
"like": 469578,
"dislike": 0,
"no_reprint": 0,
"copyright": 2
}
}

信息解释:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"aid": //视频AV号,
"view": //播放量,
"danmaku": //弹幕数,
"reply": //评论数,
"favorite": //收藏数,
"coin": //投币数,
"share": //分享数,
"now_rank": //当前排名,
"his_rank": //历史最高排名,
"like": //点赞数,
"dislike": //踩数,
"no_reprint": //未知,
"copyright": //1为自制,2为转载,
}
}

2.(通过AV号)获取视频评论/评论的子评论(评论的评论) (及置顶评论)

BV 号到 AV 号转换请通过 1.2.1 获取

2.1 获取视频评论

请求方式:GET
请求URL:https://api.bilibili.com/x/v2/reply/main?jsonp=jsonp&next={页数(从0开始)}&type=1&oid={AV号}&mode=3
示例请求:https://api.bilibili.com/x/v2/reply/main?jsonp=jsonp&next=0&type=1&oid=626401766&mode=3
示例返回:

这个API数据量实在是太大了,评论的一部分子评论都在里面,”replies”里面有19条评论,评论的评论和评论的点赞等一些数据都在这个API里面,因为太长就不放示例返回了
置顶评论在

2.2 获取视频置顶评论

请求方式:GET
请求URL:https://api.bilibili.com/x/v2/reply/main?mode=3&next=0&oid={AV号}&plat=1&seek_rpid=&type=1
示例请求:
https://api.bilibili.com/x/v2/reply/main?mode=3&next=0&oid=841443266&plat=1&seek_rpid=&type=1
置顶评论在 [“data”][“top”] 内

2.3 获取评论的子评论

请求方式:GET
请求URL:https://api.bilibili.com/x/v2/reply/reply?oid={视频AV号}&pn={页码}&ps={显示条数}&root={父评论ID}&type=1
父评论ID要通过 1.3.1 获取,在 [“data”][“replies”][i][“rpid”] 里面

示例请求:https://api.bilibili.com/x/v2/reply/reply?oid=626401766&pn=1&ps=10&root=3201582731&type=1


3.个人信息

3.1 获取个人信息

请求方式:GET
请求URL:https://api.bilibili.com/x/space/acc/info?mid={用户ID}&token=&platform=web&jsonp=jsonp
示例请求:https://api.bilibili.com/x/space/acc/info?mid=488316288&token=&platform=web&jsonp=jsonp
示例返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"mid": 488316288, //用户mid
"name": "芙樱竹", //用户名
"sex": "保密", //用户性别
"face": "https://i0.hdslb.com/bfs/face/78dd6960009d247868f4b17cbac5b86b8d55a804.jpg", //用户头像
"face_nft": 0,
"face_nft_type": 0,
"sign": "我的小破站:iling.cool\n联系邮箱:i@iling.cool", //用户简介(签名)
"rank": 10000,
"level": 4, //用户等级(0-6)
"jointime": 0,
"moral": 0,
"silence": 0,
"coins": 163.1,
"fans_badge": false,
"fans_medal": { //粉丝牌
"show": true, //是否显示
"wear": true,
"medal": {
"uid": 488316288, //用户mid
"target_id": 470962000, //粉丝牌指向UP主的id
"medal_id": 221347, //粉丝牌id
"level": 2, //粉丝牌牌等级
"medal_name": "落九川", //粉丝牌指向UP主的名称
"medal_color": 6067854, //粉丝牌颜色
"intimacy": 103, //亲密度
"next_intimacy": 300, //下一级亲密度
"day_limit": 1500, //每日上限
"medal_color_start": 6067854, //粉丝牌颜色
"medal_color_end": 6067854, //粉丝牌颜色
"medal_color_border": 6067854, //粉丝牌颜色
"is_lighted": 1, //是否点亮
"light_status": 1, //点亮状态
"wearing_status": 1, //佩戴状态
"score": 304 //粉丝牌积分
}
},
"official": { //官方认证
"role": 0,
"title": "",
"desc": "",
"type": -1
},
"vip": { //大会员状态
"type": 1,
"status": 0,
"due_date": 1645113600000,
"vip_pay_type": 0,
"theme_type": 0,
"label": {
"path": "",
"text": "",
"label_theme": "",
"text_color": "",
"bg_style": 0,
"bg_color": "",
"border_color": "",
"use_img_label": true,
"img_label_uri_hans": "",
"img_label_uri_hant": "",
"img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/d7b702ef65a976b20ed854cbd04cb9e27341bb79.png",
"img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/KJunwh19T5.png"
},
"avatar_subscript": 0,
"nickname_color": "",
"role": 0,
"avatar_subscript_url": "",
"tv_vip_status": 0,
"tv_vip_pay_type": 0
},
"pendant": {
"pid": 0,
"name": "",
"image": "",
"expire": 0,
"image_enhance": "",
"image_enhance_frame": ""
},
"nameplate": {
"nid": 0,
"name": "",
"image": "",
"image_small": "",
"level": "",
"condition": ""
},
"user_honour_info": {
"mid": 0,
"colour": null,
"tags": []
},
"is_followed": false,
"top_photo": "http://i2.hdslb.com/bfs/space/70ce28bcbcb4b7d0b4f644b6f082d63a702653c1.png", //用户头图
"theme": {},
"sys_notice": {},
"live_room": null,
"birthday": "01-01", //用户生日
"school": {
"name": "山东政法学院" //用户学校名称
},
"profession": {
"name": "",
"department": "",
"title": "",
"is_show": 0
},
"tags": null,
"series": {
"user_upgrade_status": 3,
"show_upgrade_window": false
},
"is_senior_member": 0,
"mcn_info": null, //MCN机构信息
"gaia_res_type": 0,
"gaia_data": null,
"is_risk": false,
"elec": {
"show_info": {
"show": false,
"state": -1,
"title": "",
"icon": "",
"jump_url": ""
}
}
}
}

3.2 获取用户收藏夹

如为私密收藏夹,需要传入Cookie

请求方式:GET
请求URL:https://api.bilibili.com/x/v3/fav/resource/list?media_id={收藏夹ID}&pn={页码(从1开始)}&ps={每页显示(最大20,默认20)}&keyword=&order=mtime&type=0&tid=0&platform=web&jsonp=jsonp
示例请求:
https://api.bilibili.com/x/v3/fav/resource/list?media_id=1793187988&pn=1&ps=20&keyword=&order=mtime&type=0&tid=0&platform=web&jsonp=jsonp
返回解释:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"info": {
"id": 1793187988, //收藏夹ID
"fid": 17931879,
"mid": 488316288, //收藏夹所属用户ID
"attr": 55,
"title": "🎃 搞笑\u0026整活", //收藏夹标题
"cover": "http://i0.hdslb.com/bfs/archive/4339639b36574d6d8a0c112e3939a9926b212551.jpg", //收藏夹封面
"upper": { //创建人信息
"mid": 488316288, //创建人ID
"name": "芙樱竹", //创建人昵称
"face": "https://i0.hdslb.com/bfs/face/78dd6960009d247868f4b17cbac5b86b8d55a804.jpg", //创建人头像
"followed": false,
"vip_type": 1, //大会员类型(?)
"vip_statue": 0
},
"cover_type": 2,
"cnt_info": {
"collect": 0,
"play": 0,
"thumb_up": 0,
"share": 0
},
"type": 11,
"intro": "收藏无意义、有意义的搞笑视频内容", //收藏夹简介
"ctime": 1665456908,
"mtime": 1665467396,
"state": 0,
"fav_state": 0,
"like_state": 0,
"media_count": 27
},
"medias": [{ //收藏夹视频信息 为了节省篇幅,只保留了一个视频,实际每页最大可以获取到20个
"id": 346460750, //视频ID(AV号)
"type": 2,
"title": "***", //视频标题
"cover": "http://i0.hdslb.com/bfs/archive/4339639b36574d6d8a0c112e3939a9926b212551.jpg", //视频封面
"intro": "-",
"page": 1,
"duration": 6,
"upper": { //视频UP主信息
"mid": 1909537004, //UP主ID
"name": "时间沙漏HOURGLASS", //UP主昵称
"face": "https://i2.hdslb.com/bfs/face/d4726d0ae75eab8bbd5dac779a9849ccaef6ea6b.jpg" //UP主头像
},
"attr": 0,
"cnt_info": { //视频数据
"collect": 1137, //收藏数
"play": 151903, //播放数
"danmaku": 9 //弹幕数
},
"link": "bilibili://video/346460750", //PC端打开链接(应该是为了适配PC客户端)
"ctime": 1665551864,
"pubtime": 1665553132,
"fav_time": 1665721159,
"bv_id": "BV14R4y1R7hk", //BV号
"bvid": "BV14R4y1R7hk", //BV号
"season": null,
"ogv": null,
"ugc": {
"first_cid": 859448779
}
}],
"has_more": true //是否有下一页
}
}

4.主站

4.1 综合热门

请求方式:GET
请求URL:https://api.bilibili.com/x/web-interface/popular?ps={每页数量,默认20}&pn={页数(从1开始)}
请求示例:https://api.bilibili.com/x/web-interface/popular?ps=20&pn=1
返回解释:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"list": [{ //为节省篇幅,只留下了一个视频,实际每页最大可以获取到20个
"aid": 986555749, //视频ID(AV号)
"videos": 1, //视频分P数
"tid": 228, //视频分区ID
"tname": "人文历史", //视频分区名称
"copyright": 1, //1原创,2转载
"pic": "http://i1.hdslb.com/bfs/archive/d76155b3c9d53787338464aebfd62a469317a3e5.jpg", //视频封面
"title": "不懂英语如何刺探英国情报?【硬核狠人40】", //视频名称
"pubdate": 1665716400,
"ctime": 1665647481,
"desc": "本篇为硬核狠人之艾丽萨.巴兹纳。\n\n参考资料:\n巴兹纳回忆录《我是西塞罗》\n马克·西蒙斯2014年出版《西塞罗特工:希特勒最好的间谍》\n理查德·怀斯1999年出版《西塞罗间谍事件:二战中德国获取英国机密》\n杰尔·韦斯特1985年出版《谎言的线索:二战间谍神话》\n亚当·乐博2000年出版《幸存的希特勒:第三帝国的选择、腐败和妥协》\n莫伊奇兹的《西塞罗行动》", //视频简介
"state": 0,
"duration": 1323,
"mission_id": 932586,
"rights": {
"bp": 0,
"elec": 0,
"download": 0,
"movie": 0,
"pay": 0,
"hd5": 1,
"no_reprint": 1,
"autoplay": 1,
"ugc_pay": 0,
"is_cooperation": 0,
"ugc_pay_preview": 0,
"no_background": 0,
"arc_pay": 0,
"pay_free_watch": 0
},
"owner": {
"mid": 23947287, //UP主ID
"name": "小约翰可汗", //UP主名称
"face": "https://i0.hdslb.com/bfs/face/bd779d13855354c275422e6f3eb6f4747e2b19a5.jpg" //UP主头像
},
"stat": { //视频数据
"aid": 986555749, //视频ID(AV号)
"view": 1142245, //播放量
"danmaku": 12005, //弹幕数
"reply": 2235, //评论数
"favorite": 17700, //收藏数
"coin": 47861, //硬币数
"share": 3332, //分享数
"now_rank": 0, //当前排名
"his_rank": 16, //历史最高排名
"like": 120276, //点赞数
"dislike": 0 //点踩数(无意义,不返回数据)
},
"dynamic": "本篇为硬核狠人之艾丽萨.巴兹纳。", //视频动态标题(?)
"cid": 860463974,
"dimension": {
"width": 1920,
"height": 1080,
"rotate": 0
},
"season_id": 3491,
"short_link": "https://b23.tv/BV1R44y1f7Yv", //短链接
"short_link_v2": "https://b23.tv/BV1R44y1f7Yv", //短链接
"first_frame": "http://i0.hdslb.com/bfs/storyff/n221013qn2gdx41myw0vexw86adjdwpb_firsti.jpg", //视频首帧
"pub_location": "上海", //视频发布地点
"bvid": "BV1R44y1f7Yv", //BV号
"season_type": 0,
"is_ogv": false,
"ogv_info": null,
"rcmd_reason": {
"content": "百万播放", //推荐理由(热门理由)
"corner_mark": 0
}
}],
"no_more": false
}
}

4.2 音乐排行

请求方式:GET
请求URL:https://api.bilibili.com/x/copyright-music-publicity/toplist/music_list?list_id=18
返回解释:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"list": [{ //为节省篇幅,只保留了一条数据,实际可返回22条(即全部)
"music_id": "MA427341471440467047", //音乐ID
"music_title": "I Really Want to Stay At Your House", //音乐标题
"singer": "Cyberpunk", //歌手
"album": "Cyberpunk : Edgerunners Soundtrack Vol.1(Ep1+2) (赛博朋克:边缘行者 动画原声带 Vol.1(Ep1+2)) ", //专辑
"mv_aid": 0, //MV视频ID(AV号) 没有为0(应该是)
"mv_bvid": "", //mv视频BV号 没有为空
"mv_cover": "https://i0.hdslb.com/bfs/station_src/music_metadata/fda77a34e9b961347d70daf407af3726.jpg", //歌曲封面
"heat": 7474338, //热度
"rank": 1,
"can_listen": false, //是否可以试听
"recommendation": "",
"creation_aid": 603653728, //来源视频ID(AV号)
"creation_bvid": "BV1LB4y1E7iD", //来源视频BV号
"creation_cover": "http://i0.hdslb.com/bfs/archive/8fa92adcd13d3bdd96f13f6897c6379f007ec3ee.jpg", //来源视频封面
"creation_title": "痛,实在太痛了!Netflix《赛博朋克:边缘行者》官方MV", //来源视频标题
"creation_up": 316955009, //来源视频UP主ID
"creation_nickname": "Netflix影视", //来源视频UP主昵称
"creation_duration": 256,
"creation_play": 980208, //来源视频播放量
"creation_reason": "音乐MV", //来源视频类型(?)
"achievements": ["本期排名持平", "最高排名1"] //buff
}
]
}
}

5.哔哩哔哩公益

公益项目,请勿乱爬!

5.1 公益概览(公益项目个数、总捐款金额、总捐款人数,及首页的项目)

请求方式:GET
请求URL:https://api.bilibili.com/x/charity/index
返回解释:



三张图片就能解释了,这个API很简单

5.2 项目详细信息

请求方式:GET
请求URL:https://api.bilibili.com/x/charity/project/info?uuid={项目ID,在URL中}
请求示例:https://api.bilibili.com/x/charity/project/info?uuid=adda836b6d
返回示例:

5.3 项目详细捐款记录(最近100条)(脱敏)

请求方式:GET
请求URL:https://api.bilibili.com/x/charity/project/donate/list?uuid={项目ID,在URL中}
请求示例:https://api.bilibili.com/x/charity/project/donate/list?uuid=adda836b6d
返回示例:


Author

芙樱竹

Posted on

2022-10-14

Updated on

2024-07-31

Licensed under

Comments

若您使用我站的"评论"功能发表观点,则代表您已阅读并同意遵守 ICUA协议隐私政策
评论内容支持基本 Markdown 语法及部分 HTML 标签;为保证您和其他访客的隐私及安全,所有涉及如图片、视频或网页内嵌等外部资源引用的 HTML及Markdown 标签都会被自动删除,所有链接均会被转换为纯文本格式。