直播间基本信息

获取直播间信息

https://api.live.bilibili.com/room/v1/Room/get_info

请求方式: GET

URL参数:

参数名类型内容必要性备注
room_idnum直播间号必要可以为短号

json回复:

根对象:

字段类型内容备注
codenum返回值0:成功
1:不存在
messagestr错误信息
msgstr错误信息
dataobj信息本体

data对象:

字段类型内容备注
uidnum主播mid
room_idnum直播间长号
short_idnum直播间短号为0是无短号
attentionnum关注数量
onlinenum观看人数
is_portraitbool是否竖屏
descriptionstr描述
live_statusnum直播状态0:未开播
1:直播中
2:轮播中
area_idnum分区id
parent_area_idnum父分区id
parent_area_namestr父分区名称
old_area_idnum旧版分区id
backgroundstr背景图片链接
titlestr标题
user_coverstr封面
keyframestr关键帧用于网页端悬浮展示
is_strict_roombool未知未知
live_timestr直播开始时间YYYY-MM-DD HH:mm:ss
tagsstr标签','分隔
is_anchornum未知未知
room_silent_typestr禁言状态
room_silent_levelnum禁言等级
room_silent_secondnum禁言时间单位是秒
area_namestr分区名称
pardantsstr未知未知
area_pardantsstr未知未知
hot_wordslist(str)热词
hot_words_statusnum热词状态
verifystr未知未知
new_pendantsobj头像框\大v
up_sessionstr未知
pk_statusnumpk状态
pk_idnumpk id
battle_idnum未知
allow_change_area_timenum
allow_upload_cover_timenum
studio_infoobj

new_pendants对象:

字段类型内容备注
frameobj头像框
mobile_frameobj同上手机版, 结构一致, 可能null
badgeobj大v
mobile_badgeobj同上手机版, 结构一致, 可能null

frame对象:

字段类型内容备注
namestr名称
valuestr
positionnum位置
descstr描述
areanum分区
area_oldnum旧分区
bg_colorstr背景色
bg_picstr背景图
use_old_areabool是否旧分区号

badge对象:

字段类型内容备注
namestr类型v_person: 个人认证(黄)
v_company: 企业认证(蓝)
positionnum位置
valuestr
descstr描述

studio_info对象:

字段类型内容备注
statusnum
master_listarray

示例:

查询直播间room_id=1信息

curl -G 'https://api.live.bilibili.com/room/v1/Room/get_info' \
--data-urlencode 'room_id=1'
查看响应示例:
{
  "code": 0,
  "msg": "ok",
  "message": "ok",
  "data": {
    "uid": 9617619,
    "room_id": 5440,
    "short_id": 1,
    "attention": 11919499,
    "online": 0,
    "is_portrait": false,
    "description": "欢迎加入bilibili《快乐运动研究社》,和B站UP主们一起探讨有关运动的经历感受,解决身体和情绪的“疑难杂症”,寻找适合自己的运动,一起跟练!本期我们一起探讨:运动健身能缓解社交恐惧吗?",
    "live_status": 2,
    "area_id": 145,
    "parent_area_id": 1,
    "parent_area_name": "娱乐",
    "old_area_id": 6,
    "background": "",
    "title": "快乐运动研究社",
    "user_cover": "https://i0.hdslb.com/bfs/live/new_room_cover/96943b8d106a777a34cf796421bb4254163b30e1.jpg",
    "keyframe": "https://i0.hdslb.com/bfs/live-key-frame/keyframe08121926000000005440np0q7a.jpg",
    "is_strict_room": false,
    "live_time": "0000-00-00 00:00:00",
    "tags": "",
    "is_anchor": 0,
    "room_silent_type": "",
    "room_silent_level": 1,
    "room_silent_second": 0,
    "area_name": "视频聊天",
    "pendants": "",
    "area_pendants": "",
    "hot_words": [
      "2333333",
      "喂,妖妖零吗",
      "红红火火恍恍惚惚",
      "FFFFFFFFFF",
      "Yooooooo",
      "啪啪啪啪啪",
      "666666666",
      "老司机带带我",
      "你为什么这么熟练啊",
      "gg",
      "prprpr",
      "向大佬低头",
      "请大家注意弹幕礼仪哦!",
      "还有这种操作!",
      "囍",
      "打call",
      "你气不气?",
      "队友呢?"
    ],
    "hot_words_status": 0,
    "verify": "",
    "new_pendants": {
      "frame": {
        "name": "",
        "value": "",
        "position": 0,
        "desc": "",
        "area": 0,
        "area_old": 0,
        "bg_color": "",
        "bg_pic": "",
        "use_old_area": false
      },
      "badge": {
        "name": "v_company",
        "position": 3,
        "value": "",
        "desc": "哔哩哔哩直播官方账号"
      },
      "mobile_frame": {
        "name": "",
        "value": "",
        "position": 0,
        "desc": "",
        "area": 0,
        "area_old": 0,
        "bg_color": "",
        "bg_pic": "",
        "use_old_area": false
      },
      "mobile_badge": null
    },
    "up_session": "",
    "pk_status": 0,
    "pk_id": 0,
    "battle_id": 0,
    "allow_change_area_time": 0,
    "allow_upload_cover_time": 0,
    "studio_info": {
      "status": 0,
      "master_list": []
    }
  }
}

获取用户对应的直播间状态

https://api.live.bilibili.com/room/v1/Room/getRoomInfoOld

请求方式:GET

url参数:

参数名类型内容必要性备注
midnum目标用户mid必要

json回复:

根对象:

字段类型内容备注
codenum返回值0:成功
-400:请求错误
messagestr错误信息默认为0
ttlnum1
dataobj信息本体

data对象:

字段类型内容备注
roomStatusnum直播间状态0:无房间
1:有房间
roundStatusnum轮播状态0:未轮播
1:轮播
live_statusnum直播状态0:未开播
1:直播中
urlstr直播间网页url
titlestr直播间标题
coverstr直播间封面url
onlinenum直播间人气值为上次直播时刷新
roomidnum直播间id(短号)
broadcast_typenum0
online_hiddennum0

示例:

查询用户mid=322892的直播间信息

curl -G 'https://api.live.bilibili.com/room/v1/Room/getRoomInfoOld' \
--data-urlencode 'mid=322892'
查看响应示例:
{
  "code": 0,
  "message": "0",
  "ttl": 1,
  "data": {
    "roomStatus": 1,
    "roundStatus": 0,
    "live_status": 1,
    "url": "https://live.bilibili.com/5441",
    "title": "好久没当黑铁主播了",
    "cover": "http://i0.hdslb.com/bfs/live/room_cover/833f7ff506bac17c06010e8834922993657505b2.jpg",
    "online": 268602,
    "roomid": 5441,
    "broadcast_type": 0,
    "online_hidden": 0
  }
}

获取房间页初始化信息

https://api.live.bilibili.com/room/v1/Room/room_init

请求方式:GET

url参数:

参数名类型内容必要性备注
idnum目标直播间号(短号)必要

json回复:

根对象:

字段类型内容备注
codenum返回值0:成功
60004:直播间不存在
msgstr错误信息默认为ok
messagestr错误信息默认为ok
dataobj信息本体

data对象:

字段类型内容备注
room_idnum直播间真实id
short_idnum直播间id(短号)
uidnum主播用户mid
need_p2pnum是否p2p
is_hiddenbool是否隐藏
is_lockedbool是否锁定
is_portraitbool是否竖屏
live_statusnum直播状态0:未开播
1:直播中
2:轮播中
hidden_tillnum隐藏时间戳
lock_tillnum锁定时间戳
encryptedbool是否加密
pwd_verifiedbool加密房间是否通过密码验证encrypted=true时才有意义
live_timenum开播时间未开播时为-62170012800
room_shieldnum未知
is_spnum是否为特殊直播间0:普通直播间
1:付费直播间
special_typenum特殊直播间标志0:普通直播间
1:付费直播间
2:拜年祭直播间

