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
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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
{
  "info": {
    "start": {
      "url": "https://api.live.bilibili.com/room/v1/Room/startLive",
      "method": "POST",
      "verify": false,
      "params": {
        "room_id": "int: 房间号",
        "platform": "pc/web/...",
        "area_v2": "int: 直播间新版分区id, 可参考https://github.com/withsalt/BilibiliLiveTools#%E7%9B%B4%E6%92%AD%E5%88%86%E5%8C%BA",
        "csrf,csrf_token": "要给两个"
      },
      "comment": "开始直播"
    },
    "stop": {
      "url": "https://api.live.bilibili.com/room/v1/Room/stopLive",
      "method": "POST",
      "verify": false,
      "params": {
        "room_id": "int: 房间号",
        "platform": "pc/web/...",
        "csrf,csrf_token": "要给两个"
      },
      "comment": "关闭直播"
    },
    "room_play_info": {
      "url": "https://api.live.bilibili.com/xlive/web-room/v1/index/getRoomPlayInfo",
      "method": "GET",
      "verify": false,
      "params": {
        "room_id": "int: 房间号"
      },
      "comment": "获取房间信息(真实房间号,封禁情况等)"
    },
    "danmu_info": {
      "url": "https://api.live.bilibili.com/xlive/web-room/v1/index/getDanmuInfo",
      "method": "GET",
      "verify": true,
      "params": {
        "id": "int: 真实房间号"
      },
      "comment": "获取聊天弹幕服务器配置信息(websocket)"
    },
    "room_info": {
      "url": "https://api.live.bilibili.com/xlive/web-room/v1/index/getInfoByRoom",
      "method": "GET",
      "verify": false,
      "params": {
        "room_id": "int: 真实房间号"
      },
      "comment": "获取直播间信息(标题,简介等)"
    },
    "user_info_in_room": {
      "url": "https://api.live.bilibili.com/xlive/web-room/v1/index/getInfoByUser",
      "method": "GET",
      "verify": true,
      "params": {
        "room_id": "int: 真实房间号"
      },
      "comment": "获取自己在直播间的信息(粉丝勋章等级,直播用户等级等)"
    },
    "area_info": {
      "url": "https://api.live.bilibili.com/room/v1/Area/getList",
      "method": "GET",
      "verify": false,
      "comment": "获取直播间分区信息"
    },
    "user_info": {
      "url": "https://api.live.bilibili.com/xlive/web-ucenter/user/get_user_info",
      "method": "GET",
      "verify": true,
      "comment": "获取直播用户等级等信息"
    },
    "user_guards": {
      "url": "https://api.live.bilibili.com/xlive/web-ucenter/user/guards",
      "method": "GET",
      "verify": true,
      "params": {
        "page": "页码",
        "page_size": "每页数量, 过多可能报错 默认:10"
      },
      "comment": "获取用户开通的大航海列表"
    },
    "bag_list": {
      "url": "https://api.live.bilibili.com/xlive/web-room/v1/gift/bag_list",
      "method": "GET",
      "verify": "true",
      "comment": "获取自己的礼物包裹"
    },
    "dahanghai": {
      "url": "https://api.live.bilibili.com/xlive/app-room/v1/guardTab/topList",
      "method": "GET",
      "verify": false,
      "params": {
        "roomid": "int: 真实房间号",
        "page": "int: 页码",
        "ruid": "int: 全称 room_uid,从 room_play_info 里头的 uid 可以找到",
        "page_size": 29
      },
      "comment": "获取大航海列表"
    },
    "gaonengbang": {
      "url": "https://api.live.bilibili.com/xlive/general-interface/v1/rank/getOnlineGoldRank",
      "method": "GET",
      "verify": false,
      "params": {
        "roomId": "int: 真实房间号",
        "page": "int: 页码",
        "ruid": "int: 全称 room_uid,从 room_play_info 里头的 uid 可以找到",
        "pageSize": 50
      },
      "comment": "获取高能榜"
    },
    "fan_model": {
      "url": "https://api.live.bilibili.com/xlive/app-ucenter/v1/fansMedal/panel",
      "method": "GET",
      "verify": true,
      "params": {
        "roomId": "int: 房间号,不是必须的",
        "page": "int: 页码,不是必须的",
        "target_id": "int: 主播Uid,不是必须的",
        "pageSize": "int: 默认 10 是必须的,否则不返回有效数据"
      },
      "comment": "获取房间的粉丝牌,自己的粉丝牌等数据"
    },
    "live_info": {
      "url": "https://api.live.bilibili.com/xlive/web-ucenter/user/live_info",
      "method": "GET",
      "verify": false,
      "comment": "获取自己粉丝牌,粉丝勋章,大航海等数据"
    },
    "general_info": {
      "url": "https://api.live.bilibili.com/xlive/fuxi-interface/general/half/initial",
      "method": "GET",
      "verify": true,
      "params": {
        "actId": "未知,大航海信息:100061",
        "roomId": "真实房间号",
        "uid": "直播者uid",
        "csrf,csrf_token": "要给两个"
      },
      "comment": "获取自己在当前房间的大航海信息, 是否开通,等级,当前经验,同时可获得自己开通的所有航海日志"
    },
    "update_news": {
      "url": "https://api.live.bilibili.com/xlive/app-blink/v1/index/updateRoomNews",
      "method": "POST",
      "verify": true,
      "params": {
        "roomId": "真实房间号",
        "uid": "直播者uid",
        "content": "内容, 最多60字符",
        "csrf": "csrf",
        "csrf_token": "csrf"
      },
      "comment": "更新房间公告"
    },
    "seven_rank": {
      "url": "https://api.live.bilibili.com/rankdb/v1/RoomRank/webSevenRank",
      "method": "GET",
      "verify": false,
      "params": {
        "roomid": "int: 真实房间号",
        "ruid": "int: 全称 room_uid,从 room_play_info 里头的 uid 可以找到"
      },
      "comment": "获取七日榜"
    },
    "fans_medal_rank": {
      "url": "https://api.live.bilibili.com/rankdb/v1/RoomRank/webMedalRank",
      "method": "GET",
      "verify": false,
      "params": {
        "roomid": "int: 真实房间号",
        "ruid": "int: 全称 room_uid,从 room_play_info 里头的 uid 可以找到"
      },
      "comment": "获取粉丝勋章排行榜"
    },
    "black_list": {
      "url": "https://api.live.bilibili.com/xlive/web-ucenter/v1/banned/GetSilentUserList",
      "method": "POST",
      "verify": true,
      "params": {
        "room_id": "int: 真实房间号",
        "ps": "const int: 1"
      },
      "comment": "获取房间黑名单列表,登录账号需要是该房间房管"
    },
    "room_play_url": {
      "url": "https://api.live.bilibili.com/xlive/web-room/v1/playUrl/playUrl",
      "method": "GET",
      "verify": false,
      "params": {
        "cid": "int: 真实房间号",
        "platform": "const str: web",
        "qn": "int: 清晰度编号,原画 10000,蓝光 400,超清 250,高清 150,流畅 80",
        "https_url_req": "const int: 1",
        "ptype": "const int: 16"
      },
      "comment": "获取房间直播流列表"
    },
    "room_play_info_v2": {
      "url": "https://api.live.bilibili.com/xlive/web-room/v2/index/getRoomPlayInfo",
      "method": "GET",
      "verify": false,
      "params": {
        "room_id": "int: 真实房间号",
        "protocol": "int: 流协议,0 为 FLV 流,1 为 HLS 流。默认:0,1",
        "format": "int: 容器格式,0 为 flv 格式;1 为 ts 格式(仅限 hls 流);2 为 fmp4 格式(仅限 hls 流)。默认:0,2",
        "codec": "int: 视频编码,0 为 avc 编码,1 为 hevc 编码。默认:0,1",
        "qn": "int: 清晰度编号,原画:10000(建议),4K:800,蓝光(杜比):401,蓝光:400,超清:250,高清:150,流畅:80,默认:0",
        "platform": "const str: web",
        "ptype": "const int: 16"
      },
      "comment": "获取房间信息及可用清晰度列表"
    },
    "popular_ticket": {
      "url": "https://api.live.bilibili.com/xlive/general-interface/v1/rank/getUserPopularTicketsNum",
      "method": "GET",
      "verify": true,
      "params": {
        "ruid": "int: 全称 room_uid,从 room_play_info 里头的uid可以找到",
        "source": "const str: live"
      },
      "comment": "获取自己在该直播间的人气票信息"
    },
    "gift_common": {
      "url": "https://api.live.bilibili.com/xlive/web-room/v1/giftPanel/giftData",
      "method": "GET",
      "verify": false,
      "params": {
        "room_id": "int: 显示房间号",
        "platform": "const str: pc",
        "source": "const str: live",
        "area_id": "int: 子分区 ID 可以不用填",
        "area_parent_id": "int: 父分区 ID 可以不用填, 获取分区 ID 可使用 get_area_info 方法"
      },
      "comment": "获取该直播间通用礼物的信息,此 API 只返回 gift_id ,不包含礼物 price 参数"
    },
    "gift_special": {
      "url": "https://api.live.bilibili.com//xlive/web-room/v1/giftPanel/tabRoomGiftList",
      "method": "GET",
      "verify": false,
      "params": {
        "room_id": "int: 显示房间号",
        "platform": "const str: pc",
        "source": "const str: live",
        "tab_id": "int: 礼物tab编号,2 为特权礼物,3 为定制礼物",
        "build": "int: 未知作用, 默认 1",
        "area_id": "int: 子分区 ID 可以不用填",
        "area_parent_id": "int: 父分区 ID 可以不用填, 获取分区id可使用 get_area_info 方法"
      },
      "comment": "获取该直播间特殊礼物的信息"
    },
    "gift_config": {
      "url": "https://api.live.bilibili.com/xlive/web-room/v1/giftPanel/giftConfig",
      "method": "GET",
      "verify": false,
      "params": {
        "room_id": "int: 显示房间号 可以不用填",
        "platform": "const str: pc",
        "source": "const str: live",
        "area_id": "int: 子分区 ID 可以不用填",
        "area_parent_id": "int: 父分区 ID 可以不用填, 获取分区id可使用 get_area_info 方法"
      },
      "comment": "获取所有礼物信息,三个字段可以不用填,但填了有助于减小返回内容的大小,置空返回约 2.7w 行,填了三个对应值返回约 1.4w 行"
    },
    "followers_live_info": {
      "url": "https://api.live.bilibili.com/xlive/app-interface/v1/relation/liveAnchor",
      "method": "GET",
      "verify": false,
      "params": {
        "filterRule": "int: 0 ,未知",
        "need_recommend": "int: 是否接受推荐直播间, 0为不接受, 1为接受"
      },
      "comment": "获取关注列表中正在直播的直播间信息, 包括房间直播热度, 房间名称及标题, 清晰度, 是否官方认证等信息."
    },
    "followers_unlive_info": {
      "url": "https://api.live.bilibili.com/xlive/app-interface/v1/relation/unliveAnchor",
      "method": "GET",
      "verify": false,
      "params": {
        "page": "int: 页码",
        "pagesize": "每页数量,过多可能报错 默认:30"
      },
      "comment": "获取关注列表中未在直播的直播间信息, 包括上次开播时间, 上次开播的类别, 直播间公告, 是否有录播等."
    }
  },
  "operate": {
    "send_danmaku": {
      "url": "https://api.live.bilibili.com/msg/send",
      "method": "POST",
      "verify": true,
      "params": {
        "roomid": "int: 真实房间号",
        "color": "int: 十进制颜色,有权限限制",
        "fontsize": "int: 字体大小,默认 25",
        "mode": "int: 弹幕模式,1 飞行 5 顶部 4 底部",
        "msg": "str: 弹幕信息",
        "rnd": "int: 当前时间戳",
        "bubble": "int: 默认 0,功能不知",
        "reply_mid": "int: uid",
        "csrf,csrf_token": "str: 要给两个"
      },
      "comment": "发送直播间弹幕,有的参数不确定因为自己不搞这块没权限发一些样式的弹幕"
    },
     "send_popular_ticket": {
      "url": "https://api.live.bilibili.com/xlive/general-interface/v1/rank/popularRankFreeScoreIncr",
      "method": "POST",
      "verify": true,
      "params": {
        "ruid": "int: 全称 room_uid,从 room_play_info 里头的 uid 可以找到",
        "csrf,csrf_token": "要给两个",
        "visit_id": "str: 空"
      },
      "comment": "在直播间中赠送所有免费人气票"
    },
    "add_block": {
      "url": "https://api.live.bilibili.com/xlive/web-ucenter/v1/banned/AddSilentUser",
      "method": "POST",
      "verify": true,
      "params": {
        "room_id": "int: 真实房间号",
        "tuid": "int: 封禁用户 UID",
        "mobile_app": "str: 设备类型",
        "visit_id": "str: 空"
      },
      "comment": "封禁用户"
    },
    "del_block": {
      "url": "https://api.live.bilibili.com/xlive/web-ucenter/v1/banned/DelSilentUser",
      "method": "POST",
      "verify": true,
      "params": {
        "room_id": "int: 真实房间号",
        "tuid": "int: 封禁用户 UID"
      },
      "comment": "解封用户"
    },
    "sign_up_dahanghai": {
      "url": "https://api.live.bilibili.com/xlive/activity-interface/v2/userTask/UserTaskSignUp",
      "method": "POST",
      "verify": true,
      "params": {
        "task_id": "int: 任务 id,签到:1447,可能还有别的",
        "uid": "int: 真实房间号",
        "csrf,csrf_token": "要给两个"
      },
      "comment": "航海日志签到"
    },
    "send_gift_from_bag": {
      "url": "https://api.live.bilibili.com/xlive/revenue/v1/gift/sendBag",
      "method": "POST",
      "verify": true,
      "params": {
        "uid": "int: 赠送用户的 UID",
        "bag_id": "int: 礼物包裹的id",
        "gift_id": "int: 礼物id",
        "gift_num": "int: 赠送数量",
        "platform": "const str: pc",
        "send_ruid": "int: 未知作用,默认:0",
        "storm_beat_id": "int: 未知作用,默认:0",
        "price": "int: 礼物单价,背包中的礼物价值默认:0",
        "biz_code": "const str: live",
        "biz_id": "int: room_display_id 房间显示 ID",
        "ruid": "int: 全称 room_uid,从 room_play_info 里头的 UID 可以找到",
        "csrf,csrf_token": "要给两个"
      },
      "comment": "在直播间中赠送包裹中的礼物,包裹信息可用 get_self_bag 方法获取"
    },
    "send_gift_gold": {
      "url": "https://api.live.bilibili.com/xlive/revenue/v1/gift/sendGold",
      "method": "POST",
      "verify": true,
      "params": {
        "uid": "int: 赠送用户的 UID",
        "gift_id": "int: 礼物 ID",
        "ruid": "int: 全称 room_uid,从 room_play_info 里头的uid可以找到",
        "send_ruid": "int: 未知作用,默认:0",
        "gift_num": "int: 赠送数量",
        "coin_type": "const str: gold",
        "bag_id": "int: 0",
        "platform": "const str: pc",
        "biz_code": "const str: Live",
        "biz_id": "int: room_display_id 房间显示 ID",
        "rnd": "int: 当前时间戳",
        "storm_beat_id": "int: 未知作用,默认:0",
        "price": "int: 礼物单价",
        "visit_id": "void: 空",
        "csrf,csrf_token": "要给两个"
      },
      "comment": "在直播间中赠送金瓜子礼物"
    },
    "send_gift_silver": {
      "url": "https://api.live.bilibili.com/xlive/revenue/v1/gift/sendSilver",
      "method": "POST",
      "verify": true,
      "params": {
        "uid": "int: 赠送用户的 UID",
        "gift_id": "int: 礼物 ID 辣条的 ID 为 1",
        "ruid": "int: 全称 room_uid,从 room_play_info 里头的 UID 可以找到",
        "send_ruid": "int: 未知作用,默认:0",
        "gift_num": "int: 赠送数量",
        "coin_type": "const str: silver",
        "bag_id": "int: 0",
        "platform": "const str: pc",
        "biz_code": "const str: Live",
        "biz_id": "int: room_display_id 房间显示id",
        "rnd": "int: 当前时间戳",
        "storm_beat_id": "int: 未知作用,默认:0",
        "price": "int: 礼物单价 辣条单价为100",
        "visit_id": "int: 空",
        "csrf,csrf_token": "要给两个"
      },
      "comment": "在直播间中赠送银瓜子礼物"
    },
    "receive_reward": {
      "url": "https://api.live.bilibili.com/xlive/activity-interface/v2/spec-act/sep-guard/receive/awards",
      "method": "POST",
      "verify": true,
      "params": {
        "ruid": "int: 房间真实id",
        "receive_type": "int: 领取类型, 全部领取:2",
        "csrf,csrf_token": "要给两个"
      },
      "comment": "领取航海日志奖励"
    },
    "create_reserve": {
      "url": "https://api.bilibili.com/x/activity/up/reserve/create",
      "method": "POST",
      "verify": true,
      "data": {
        "type": "int: 2",
        "title": "str: 预约标题",
        "live_plan_start_time": "int: 预约开始时间,时间戳",
        "stime": "int: 预约结束时间,时间戳",
        "from": "int: 1"
      },
      "comment": "创建预约"
    }
  }
}