示例:

查询直播间id=76的直播间信息

curl -G 'https://api.live.bilibili.com/room/v1/Room/room_init' \
--data-urlencode 'id=76'
查看响应示例:
{
  "code": 0,
  "msg": "ok",
  "message": "ok",
  "data": {
    "room_id": 14073662,
    "short_id": 76,
    "uid": 50333369,
    "need_p2p": 0,
    "is_hidden": false,
    "is_locked": false,
    "is_portrait": false,
    "live_status": 1,
    "hidden_till": 0,
    "lock_till": 0,
    "encrypted": false,
    "pwd_verified": false,
    "live_time": 1602151186,
    "room_shield": 1,
    "is_sp": 0,
    "special_type": 0
  }
}

获取主播信息

https://api.live.bilibili.com/live_user/v1/Master/info

请求方式:GET

url参数:

参数名类型内容必要性备注
uidnum目标用户mid必要

json回复:

根对象:

字段类型内容备注
codenum返回值0:成功
1:参数错误
msgstr错误信息默认为空
messagestr错误信息默认为空
dataobj信息本体

data对象:

字段类型内容备注
infoobj主播信息
expobj经验等级
follower_numnum主播粉丝数
room_idnum直播间id(短号)
medal_namestr粉丝勋章名
glory_countnum主播荣誉数
pendantstr直播间头像框url
link_group_numnum0作用尚不明确
room_newsobj主播公告

info对象:

字段类型内容备注
uidnum主播mid
unamestr主播用户名
facestr主播头像url
official_verifyobj认证信息
gendernum主播性别-1:保密
0:女
1:男

info中的official_verify对象:

字段类型内容备注
typenum主播认证类型-1:无
0:个人认证
1:机构认证
descstr主播认证信息

exp对象:

字段类型内容备注
master_levelobj主播等级

exp中的master_level对象:

字段类型内容备注
levelnum当前等级
colornum等级框颜色
currentarray当前等级信息
nextarray下一等级信息

master_level中的current数组:

类型内容备注
0num升级积分
1num总积分

master_level中的next数组:

类型内容备注
0num升级积分
1num总积分

room_news对象:

字段类型内容备注
contentstr公告内容
ctimestr公告时间
ctime_textstr公告日期

示例:

查询直播间mid=2的主播信息

curl -G 'https://api.live.bilibili.com/live_user/v1/Master/info' \
--data-urlencode 'uid=2'
查看响应示例:
{
  "code": 0,
  "msg": "",
  "message": "",
  "data": {
    "info": {
      "uid": 2,
      "uname": "碧诗",
      "face": "https://i0.hdslb.com/bfs/face/ef0457addb24141e15dfac6fbf45293ccf1e32ab.jpg",
      "official_verify": {
        "type": 0,
        "desc": "bilibili个人认证:bilibili创始人(站长)"
      },
      "gender": 1
    },
    "exp": {
      "master_level": {
        "level": 30,
        "color": 10512625,
        "current": [
          2870000,
          11883810
        ],
        "next": [
          3730000,
          15613810
        ]
      }
    },
    "follower_num": 926624,
    "room_id": 1024,
    "medal_name": "逸国",
    "glory_count": 0,
    "pendant": "",
    "link_group_num": 0,
    "room_news": {
      "content": "",
      "ctime": "",
      "ctime_text": ""
    }
  }
}

获取直播间基本信息

https://api.live.bilibili.com/xlive/web-room/v1/index/getRoomBaseInfo

请求方式: GET

URL参数:

参数名类型内容必要性备注
req_bizstrweb_room_componet必要
room_idsnum直播间短ID不必要多个重复该参数即可

JSON回复:

根对象:

字段类型内容备注
codenum返回值0: 成功
-400: 请求错误
messagestr错误信息默认为 0
ttlnum1
dataobj信息本体

data对象:

字段类型内容备注
by_uidsobj
by_room_idsobj直播间信息

data中的by_room_ids对象:

以直播间长ID为键, 直播间信息为值的, 按键名降序排序

by_room_ids中的值对象:

字段类型内容备注
room_idnum直播间长ID
uidnum主播用户mid
area_idnum直播间分区ID
live_statusnum直播状态0: 未开播
1: 直播中
2: 轮播中
live_urlstr直播间网页url
parent_area_idnum直播间父分区ID
titlestr直播间标题
parent_area_namestr直播间父分区名称
area_namestr直播间分区名称
live_timestr开播时间yyyy-MM-dd HH:mm:ss
descriptionstr直播间简介
tagsstr直播间标签, 分隔
attentionnum关注数
onlinenum在线人数
short_idnum直播间短ID为0是无短号
unamestr主播用户名
coverstr直播间封面url
backgroundstr直播间背景url
join_slidenum1
live_idnum0
live_id_strstr"0"

示例:

curl -G 'https://api.live.bilibili.com/xlive/web-room/v1/index/getRoomBaseInfo' \
--url-query 'req_biz=web_room_componet' \
--url-query 'room_ids=1' \
--url-query 'room_ids=3
查看响应示例:
{
  "code": 0,
  "message": "0",
  "ttl": 1,
  "data": {
    "by_uids": {},
    "by_room_ids": {
      "23058": {
        "room_id": 23058,
        "uid": 11153765,
        "area_id": 190,
        "live_status": 0,
        "live_url": "https://live.bilibili.com/23058",
        "parent_area_id": 5,
        "title": "哔哩哔哩音悦台",
        "parent_area_name": "电台",
        "area_name": "唱见电台",
        "live_time": "0000-00-00 00:00:00",
        "description": "<p>这里是哔哩哔哩官方音乐台喔!</p><p>一起来听音乐吧ε=ε=(ノ≧∇≦)ノ</p><p>没想到蒸汽配圣诞下装,意外的很暴露呢=3=</p>\n",
        "tags": "",
        "attention": 225431,
        "online": 0,
        "short_id": 3,
        "uname": "3号直播间",
        "cover": "",
        "background": "https://i0.hdslb.com/bfs/live/2836bb7b84c792e2c6aadfd4d1cce13484775fa3.jpg",
        "join_slide": 1,
        "live_id": 0,
        "live_id_str": "0"
      },
      "5440": {
        "room_id": 5440,
        "uid": 9617619,
        "area_id": 701,
        "live_status": 2,
        "live_url": "https://live.bilibili.com/5440",
        "parent_area_id": 11,
        "title": "华为nova Flip新生之夜",
        "parent_area_name": "知识",
        "area_name": "科技·科学",
        "live_time": "0000-00-00 00:00:00",
        "description": "<p>华为novaFlip新生之夜正在直播中!备案号:Z0910417240818001<br></p>",
        "tags": "",
        "attention": 17848313,
        "online": 0,
        "short_id": 1,
        "uname": "哔哩哔哩直播",
        "cover": "http://i0.hdslb.com/bfs/live/1a862058e4211a5e73a8a1bf0635953ea08a4091.jpg",
        "background": "http://i0.hdslb.com/bfs/live/ec518ede15d4c2547c83cb59f14752450c0889b0.jpg",
        "join_slide": 1,
        "live_id": 0,
        "live_id_str": "0"
      }
    }
  }
}

批量查询直播间状态

https://api.live.bilibili.com/room/v1/Room/get_status_info_by_uids

请求方式:GET/POST

认证方式:无 (无需添加Cookie)

url参数 (GET方式):

参数名类型内容必要性备注
uids[]array要查询的主播 mid必要

正文参数 (POST方式):

参数名类型内容必要性备注
uidsnums要查询的主播 mid必要

json回复:

根对象:

字段类型内容备注
codenum返回值0:成功
-111:csrf校验失败
messagestr错误信息默认为success
msgstr错误信息默认为success
ttlnum1
dataobj信息本体

data对象:

字段类型内容备注
uidstr直播间信息实际字段为主播mid

uid对象:

字段类型内容备注
titlestr直播间标题
room_idnum直播间房间号直播间实际房间号
uidnum主播mid
onlinenum直播间在线人数
live_timenum开播时间戳,单位秒,未开播时为0
live_statusnum直播间开播状态0:未开播
1:正在直播
2:轮播中
short_idnum直播间房间号直播间短房间号,常见于签约主播
areanum直播间分区id
area_namestr直播间分区名
area_v2_idnum直播间新版分区id
area_v2_namestr直播间新版分区名
area_v2_parent_idnum直播间父分区id
area_v2_parent_namestr直播间父分区名
unamestr主播用户名
facestr主播头像url
tag_namestr直播间标签
tagsstr直播间自定标签
cover_from_userstr直播间封面url
keyframestr直播间关键帧url
lock_tillstr直播间封禁信息
hidden_tillstr直播间隐藏信息
broadcast_typenum直播类型0:普通直播
1:手机直播

示例:

查询用户mid=672328094的直播间信息

# GET方式
curl -G 'https://api.live.bilibili.com/room/v1/Room/get_status_info_by_uids'
--data-urlencode 'uids[]=672328094'

# POST方式
curl 'https://api.live.bilibili.com/room/v1/Room/get_status_info_by_uids' \
-H "Content-Type: application/json" \
-d "{\"uids\": [672328094]}" 
查看响应示例:
{
  "code": 0,
  "msg": "success",
  "message": "success",
  "data": {
    "672328094": {
      "title": "【B限】玩个毛线",
      "room_id": 22637261,
      "uid": 672328094,
      "online": 4087370,
      "live_time": 0,
      "live_status": 2,
      "short_id": 0,
      "area": 6,
      "area_name": "生活娱乐",
      "area_v2_id": 371,
      "area_v2_name": "虚拟主播",
      "area_v2_parent_name": "虚拟主播",
      "area_v2_parent_id": 9,
      "uname": "嘉然今天吃什么",
      "face": "http://i2.hdslb.com/bfs/face/d399d6f5cf7943a996ae96999ba3e6ae2a2988de.jpg",
      "tag_name": "日常,学习,萌宠,厨艺,手机直播",
      "tags": "",
      "cover_from_user": "http://i0.hdslb.com/bfs/live/new_room_cover/f3ed7a782c13086e536ec8bc6e9593bb4918f905.jpg",
      "keyframe": "http://i0.hdslb.com/bfs/live-key-frame/keyframe041722000000226372619dr3m8.jpg",
      "lock_till": "0000-00-00 00:00:00",
      "hidden_till": "0000-00-00 00:00:00",
      "broadcast_type": 0
    }
  }
}

获取直播间最近历史弹幕

https://api.live.bilibili.com/xlive/web-room/v1/dM/gethistory

请求方式: GET

注: 该接口部分返回信息不明, 仅供参考, 来源 cv8186413open in new window

URL参数:

参数名类型内容必要性备注
roomidnum直播间短ID必要

JSON回复:

根对象:

字段类型内容备注
codenum返回值0: 成功
-400: 请求错误
messagestr错误信息默认为空
msgstr仅请求成功时存在
ttlnum1仅请求失败时存在
dataobj信息本体

data对象:

字段类型内容备注
adminarray管理员最新的10条弹幕消息格式与room相同
roomarray普通用户的10条弹幕信息格式与admin相同

data中的任意数组中的对象:

字段类型内容备注
textstr弹幕内容
dm_typenum弹幕类型
uidnum弹幕发送者的UID
nicknamestr弹幕发送者的昵称
uname_colorstr弹幕发送者的颜色?
timelinestr弹幕发送时间格式为yyyy-MM-dd HH:mm:ss
isadminnum是否为管理员
vipnum是否为VIP?
svipnum是否为SVIP?
medalarray粉丝勋章信息?格式不明
titlearray标题?格式不明
user_levelarray用户等级信息?格式不明
ranknum排名?用户空间详细信息
teamidnum
rndstr发送时间?UNIX 秒级时间戳
user_title用户标题?格式不明
guard_level
bubble
bubble_color
lpl
yeah_space_url
jump_to_url
check_infoobj弹幕审核信息?
voice_dm_infoobj语音弹幕信息?
emoticonobj表情信息?
emotsnull
id_strstr弹幕ID?
wealth_levelnum财富等级?
bubble_id_v2num
replyobj
group_medalnull
userobj该用户信息

data对象中的user对象:

字段类型内容备注
uidnum用户 mid
baseobj用户基本信息
medalnull
wealthnull
titleobj用户标题?
guardnull
uhead_framenull
guard_leaderobj

data对象中的user对象中的base对象:

字段类型内容备注
namestr用户名
facestr用户头像 url
name_colornum用户名颜色?
is_mysterybool是否为神秘用户?
risk_ctrl_infonull
origin_infoobj原始信息?
official_infoobj认证信息
name_color_strstr

示例:

curl -G 'https://api.live.bilibili.com/xlive/web-room/v1/dM/gethistory' \
--url-query 'roomid=1'
查看响应示例:
{
  "code": 0,
  "data": {
    "admin": [],
    "room": [
      {
        "text": "‫",
        "dm_type": 0,
        "uid": 20276964,
        "nickname": "咸菜拉面",
        "uname_color": "",
        "timeline": "2024-08-15 05:05:06",
        "isadmin": 0,
        "vip": 0,
        "svip": 0,
        "medal": [
          27,
          "小孩梓",
          "阿梓从小就很可爱",
          80397,
          398668,
          "",
          0,
          6809855,
          398668,
          6850801,
          3,
          1,
          7706705
        ],
        "title": [
          "title-86-1",
          "title-86-1"
        ],
        "user_level": [
          59,
          0,
          16752445,
          931
        ],
        "rank": 10000,
        "teamid": 0,
        "rnd": "1723669505",
        "user_title": "title-86-1",
        "guard_level": 0,
        "bubble": 0,
        "bubble_color": "",
        "lpl": 0,
        "yeah_space_url": "",
        "jump_to_url": "",
        "check_info": {
          "ts": 1723669506,
          "ct": "18434F3D"
        },
        "voice_dm_info": {
          "voice_url": "",
          "file_format": "",
          "text": "",
          "file_duration": 0,
          "file_id": ""
        },
        "emoticon": {
          "id": 0,
          "emoticon_unique": "",
          "text": "",
          "perm": 0,
          "url": "",
          "in_player_area": 0,
          "bulge_display": 0,
          "is_dynamic": 0,
          "height": 0,
          "width": 0
        },
        "emots": null,
        "id_str": "74368f428dfaec806cd205e62866bd1c45",
        "wealth_level": 37,
        "bubble_id_v2": 0,
        "reply": {
          "show_reply": true,
          "reply_mid": 0,
          "reply_uname": "",
          "reply_uname_color": "",
          "reply_is_mystery": false
        },
        "group_medal": null,
        "user": {
          "uid": 20276964,
          "base": {
            "name": "咸菜拉面",
            "face": "https://i0.hdslb.com/bfs/face/182b73f6b6274fcee7491219f511b1748c4bc712.jpg",
            "name_color": 0,
            "is_mystery": false,
            "risk_ctrl_info": null,
            "origin_info": {
              "name": "咸菜拉面",
              "face": "https://i0.hdslb.com/bfs/face/182b73f6b6274fcee7491219f511b1748c4bc712.jpg"
            },
            "official_info": {
              "role": 0,
              "title": "",
              "desc": "",
              "type": -1
            },
            "name_color_str": ""
          },
          "medal": {
            "name": "小孩梓",
            "level": 27,
            "color_start": 398668,
            "color_end": 6850801,
            "color_border": 6809855,
            "color": 398668,
            "id": 13139,
            "typ": 0,
            "is_light": 1,
            "ruid": 7706705,
            "guard_level": 3,
            "score": 50112778,
            "guard_icon": "https://i0.hdslb.com/bfs/live/143f5ec3003b4080d1b5f817a9efdca46d631945.png",
            "honor_icon": "",
            "v2_medal_color_start": "#4775EFCC",
            "v2_medal_color_end": "#4775EFCC",
            "v2_medal_color_border": "#58A1F8FF",
            "v2_medal_color_text": "#FFFFFFFF",
            "v2_medal_color_level": "#000B7099",
            "user_receive_count": 0
          },
          "wealth": null,
          "title": {
            "old_title_css_id": "title-86-1",
            "title_css_id": "title-86-1"
          },
          "guard": null,
          "uhead_frame": null,
          "guard_leader": {
            "is_guard_leader": false
          }
        }
      },
      {
        "text": "‫",
        "dm_type": 0,
        "uid": 20276964,
        "nickname": "咸菜拉面",
        "uname_color": "",
        "timeline": "2024-08-16 05:05:06",
        "isadmin": 0,
        "vip": 0,
        "svip": 0,
        "medal": [
          27,
          "小孩梓",
          "阿梓从小就很可爱",
          80397,
          398668,
          "",
          0,
          6809855,
          398668,
          6850801,
          3,
          1,
          7706705
        ],
        "title": [
          "title-86-1",
          "title-86-1"
        ],
        "user_level": [
          59,
          0,
          16752445,
          931
        ],
        "rank": 10000,
        "teamid": 0,
        "rnd": "1723755905",
        "user_title": "title-86-1",
        "guard_level": 0,
        "bubble": 0,
        "bubble_color": "",
        "lpl": 0,
        "yeah_space_url": "",
        "jump_to_url": "",
        "check_info": {
          "ts": 1723755906,
          "ct": "F65D229F"
        },
        "voice_dm_info": {
          "voice_url": "",
          "file_format": "",
          "text": "",
          "file_duration": 0,
          "file_id": ""
        },
        "emoticon": {
          "id": 0,
          "emoticon_unique": "",
          "text": "",
          "perm": 0,
          "url": "",
          "in_player_area": 0,
          "bulge_display": 0,
          "is_dynamic": 0,
          "height": 0,
          "width": 0
        },
        "emots": null,
        "id_str": "7f3bb90826ad642012a31368f266be6d2",
        "wealth_level": 37,
        "bubble_id_v2": 0,
        "reply": {
          "show_reply": true,
          "reply_mid": 0,
          "reply_uname": "",
          "reply_uname_color": "",
          "reply_is_mystery": false
        },
        "group_medal": null,
        "user": {
          "uid": 20276964,
          "base": {
            "name": "咸菜拉面",
            "face": "https://i0.hdslb.com/bfs/face/182b73f6b6274fcee7491219f511b1748c4bc712.jpg",
            "name_color": 0,
            "is_mystery": false,
            "risk_ctrl_info": null,
            "origin_info": {
              "name": "咸菜拉面",
              "face": "https://i0.hdslb.com/bfs/face/182b73f6b6274fcee7491219f511b1748c4bc712.jpg"
            },
            "official_info": {
              "role": 0,
              "title": "",
              "desc": "",
              "type": -1
            },
            "name_color_str": ""
          },
          "medal": {
            "name": "小孩梓",
            "level": 27,
            "color_start": 398668,
            "color_end": 6850801,
            "color_border": 6809855,
            "color": 398668,
            "id": 13139,
            "typ": 0,
            "is_light": 1,
            "ruid": 7706705,
            "guard_level": 3,
            "score": 50112778,
            "guard_icon": "https://i0.hdslb.com/bfs/live/143f5ec3003b4080d1b5f817a9efdca46d631945.png",
            "honor_icon": "",
            "v2_medal_color_start": "#4775EFCC",
            "v2_medal_color_end": "#4775EFCC",
            "v2_medal_color_border": "#58A1F8FF",
            "v2_medal_color_text": "#FFFFFFFF",
            "v2_medal_color_level": "#000B7099",
            "user_receive_count": 0
          },
          "wealth": null,
          "title": {
            "old_title_css_id": "title-86-1",
            "title_css_id": "title-86-1"
          },
          "guard": null,
          "uhead_frame": null,
          "guard_leader": {
            "is_guard_leader": false
          }
        }
      },
      {
        "text": "好帅",
        "dm_type": 0,
        "uid": 3546708493469870,
        "nickname": "aodun1",
        "uname_color": "",
        "timeline": "2024-08-16 22:33:28",
        "isadmin": 0,
        "vip": 0,
        "svip": 0,
        "medal": [],
        "title": [
          "",
          ""
        ],
        "user_level": [
          0,
          0,
          9868950,
          ">50000"
        ],
        "rank": 10000,
        "teamid": 0,
        "rnd": "1723811729",
        "user_title": "",
        "guard_level": 0,
        "bubble": 0,
        "bubble_color": "",
        "lpl": 0,
        "yeah_space_url": "",
        "jump_to_url": "",
        "check_info": {
          "ts": 1723818808,
          "ct": "1B75FB"
        },
        "voice_dm_info": {
          "voice_url": "",
          "file_format": "",
          "text": "",
          "file_duration": 0,
          "file_id": ""
        },
        "emoticon": {
          "id": 0,
          "emoticon_unique": "",
          "text": "",
          "perm": 0,
          "url": "",
          "in_player_area": 0,
          "bulge_display": 0,
          "is_dynamic": 0,
          "height": 0,
          "width": 0
        },
        "emots": null,
        "id_str": "088336a59eb277942ee353dd6666bf6347",
        "wealth_level": 0,
        "bubble_id_v2": 0,
        "reply": {
          "show_reply": true,
          "reply_mid": 0,
          "reply_uname": "",
          "reply_uname_color": "",
          "reply_is_mystery": false
        },
        "group_medal": null,
        "user": {
          "uid": 3546708493469870,
          "base": {
            "name": "aodun1",
            "face": "https://i2.hdslb.com/bfs/face/6fb05f895d854e68419d45eef2c2e272b04ad25f.jpg",
            "name_color": 0,
            "is_mystery": false,
            "risk_ctrl_info": null,
            "origin_info": {
              "name": "aodun1",
              "face": "https://i2.hdslb.com/bfs/face/6fb05f895d854e68419d45eef2c2e272b04ad25f.jpg"
            },
            "official_info": {
              "role": 0,
              "title": "",
              "desc": "",
              "type": -1
            },
            "name_color_str": ""
          },
          "medal": null,
          "wealth": null,
          "title": {
            "old_title_css_id": "",
            "title_css_id": ""
          },
          "guard": null,
          "uhead_frame": null,
          "guard_leader": {
            "is_guard_leader": false
          }
        }
      },
      {
        "text": "好帅",
        "dm_type": 0,
        "uid": 3546708493469870,
        "nickname": "aodun1",
        "uname_color": "",
        "timeline": "2024-08-16 22:35:16",
        "isadmin": 0,
        "vip": 0,
        "svip": 0,
        "medal": [],
        "title": [
          "",
          ""
        ],
        "user_level": [
          0,
          0,
          9868950,
          ">50000"
        ],
        "rank": 10000,
        "teamid": 0,
        "rnd": "1723811729",
        "user_title": "",
        "guard_level": 0,
        "bubble": 0,
        "bubble_color": "",
        "lpl": 0,
        "yeah_space_url": "",
        "jump_to_url": "",
        "check_info": {
          "ts": 1723818916,
          "ct": "D6ABF2E7"
        },
        "voice_dm_info": {
          "voice_url": "",
          "file_format": "",
          "text": "",
          "file_duration": 0,
          "file_id": ""
        },
        "emoticon": {
          "id": 0,
          "emoticon_unique": "",
          "text": "",
          "perm": 0,
          "url": "",
          "in_player_area": 0,
          "bulge_display": 0,
          "is_dynamic": 0,
          "height": 0,
          "width": 0
        },
        "emots": null,
        "id_str": "6f421255746f5d8e4731fdadac66bf6356",
        "wealth_level": 0,
        "bubble_id_v2": 0,
        "reply": {
          "show_reply": true,
          "reply_mid": 0,
          "reply_uname": "",
          "reply_uname_color": "",
          "reply_is_mystery": false
        },
        "group_medal": null,
        "user": {
          "uid": 3546708493469870,
          "base": {
            "name": "aodun1",
            "face": "https://i2.hdslb.com/bfs/face/6fb05f895d854e68419d45eef2c2e272b04ad25f.jpg",
            "name_color": 0,
            "is_mystery": false,
            "risk_ctrl_info": null,
            "origin_info": {
              "name": "aodun1",
              "face": "https://i2.hdslb.com/bfs/face/6fb05f895d854e68419d45eef2c2e272b04ad25f.jpg"
            },
            "official_info": {
              "role": 0,
              "title": "",
              "desc": "",
              "type": -1
            },
            "name_color_str": ""
          },
          "medal": null,
          "wealth": null,
          "title": {
            "old_title_css_id": "",
            "title_css_id": ""
          },
          "guard": null,
          "uhead_frame": null,
          "guard_leader": {
            "is_guard_leader": false
          }
        }
      },
      {
        "text": "好帅",
        "dm_type": 0,
        "uid": 3546708493469870,
        "nickname": "aodun1",
        "uname_color": "",
        "timeline": "2024-08-16 22:36:51",
        "isadmin": 0,
        "vip": 0,
        "svip": 0,
        "medal": [],
        "title": [
          "",
          ""
        ],
        "user_level": [
          0,
          0,
          9868950,
          ">50000"
        ],
        "rank": 10000,
        "teamid": 0,
        "rnd": "1723811729",
        "user_title": "",
        "guard_level": 0,
        "bubble": 0,
        "bubble_color": "",
        "lpl": 0,
        "yeah_space_url": "",
        "jump_to_url": "",
        "check_info": {
          "ts": 1723819011,
          "ct": "1B6978C1"
        },
        "voice_dm_info": {
          "voice_url": "",
          "file_format": "",
          "text": "",
          "file_duration": 0,
          "file_id": ""
        },
        "emoticon": {
          "id": 0,
          "emoticon_unique": "",
          "text": "",
          "perm": 0,
          "url": "",
          "in_player_area": 0,
          "bulge_display": 0,
          "is_dynamic": 0,
          "height": 0,
          "width": 0
        },
        "emots": null,
        "id_str": "270f5a2ac69c5904617873cc4666bf640",
        "wealth_level": 0,
        "bubble_id_v2": 0,
        "reply": {
          "show_reply": true,
          "reply_mid": 0,
          "reply_uname": "",
          "reply_uname_color": "",
          "reply_is_mystery": false
        },
        "group_medal": null,
        "user": {
          "uid": 3546708493469870,
          "base": {
            "name": "aodun1",
            "face": "https://i2.hdslb.com/bfs/face/6fb05f895d854e68419d45eef2c2e272b04ad25f.jpg",
            "name_color": 0,
            "is_mystery": false,
            "risk_ctrl_info": null,
            "origin_info": {
              "name": "aodun1",
              "face": "https://i2.hdslb.com/bfs/face/6fb05f895d854e68419d45eef2c2e272b04ad25f.jpg"
            },
            "official_info": {
              "role": 0,
              "title": "",
              "desc": "",
              "type": -1
            },
            "name_color_str": ""
          },
          "medal": null,
          "wealth": null,
          "title": {
            "old_title_css_id": "",
            "title_css_id": ""
          },
          "guard": null,
          "uhead_frame": null,
          "guard_leader": {
            "is_guard_leader": false
          }
        }
      },
      {
        "text": "好帅",
        "dm_type": 0,
        "uid": 3546708493469870,
        "nickname": "aodun1",
        "uname_color": "",
        "timeline": "2024-08-16 22:39:01",
        "isadmin": 0,
        "vip": 0,
        "svip": 0,
        "medal": [],
        "title": [
          "",
          ""
        ],
        "user_level": [
          0,
          0,
          9868950,
          ">50000"
        ],
        "rank": 10000,
        "teamid": 0,
        "rnd": "1723811729",
        "user_title": "",
        "guard_level": 0,
        "bubble": 0,
        "bubble_color": "",
        "lpl": 0,
        "yeah_space_url": "",
        "jump_to_url": "",
        "check_info": {
          "ts": 1723819141,
          "ct": "143613AF"
        },
        "voice_dm_info": {
          "voice_url": "",
          "file_format": "",
          "text": "",
          "file_duration": 0,
          "file_id": ""
        },
        "emoticon": {
          "id": 0,
          "emoticon_unique": "",
          "text": "",
          "perm": 0,
          "url": "",
          "in_player_area": 0,
          "bulge_display": 0,
          "is_dynamic": 0,
          "height": 0,
          "width": 0
        },
        "emots": null,
        "id_str": "002ebbdc402b3d625052865f7b66bf6469",
        "wealth_level": 0,
        "bubble_id_v2": 0,
        "reply": {
          "show_reply": true,
          "reply_mid": 0,
          "reply_uname": "",
          "reply_uname_color": "",
          "reply_is_mystery": false
        },
        "group_medal": null,
        "user": {
          "uid": 3546708493469870,
          "base": {
            "name": "aodun1",
            "face": "https://i2.hdslb.com/bfs/face/6fb05f895d854e68419d45eef2c2e272b04ad25f.jpg",
            "name_color": 0,
            "is_mystery": false,
            "risk_ctrl_info": null,
            "origin_info": {
              "name": "aodun1",
              "face": "https://i2.hdslb.com/bfs/face/6fb05f895d854e68419d45eef2c2e272b04ad25f.jpg"
            },
            "official_info": {
              "role": 0,
              "title": "",
              "desc": "",
              "type": -1
            },
            "name_color_str": ""
          },
          "medal": null,
          "wealth": null,
          "title": {
            "old_title_css_id": "",
            "title_css_id": ""
          },
          "guard": null,
          "uhead_frame": null,
          "guard_leader": {
            "is_guard_leader": false
          }
        }
      },
      {
        "text": "赚麻了 哈哈",
        "dm_type": 0,
        "uid": 243082910,
        "nickname": "可人的樱花",
        "uname_color": "",
        "timeline": "2024-08-17 01:00:49",
        "isadmin": 0,
        "vip": 0,
        "svip": 0,
        "medal": [],
        "title": [
          "",
          ""
        ],
        "user_level": [
          0,
          0,
          9868950,
          ">50000"
        ],
        "rank": 10000,
        "teamid": 0,
        "rnd": "1723379161",
        "user_title": "",
        "guard_level": 0,
        "bubble": 0,
        "bubble_color": "",
        "lpl": 0,
        "yeah_space_url": "",
        "jump_to_url": "",
        "check_info": {
          "ts": 1723827649,
          "ct": "3917D4D7"
        },
        "voice_dm_info": {
          "voice_url": "",
          "file_format": "",
          "text": "",
          "file_duration": 0,
          "file_id": ""
        },
        "emoticon": {
          "id": 0,
          "emoticon_unique": "",
          "text": "",
          "perm": 0,
          "url": "",
          "in_player_area": 0,
          "bulge_display": 0,
          "is_dynamic": 0,
          "height": 0,
          "width": 0
        },
        "emots": null,
        "id_str": "03f3261e144366383c49c6b5d166bf8563",
        "wealth_level": 7,
        "bubble_id_v2": 0,
        "reply": {
          "show_reply": true,
          "reply_mid": 0,
          "reply_uname": "",
          "reply_uname_color": "",
          "reply_is_mystery": false
        },
        "group_medal": null,
        "user": {
          "uid": 243082910,
          "base": {
            "name": "可人的樱花",
            "face": "http://i2.hdslb.com/bfs/face/5faa9bef952f831236b740932c559476658f88e5.jpg",
            "name_color": 0,
            "is_mystery": false,
            "risk_ctrl_info": null,
            "origin_info": {
              "name": "可人的樱花",
              "face": "http://i2.hdslb.com/bfs/face/5faa9bef952f831236b740932c559476658f88e5.jpg"
            },
            "official_info": {
              "role": 0,
              "title": "",
              "desc": "",
              "type": -1
            },
            "name_color_str": ""
          },
          "medal": null,
          "wealth": null,
          "title": {
            "old_title_css_id": "",
            "title_css_id": ""
          },
          "guard": null,
          "uhead_frame": null,
          "guard_leader": {
            "is_guard_leader": false
          }
        }
      },
      {
        "text": "‫",
        "dm_type": 0,
        "uid": 20276964,
        "nickname": "咸菜拉面",
        "uname_color": "",
        "timeline": "2024-08-17 05:05:07",
        "isadmin": 0,
        "vip": 0,
        "svip": 0,
        "medal": [
          27,
          "小孩梓",
          "阿梓从小就很可爱",
          80397,
          398668,
          "",
          0,
          6809855,
          398668,
          6850801,
          3,
          1,
          7706705
        ],
        "title": [
          "title-86-1",
          "title-86-1"
        ],
        "user_level": [
          59,
          0,
          16752445,
          931
        ],
        "rank": 10000,
        "teamid": 0,
        "rnd": "1723842307",
        "user_title": "title-86-1",
        "guard_level": 0,
        "bubble": 0,
        "bubble_color": "",
        "lpl": 0,
        "yeah_space_url": "",
        "jump_to_url": "",
        "check_info": {
          "ts": 1723842307,
          "ct": "8B947ABC"
        },
        "voice_dm_info": {
          "voice_url": "",
          "file_format": "",
          "text": "",
          "file_duration": 0,
          "file_id": ""
        },
        "emoticon": {
          "id": 0,
          "emoticon_unique": "",
          "text": "",
          "perm": 0,
          "url": "",
          "in_player_area": 0,
          "bulge_display": 0,
          "is_dynamic": 0,
          "height": 0,
          "width": 0
        },
        "emots": null,
        "id_str": "1a928b968afaa7825ea506ffe566bfbf16",
        "wealth_level": 37,
        "bubble_id_v2": 0,
        "reply": {
          "show_reply": true,
          "reply_mid": 0,
          "reply_uname": "",
          "reply_uname_color": "",
          "reply_is_mystery": false
        },
        "group_medal": null,
        "user": {
          "uid": 20276964,
          "base": {
            "name": "咸菜拉面",
            "face": "https://i0.hdslb.com/bfs/face/182b73f6b6274fcee7491219f511b1748c4bc712.jpg",
            "name_color": 0,
            "is_mystery": false,
            "risk_ctrl_info": null,
            "origin_info": {
              "name": "咸菜拉面",
              "face": "https://i0.hdslb.com/bfs/face/182b73f6b6274fcee7491219f511b1748c4bc712.jpg"
            },
            "official_info": {
              "role": 0,
              "title": "",
              "desc": "",
              "type": -1
            },
            "name_color_str": ""
          },
          "medal": {
            "name": "小孩梓",
            "level": 27,
            "color_start": 398668,
            "color_end": 6850801,
            "color_border": 6809855,
            "color": 398668,
            "id": 13139,
            "typ": 0,
            "is_light": 1,
            "ruid": 7706705,
            "guard_level": 3,
            "score": 50112778,
            "guard_icon": "https://i0.hdslb.com/bfs/live/143f5ec3003b4080d1b5f817a9efdca46d631945.png",
            "honor_icon": "",
            "v2_medal_color_start": "#4775EFCC",
            "v2_medal_color_end": "#4775EFCC",
            "v2_medal_color_border": "#58A1F8FF",
            "v2_medal_color_text": "#FFFFFFFF",
            "v2_medal_color_level": "#000B7099",
            "user_receive_count": 0
          },
          "wealth": null,
          "title": {
            "old_title_css_id": "title-86-1",
            "title_css_id": "title-86-1"
          },
          "guard": null,
          "uhead_frame": null,
          "guard_leader": {
            "is_guard_leader": false
          }
        }
      },
      {
        "text": "下播啦~ 感谢大家的陪伴~ 下次见哦~",
        "dm_type": 0,
        "uid": 3546614675278489,
        "nickname": "机器人管家_鱼",
        "uname_color": "",
        "timeline": "2024-08-18 00:07:36",
        "isadmin": 0,
        "vip": 0,
        "svip": 0,
        "medal": [
          21,
          "赴神明",
          "Mr_钟明",
          27751673,
          1725515,
          "",
          0,
          12632256,
          12632256,
          12632256,
          0,
          0,
          3493291261692485
        ],
        "title": [
          "",
          ""
        ],
        "user_level": [
          11,
          0,
          6406234,
          ">50000"
        ],
        "rank": 10000,
        "teamid": 0,
        "rnd": "1723910862",
        "user_title": "",
        "guard_level": 0,
        "bubble": 0,
        "bubble_color": "",
        "lpl": 0,
        "yeah_space_url": "",
        "jump_to_url": "",
        "check_info": {
          "ts": 1723910856,
          "ct": "9BD05026"
        },
        "voice_dm_info": {
          "voice_url": "",
          "file_format": "",
          "text": "",
          "file_duration": 0,
          "file_id": ""
        },
        "emoticon": {
          "id": 0,
          "emoticon_unique": "",
          "text": "",
          "perm": 0,
          "url": "",
          "in_player_area": 0,
          "bulge_display": 0,
          "is_dynamic": 0,
          "height": 0,
          "width": 0
        },
        "emots": null,
        "id_str": "2ee6101973eeb69931eb86ac7e66c0ca17",
        "wealth_level": 23,
        "bubble_id_v2": 0,
        "reply": {
          "show_reply": true,
          "reply_mid": 0,
          "reply_uname": "",
          "reply_uname_color": "",
          "reply_is_mystery": false
        },
        "group_medal": null,
        "user": {
          "uid": 3546614675278489,
          "base": {
            "name": "机器人管家_鱼",
            "face": "https://i1.hdslb.com/bfs/face/de737cd746a96742c07ced6c213aa25cf0429d90.jpg",
            "name_color": 0,
            "is_mystery": false,
            "risk_ctrl_info": null,
            "origin_info": {
              "name": "机器人管家_鱼",
              "face": "https://i1.hdslb.com/bfs/face/de737cd746a96742c07ced6c213aa25cf0429d90.jpg"
            },
            "official_info": {
              "role": 0,
              "title": "",
              "desc": "",
              "type": -1
            },
            "name_color_str": ""
          },
          "medal": {
            "name": "赴神明",
            "level": 21,
            "color_start": 12632256,
            "color_end": 12632256,
            "color_border": 12632256,
            "color": 1725515,
            "id": 1231122,
            "typ": 0,
            "is_light": 0,
            "ruid": 3493291261692485,
            "guard_level": 0,
            "score": 50001573,
            "guard_icon": "",
            "honor_icon": "",
            "v2_medal_color_start": "#919298CC",
            "v2_medal_color_end": "#919298CC",
            "v2_medal_color_border": "#919298CC",
            "v2_medal_color_text": "#FFFFFFFF",
            "v2_medal_color_level": "#6C6C7299",
            "user_receive_count": 0
          },
          "wealth": null,
          "title": {
            "old_title_css_id": "",
            "title_css_id": ""
          },
          "guard": null,
          "uhead_frame": null,
          "guard_leader": {
            "is_guard_leader": false
          }
        }
      },
      {
        "text": "‫",
        "dm_type": 0,
        "uid": 20276964,
        "nickname": "咸菜拉面",
        "uname_color": "",
        "timeline": "2024-08-18 05:05:05",
        "isadmin": 0,
        "vip": 0,
        "svip": 0,
        "medal": [
          27,
          "小孩梓",
          "阿梓从小就很可爱",
          80397,
          398668,
          "",
          0,
          6809855,
          398668,
          6850801,
          3,
          1,
          7706705
        ],
        "title": [
          "title-86-1",
          "title-86-1"
        ],
        "user_level": [
          59,
          0,
          16752445,
          931
        ],
        "rank": 10000,
        "teamid": 0,
        "rnd": "1723928706",
        "user_title": "title-86-1",
        "guard_level": 0,
        "bubble": 0,
        "bubble_color": "",
        "lpl": 0,
        "yeah_space_url": "",
        "jump_to_url": "",
        "check_info": {
          "ts": 1723928705,
          "ct": "8A379FF4"
        },
        "voice_dm_info": {
          "voice_url": "",
          "file_format": "",
          "text": "",
          "file_duration": 0,
          "file_id": ""
        },
        "emoticon": {
          "id": 0,
          "emoticon_unique": "",
          "text": "",
          "perm": 0,
          "url": "",
          "in_player_area": 0,
          "bulge_display": 0,
          "is_dynamic": 0,
          "height": 0,
          "width": 0
        },
        "emots": null,
        "id_str": "41e8b55dea381d494cfe60ba3466c11064",
        "wealth_level": 37,
        "bubble_id_v2": 0,
        "reply": {
          "show_reply": true,
          "reply_mid": 0,
          "reply_uname": "",
          "reply_uname_color": "",
          "reply_is_mystery": false
        },
        "group_medal": null,
        "user": {
          "uid": 20276964,
          "base": {
            "name": "咸菜拉面",
            "face": "https://i0.hdslb.com/bfs/face/182b73f6b6274fcee7491219f511b1748c4bc712.jpg",
            "name_color": 0,
            "is_mystery": false,
            "risk_ctrl_info": null,
            "origin_info": {
              "name": "咸菜拉面",
              "face": "https://i0.hdslb.com/bfs/face/182b73f6b6274fcee7491219f511b1748c4bc712.jpg"
            },
            "official_info": {
              "role": 0,
              "title": "",
              "desc": "",
              "type": -1
            },
            "name_color_str": ""
          },
          "medal": {
            "name": "小孩梓",
            "level": 27,
            "color_start": 398668,
            "color_end": 6850801,
            "color_border": 6809855,
            "color": 398668,
            "id": 13139,
            "typ": 0,
            "is_light": 1,
            "ruid": 7706705,
            "guard_level": 3,
            "score": 50112778,
            "guard_icon": "https://i0.hdslb.com/bfs/live/143f5ec3003b4080d1b5f817a9efdca46d631945.png",
            "honor_icon": "",
            "v2_medal_color_start": "#4775EFCC",
            "v2_medal_color_end": "#4775EFCC",
            "v2_medal_color_border": "#58A1F8FF",
            "v2_medal_color_text": "#FFFFFFFF",
            "v2_medal_color_level": "#000B7099",
            "user_receive_count": 0
          },
          "wealth": null,
          "title": {
            "old_title_css_id": "title-86-1",
            "title_css_id": "title-86-1"
          },
          "guard": null,
          "uhead_frame": null,
          "guard_leader": {
            "is_guard_leader": false
          }
        }
      }
    ]
  },
  "message": "",
  "msg": ""
}

清晰度代码

代码说明
30000杜比
200004K
10000原画
400蓝光
250超清
150高清
80流畅

获取直播间信息

https://api.live.bilibili.com/xlive/web-room/v2/index/getRoomPlayInfo

请求方式:GET

认证方式:无 (无需添加Cookie)

url参数 (GET方式):

参数名类型内容必填备注
room_idnum直播间id必要
protocolstr直播协议必要0:http_stream
1:http_hls
可多选, 使用英文逗号分隔
formatstr格式必要0:flv
1:ts
2:fmp4
可多选, 使用英文逗号分隔
codecstr编码格式必要0:AVC
1:HEVC
可多选, 使用英文逗号分隔
qnnum清晰度编码默认150
清晰度代码
platformstrweb
ptypenum8
dolbynum5
panoramanum1

json回复:

根对象:

字段名类型内容备注
codenum响应码0:成功
1002002:参数错误
messagestr0
ttlnum1
dataobj信息本体

data对象:

字段名类型内容备注
room_idnum直播间id
short_idnum直播间短id
uidnum主播uid
is_hiddenbool直播间是否被隐藏
is_lockedbool直播间是否被锁定
is_portraitbool是否竖屏
live_statusnum直播状态0:未开播
1:直播中
2:轮播中
hidden_tillnum隐藏结束时间
lock_tillnum封禁结束时间秒级时间戳
encryptedbool直播间为加密直播间
pwd_verifiedbool是否通过密码验证encryptedtrue时才有意义
live_timenum本次开播时间秒级时间戳
room_shieldnum
all_special_typesarray
playurl_infoobj直播流信息

playurl_info对象

字段名类型内容备注
conf_jsonstr
playurlobj

playurl对象

字段名类型内容备注
cidnum直播间id
g_qn_descarray清晰度列表
streamarray直播流信息
p2p_dataobj
dolby_qn

g_qn_desc数组中的对象

字段名类型内容备注
qnnum清晰度代码清晰度代码
descstr清晰度描述
hdr_descstr
attr_desc

stream数组中的对象

字段名类型内容备注
protocol_namestr协议名
formatarray格式列表

format数组中的对象

字段名类型内容备注
format_namestr格式名
codecarray编码列表

codec数组中的对象

字段名类型内容备注
codec_namestr编码名
current_qnnum当前清晰度编码清晰度代码
accept_qnarray可用清晰度编码列表清晰度代码
base_urlstr播放源路径
url_infoarray域名信息列表
hdr_qnnull
dolby_typenum
attr_namestr

url_info数组中的对象

字段名类型内容备注
hoststr域名
extrastrURL参数
stream_ttlnum

p2p_data对象

字段名类型内容备注
p2pbool
p2p_typenum
m_p2pbool
m_serversnull

示例:

查询room_id=3的直播间信息

curl -L -X GET 'https://api.live.bilibili.com/xlive/web-room/v2/index/getRoomPlayInfo?room_id=3&protocol=0,1&format=0,1,2&codec=0,1&qn=10000'
查看响应示例:
{
  "code": 0,
  "message": "0",
  "ttl": 1,
  "data": {
    "room_id": 23058,
    "short_id": 3,
    "uid": 11153765,
    "is_hidden": false,
    "is_locked": false,
    "is_portrait": false,
    "live_status": 1,
    "hidden_till": 0,
    "lock_till": 0,
    "encrypted": false,
    "pwd_verified": true,
    "live_time": 1671425336,
    "room_shield": 1,
    "all_special_types": [],
    "playurl_info": {
      "conf_json": "{\"cdn_rate\":10000,\"report_interval_sec\":150}",
      "playurl": {
        "cid": 23058,
        "g_qn_desc": [
          {
            "qn": 30000,
            "desc": "杜比",
            "hdr_desc": "",
            "attr_desc": null
          },
          {
            "qn": 20000,
            "desc": "4K",
            "hdr_desc": "",
            "attr_desc": null
          },
          {
            "qn": 10000,
            "desc": "原画",
            "hdr_desc": "",
            "attr_desc": null
          },
          {
            "qn": 400,
            "desc": "蓝光",
            "hdr_desc": "HDR",
            "attr_desc": null
          },
          {
            "qn": 250,
            "desc": "超清",
            "hdr_desc": "HDR",
            "attr_desc": null
          },
          {
            "qn": 150,
            "desc": "高清",
            "hdr_desc": "",
            "attr_desc": null
          },
          {
            "qn": 80,
            "desc": "流畅",
            "hdr_desc": "",
            "attr_desc": null
          }
        ],
        "stream": [
          {
            "protocol_name": "http_stream",
            "format": [
              {
                "format_name": "flv",
                "codec": [
                  {
                    "codec_name": "avc",
                    "current_qn": 10000,
                    "accept_qn": [
                      10000,
                      150
                    ],
                    "base_url": "/live-bvc/462997/live_11153765_9369560.flv?",
                    "url_info": [
                      {
                        "host": "https://cn-hbcd-cu-02-20.bilivideo.com",
                        "extra": "expires=1674103815&pt=web&deadline=1674103815&len=0&oi=1963941079&platform=web&qn=10000&trid=1000061f434c07ac4f4184820bfb141e75e8&uipk=100&uipv=100&nbs=1&uparams=cdn,deadline,len,oi,platform,qn,trid,uipk,uipv,nbs&cdn=cn-gotcha01&upsig=f494aa9e92e24943061fe5082494ec44&sk=33541455720f64c7671bc1480acfb176&p2p_type=1&src=57345&sl=1&free_type=0&sid=cn-hbcd-cu-02-20&chash=1&sche=ban&score=12&pp=rtmp&machinezone=jd&source=onetier&trace=0&site=92e80b6f3ebfd393e7d1c1e2e648d9c1&order=1",
                        "stream_ttl": 3600
                      }
                    ],
                    "hdr_qn": null,
                    "dolby_type": 0,
                    "attr_name": ""
                  }
                ]
              }
            ]
          },
          {
            "protocol_name": "http_hls",
            "format": [
              {
                "format_name": "ts",
                "codec": [
                  {
                    "codec_name": "avc",
                    "current_qn": 10000,
                    "accept_qn": [
                      10000,
                      150
                    ],
                    "base_url": "/live-bvc/462997/live_11153765_9369560.m3u8?",
                    "url_info": [
                      {
                        "host": "https://cn-hbcd-cu-02-20.bilivideo.com",
                        "extra": "expires=1674103815&len=0&oi=1963941079&pt=web&qn=10000&trid=1003061f434c07ac4f4184820bfb141e75e8&sigparams=cdn,expires,len,oi,pt,qn,trid&cdn=cn-gotcha01&sign=4f9bcec18e3afdca04b31ffb285ec915&sk=33541455720f64c7671bc1480acfb176&p2p_type=1&src=57345&sl=1&free_type=0&sid=cn-hbcd-cu-02-20&chash=1&sche=ban&score=12&pp=rtmp&machinezone=jd&source=onetier&trace=0&site=92e80b6f3ebfd393e7d1c1e2e648d9c1&order=1",
                        "stream_ttl": 3600
                      }
                    ],
                    "hdr_qn": null,
                    "dolby_type": 0,
                    "attr_name": ""
                  }
                ]
              },
              {
                "format_name": "fmp4",
                "codec": [
                  {
                    "codec_name": "avc",
                    "current_qn": 10000,
                    "accept_qn": [
                      10000,
                      150
                    ],
                    "base_url": "/live-bvc/462997/live_11153765_9369560/index.m3u8?",
                    "url_info": [
                      {
                        "host": "https://cn-hbcd-cu-02-20.bilivideo.com",
                        "extra": "expires=1674103815&len=0&oi=1963941079&pt=web&qn=10000&trid=1007061f434c07ac4f4184820bfb141e75e8&sigparams=cdn,expires,len,oi,pt,qn,trid&cdn=cn-gotcha01&sign=cc57dce528316d8389f2f34e7bd15f5c&sk=a99391b8b4d5779b2e32e41dbc989d2d&flvsk=33541455720f64c7671bc1480acfb176&p2p_type=1&src=57345&sl=1&free_type=0&sid=cn-hbcd-cu-02-20&chash=1&sche=ban&bvchls=1&score=12&pp=rtmp&machinezone=jd&source=onetier&trace=0&site=92e80b6f3ebfd393e7d1c1e2e648d9c1&order=1",
                        "stream_ttl": 3600
                      },
                      {
                        "host": "https://c1--cn-gotcha208.bilivideo.com",
                        "extra": "expires=1674103815&len=0&oi=1963941079&pt=web&qn=10000&trid=1007061f434c07ac4f4184820bfb141e75e8&sigparams=cdn,expires,len,oi,pt,qn,trid&cdn=cn-gotcha208&sign=2ff96adf5056c8dbee546955260fc2df&sk=a99391b8b4d5779b2e32e41dbc989d2d&p2p_type=1&src=57345&sl=1&free_type=0&pp=rtmp&machinezone=jd&source=onetier&trace=0&site=92e80b6f3ebfd393e7d1c1e2e648d9c1&order=2",
                        "stream_ttl": 3600
                      }
                    ],
                    "hdr_qn": null,
                    "dolby_type": 0,
                    "attr_name": ""
                  }
                ]
              }
            ]
          }
        ],
        "p2p_data": {
          "p2p": true,
          "p2p_type": 1,
          "m_p2p": false,
          "m_servers": null
        },
        "dolby_qn": null
      }
    }
  }
}

获取直播间主播信息

https://api.live.bilibili.com/live_user/v1/UserInfo/get_anchor_in_room

请求方式: GET

URL参数:

参数名类型内容必要性备注
roomidnum直播间号必要可以为短号

json回复:

根对象:

字段类型内容备注
codenum返回值0:成功 (直播间不存在也为0)
messagestr错误信息
msgstr错误信息
dataobj信息本体

data对象:

字段类型内容备注
infoobj主播信息
levelobj直播等级
sannum主播san值12满分

info对象:

字段类型内容备注
uidnum主播mid
unamestr主播用户名
facestr主播头像URL
rankstr主播排名
platform_user_levelnum平台用户等级
mobile_verifynum手机验证状态
identificationnum身份认证状态
official_verifyobj认证信息
vip_typenumVIP类型
gendernum主播性别-1:保密
0:女
1:男

info中的official_verify对象:

字段类型内容备注
typenum主播认证类型-1:无
0:个人认证
1:机构认证
descstr主播认证信息
rolenum未知

level对象:

字段类型内容备注
uidnum用户ID
costnum消费金额
rcostnum充值金额
user_scorestr用户积分
vipnumVIP状态
vip_timestrVIP到期时间
svipnumSVIP状态
svip_timestrSVIP到期时间
update_timestr更新时间
master_levelobj主播等级
user_levelnum用户等级
colornum颜色值
anchor_scorenum主播积分

level 中的 master_level对象:

字段类型内容备注
levelnum主播等级
colornum颜色值
currentlist当前积分
nextlist下一等级积分
anchor_scorenum主播积分
upgrade_scorenum升级积分
master_level_colornum主播等级颜色值
sortstr排名

示例:

查询roomid=1的直播间主播信息

curl -G 'https://api.live.bilibili.com/live_user/v1/UserInfo/get_anchor_in_room' \
--data-urlencode 'roomid=1'
查看响应示例:
{
  "code": 0,
  "msg": "success",
  "message": "success",
  "data": {
    "info": {
      "uid": 9617619,
      "uname": "哔哩哔哩直播",
      "face": "https://i0.hdslb.com/bfs/face/8f6a614a48a3813d90da7a11894ae56a59396fcd.jpg",
      "rank": "10000",
      "platform_user_level": 6,
      "mobile_verify": 1,
      "identification": 1,
      "official_verify": {
        "type": 1,
        "desc": "哔哩哔哩直播官方账号",
        "role": 3
      },
      "vip_type": 2,
      "gender": -1
    },
    "level": {
      "uid": 9617619,
      "cost": 7782673656,
      "rcost": 20199200291,
      "user_score": "0",
      "vip": 0,
      "vip_time": "0000-00-00 00:00:00",
      "svip": 0,
      "svip_time": "0000-00-00 00:00:00",
      "update_time": "2024-08-08 17:13:12",
      "master_level": {
        "level": 40,
        "color": 16746162,
        "current": [0, 147013810],
        "next": [0, 147013810],
        "anchor_score": 201992002,
        "upgrade_score": 0,
        "master_level_color": 16746162,
        "sort": "\u003E10000"
      },
      "user_level": 60,
      "color": 16752445,
      "anchor_score": 201992002
    },
    "san": 12
  }
}