用户基本信息

用户空间详细信息

https://api.bilibili.com/x/space/wbi/acc/info

请求方式:GET

认证方式:Cookie(SESSDATA)

鉴权方式:Wbi 签名, Cookie (对于某些 IP 地址,需要在 Cookie 中提供任意非空的 buvid3 字段)

该接口的旧版 API :https://api.bilibili.com/x/space/acc/infoopen in new window(已废弃,不建议使用)

url参数:

参数名类型内容必要性备注
midnum目标用户mid必要
w_ridstrWbi 签名必要详见 Wbi 签名
wtsnum当前时间戳必要详见 Wbi 签名

json回复:

根对象:

字段类型内容备注
codenum返回值0:成功
-400:请求错误
-403:访问权限不足
-404:用户不存在(如注销账号)
messagestr错误信息默认为0
ttlnum1
dataobj信息本体

data对象:

字段类型内容备注
midnummid
namestr昵称
sexstr性别男/女/保密
facestr头像链接
face_nftnum是否为 NFT 头像0:不是 NFT 头像
1:是 NFT 头像
face_nft_typenumNFT 头像类型?
signstr签名
ranknum用户权限等级目前应该无任何作用
5000:0级未答题
10000:普通会员
20000:字幕君
25000:VIP
30000:真·职人
32000:管理员
levelnum当前等级0-6 级
jointimenum注册时间此接口返回恒为0
moralnum节操值此接口返回恒为0
silencenum封禁状态0:正常
1:被封
coinsnum硬币数需要登录(Cookie)
只能查看自己的
默认为0
fans_badgebool是否具有粉丝勋章false:无
true:有
fans_medalobj粉丝勋章信息
officialobj认证信息
vipobj会员信息
pendantobj头像框信息
nameplateobj勋章信息
user_honour_infoobj(?)
is_followedbool是否关注此用户true:已关注
false:未关注
需要登录(Cookie)
未登录恒为false
top_photostr主页头图链接
themeobj(?)
sys_noticeobj系统通知无内容则为空对象
主要用于展示如用户争议、纪念账号等等的小黄条
live_roomobj直播间信息
birthdaystr生日MM-DD
如设置隐私为空
schoolobj学校
professionobj专业资质信息
tagsnull个人标签
seriesobj
is_senior_membernum是否为硬核会员0:否
1:是
mcn_infonull(?)
gaia_res_typenum(?)
gaia_datanull(?)
is_riskbool(?)
elecobj充电信息
contractobj是否显示老粉计划

rank示例

UIDrank
220000
1676520000
1577338420000
12441620000
42973636225000
42426176825000
4127372625000
1508010725000
984749725000
485600725000
92812325000
13270425000
7009325000
4729125000
2738025000
2244525000
335125000
110125000
9306630000
244306830000
4636830000
1116730000

profession示例

UID
654391
1440295
1785155
2990100
3875803

data中的official对象:

字段类型内容备注
rolenum认证类型用户认证类型一览
titlestr认证信息无为空
descstr认证备注无为空
typenum是否认证-1:无
0:个人认证
1:机构认证

data中的vip对象:

字段类型内容备注
typenum会员类型0:无
1:月大会员
2:年度及以上大会员
statusnum会员状态0:无
1:有
due_datenum会员过期时间毫秒时间戳
vip_pay_typenum支付类型0:未支付(常见于官方账号)
1:已支付(以正常渠道获取的大会员均为此值)
theme_typenum0作用尚不明确
labelobj会员标签
avatar_subscriptnum是否显示会员图标0:不显示
1:显示
nickname_colorstr会员昵称颜色颜色码,一般为#FB7299,曾用于愚人节改变大会员配色
rolenum大角色类型1:月度大会员
3:年度大会员
7:十年大会员
15:百年大会员
avatar_subscript_urlstr大会员角标地址
tv_vip_statusnum电视大会员状态0:未开通
tv_vip_pay_typenum电视大会员支付类型

vip中的label对象:

字段类型内容备注
pathstr作用尚不明确
textstr会员类型文案大会员 年度大会员 十年大会员 百年大会员 最强绿鲤鱼
label_themestr会员标签vip:大会员
annual_vip:年度大会员
ten_annual_vip:十年大会员
hundred_annual_vip:百年大会员
fools_day_hundred_annual_vip:最强绿鲤鱼
text_colorstr会员标签
bg_stylenum1
bg_colorstr会员标签背景颜色颜色码,一般为#FB7299,曾用于愚人节改变大会员配色
border_colorstr会员标签边框颜色未使用
use_img_labelbooltrue
img_label_uri_hansstr空串
img_label_uri_hantstr空串
img_label_uri_hans_staticstr大会员牌子图片简体版
img_label_uri_hant_staticstr大会员牌子图片繁体版

data中的pendant对象:

普通头像框的imageimage_enhance内容相同

动态头像框的image为png静态图片,image_enhance为webp动态图片,image_enhance_frame为png逐帧序列

字段类型内容备注
pidnum头像框id
namestr头像框名称
imagestr头像框图片url
expirenum过期时间此接口返回恒为0
image_enhancestr头像框图片url
image_enhance_framestr头像框图片逐帧序列url

data中的nameplate对象:

字段类型内容备注
nidnum勋章id
namestr勋章名称
imagestr勋章图标
image_smallstr勋章图标(小)
levelstr勋章等级
conditionstr获取条件

data中的fans_medal对象:

字段类型内容备注
showbool
wearbool是否佩戴了粉丝勋章
medalobj粉丝勋章信息

fans_medal中的medal对象:

字段类型内容备注
uidnum此用户mid
target_idnum粉丝勋章所属UP的mid
medal_idnum粉丝勋章id
levelnum粉丝勋章等级
medal_namestr粉丝勋章名称
medal_colornum颜色
intimacynum当前亲密度
next_intimacynum下一等级所需亲密度
day_limitnum每日亲密度获取上限
today_feednum今日已获得亲密度
medal_color_startnum粉丝勋章颜色十进制数,可转为十六进制颜色代码
medal_color_endnum粉丝勋章颜色十进制数,可转为十六进制颜色代码
medal_color_bordernum粉丝勋章边框颜色十进制数,可转为十六进制颜色代码
is_lightednum
light_statusnum
wearing_statusnum当前是否佩戴0:未佩戴
1:已佩戴
scorenum

data中的sys_notice对象:

字段类型内容备注
idnumid
contentstr显示文案
urlstr跳转地址
notice_typenum提示类型1,2
iconstr前缀图标
text_colorstr文字颜色
bg_colorstr背景颜色

sys_notice示例

idcontentnotice_type示例用户
5该用户存在争议行为,已冻结其帐号功能的使用1
8该用户存在较大争议,请谨慎甄别其内容128062215open in new window
11该账号涉及合约争议,暂冻结其账号功能使用。详见公告->1
16该UP主内容存在争议,请注意甄别视频内信息1382534165open in new window
20请允许我们在此献上最后的告别,以此纪念其在哔哩哔哩留下的回忆与足迹。请点此查看纪念账号相关说明2212535360open in new window
22该账号涉及合约诉讼,封禁其账号使用
24该账号涉及合约争议,暂冻结其账号功能使用1291229008open in new window
25该用户涉及严重指控,暂冻结其账号功能使用181447581open in new window
31该用户涉及严重指控,暂冻结其账号功能使用122439273open in new window
34该用户涉及严重指控,暂冻结其账号功能使用11640486775open in new window
36该账户存在争议,请谨慎甄别1

data中的live_room对象:

字段类型内容备注
roomStatusnum直播间状态0:无房间
1:有房间
liveStatusnum直播状态0:未开播
1:直播中
urlstr直播间网页 url
titlestr直播间标题
coverstr直播间封面 url
watched_showobj
roomidnum直播间 id
roundStatusnum轮播状态0:未轮播
1:轮播
broadcast_typenum0

live_room中的watched_show对象:

字段类型内容备注
switchbool?
numnumtotal watched users
text_smallstr
text_largestr
iconstrwatched icon url
icon_locationstr?
icon_webstrwatched icon url

data中的school对象:

字段类型内容备注
namestr就读大学名称没有则为空

data中的profession对象:

字段类型内容备注
namestr资质名称
departmentstr职位
titlestr所属机构
is_shownum是否显示0:不显示
1:显示

data中的user_honour_info对象:

字段类型内容备注
midnum0
colourstrnull
tagsarraynull

data中的series对象:

字段类型内容备注
user_upgrade_statusnum(?)
show_upgrade_windowbool(?)

data中的elec对象:

字段类型内容备注
show_infoobj

elec中的show_info对象:

字段类型内容备注
showbool是否开通了充电
statenum状态-1:未开通
1:已开通
titlestr空串
iconstr空串
jump_urlstr空串

data中的contract对象:

字段名类型内容备注
is_displaybooltrue/false
在页面中未使用此字段
is_follow_displaybool是否在显示老粉计划true:显示
false:不显示

示例:

查询用户mid=2的详细信息,Wbi 签名的 wtsw_rid生成方式详见 Wbi 签名 文档

curl -G 'https://api.bilibili.com/x/space/wbi/acc/info' \
	--data-urlencode 'mid=2' \
	--data-urlencode 'wts=1685070149' \
	--data-urlencode 'w_rid=f7b376124782ae8cb42c56fdd69144ed' \
	-b 'SESSDATA=xxx'
查看响应示例:
{
    "code": 0,
    "message": "0",
    "ttl": 1,
    "data": {
        "mid": 2,
        "name": "碧诗",
        "sex": "男",
        "face": "https://i2.hdslb.com/bfs/face/ef0457addb24141e15dfac6fbf45293ccf1e32ab.jpg",
        "face_nft": 0,
        "face_nft_type": 0,
        "sign": "https://kami.im 直男过气网红 #  We Are Star Dust",
        "rank": 20000,
        "level": 6,
        "jointime": 0,
        "moral": 0,
        "silence": 0,
        "coins": 0,
        "fans_badge": true,
        "fans_medal": {
            "show": true,
            "wear": true,
            "medal": {
                "uid": 2,
                "target_id": 335115,
                "medal_id": 45408,
                "level": 21,
                "medal_name": "伍千万",
                "medal_color": 1725515,
                "intimacy": 1980,
                "next_intimacy": 2000,
                "day_limit": 250000,
                "medal_color_start": 1725515,
                "medal_color_end": 5414290,
                "medal_color_border": 1725515,
                "is_lighted": 1,
                "light_status": 1,
                "wearing_status": 1,
                "score": 50001980
            }
        },
        "official": {
            "role": 2,
            "title": "bilibili创始人(站长)",
            "desc": "",
            "type": 0
        },
        "vip": {
            "type": 2,
            "status": 1,
            "due_date": 3931344000000,
            "vip_pay_type": 0,
            "theme_type": 0,
            "label": {
                "path": "",
                "text": "十年大会员",
                "label_theme": "ten_annual_vip",
                "text_color": "#FFFFFF",
                "bg_style": 1,
                "bg_color": "#FB7299",
                "border_color": "",
                "use_img_label": true,
                "img_label_uri_hans": "https://i0.hdslb.com/bfs/activity-plat/static/20220608/e369244d0b14644f5e1a06431e22a4d5/wltavwHAkL.gif",
                "img_label_uri_hant": "",
                "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/802418ff03911645648b63aa193ba67997b5a0bc.png",
                "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/8u7iRTPE7N.png"
            },
            "avatar_subscript": 1,
            "nickname_color": "#FB7299",
            "role": 7,
            "avatar_subscript_url": "",
            "tv_vip_status": 1,
            "tv_vip_pay_type": 0,
            "tv_due_date": 2000822400
        },
        "pendant": {
            "pid": 32257,
            "name": "EveOneCat2",
            "image": "https://i2.hdslb.com/bfs/garb/item/488870931b1bba66da36d22848f0720480d3d79a.png",
            "expire": 0,
            "image_enhance": "https://i2.hdslb.com/bfs/garb/item/5974f17f9d96a88bafba2f6d18d647a486e88312.webp",
            "image_enhance_frame": "https://i2.hdslb.com/bfs/garb/item/4316a3910bb0bd6f2f1c267a3e9187f0b9fe5bd0.png"
        },
        "nameplate": {
            "nid": 10,
            "name": "见习偶像",
            "image": "https://i2.hdslb.com/bfs/face/e93dd9edfa7b9e18bf46fd8d71862327a2350923.png",
            "image_small": "https://i2.hdslb.com/bfs/face/275b468b043ec246737ab8580a2075bee0b1263b.png",
            "level": "普通勋章",
            "condition": "所有自制视频总播放数>=10万"
        },
        "user_honour_info": {
            "mid": 0,
            "colour": null,
            "tags": []
        },
        "is_followed": true,
        "top_photo": "http://i2.hdslb.com/bfs/space/cb1c3ef50e22b6096fde67febe863494caefebad.png",
        "theme": {},
        "sys_notice": {},
        "live_room": {
            "roomStatus": 1,
            "liveStatus": 0,
            "url": "https://live.bilibili.com/1024?broadcast_type=0&is_room_feed=0",
            "title": "试图恰鸡",
            "cover": "http://i0.hdslb.com/bfs/live/new_room_cover/96ee5bfd0279a0f18b190340334f43f473038288.jpg",
            "roomid": 1024,
            "roundStatus": 0,
            "broadcast_type": 0,
            "watched_show": {
                "switch": true,
                "num": 19,
                "text_small": "19",
                "text_large": "19人看过",
                "icon": "https://i0.hdslb.com/bfs/live/a725a9e61242ef44d764ac911691a7ce07f36c1d.png",
                "icon_location": "",
                "icon_web": "https://i0.hdslb.com/bfs/live/8d9d0f33ef8bf6f308742752d13dd0df731df19c.png"
            }
        },
        "birthday": "09-19",
        "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,
        "gaia_res_type": 0,
        "gaia_data": null,
        "is_risk": false,
        "elec": {
            "show_info": {
                "show": true,
                "state": 1,
                "title": "",
                "icon": "",
                "jump_url": "?oid=2"
            }
        },
        "contract": {
            "is_display": false,
            "is_follow_display": false
        }
    }
}

用户名片信息

https://api.bilibili.com/x/web-interface/card

请求方式:GET

认证方式:Cookie(SESSDATA)

url参数:

参数名类型内容必要性备注
midnum目标用户mid必要
photobool是否请求用户主页头图非必要true:是
false:否

json回复:

根对象:

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

data对象:

字段类型内容备注
cardobj卡片信息
followingbool是否关注此用户true:已关注
false:未关注
需要登录(Cookie)
未登录为false
archive_countnum用户稿件数
article_countnum0作用尚不明确
followernum粉丝数
like_numnum点赞数

data中的card对象:

字段类型内容备注
midstr用户mid
approveboolfalse作用尚不明确
namestr用户昵称
sexstr用户性别男 女 保密
facestr用户头像链接
DisplayRankstr0作用尚不明确
regtimenum0作用尚不明确
spacestanum用户状态0:正常
-2:被封禁
birthdaystr作用尚不明确
placestr作用尚不明确
descriptionstr作用尚不明确
articlenum0作用尚不明确
attentionsarray作用尚不明确
fansnum粉丝数
friendnum关注数
attentionnum关注数
signstr签名
level_infoobj等级
pendantobj挂件
nameplateobj勋章
Officialobj认证信息
official_verifyobj认证信息2
vipobj大会员状态
spaceobj主页头图

card中的level_info对象:

字段类型内容备注
current_levelnum当前等级0-6级
current_minnum0作用尚不明确
current_expnum0作用尚不明确
next_expnum0作用尚不明确

card中的pendant对象:

字段类型内容备注
pidnum挂件id
namestr挂件名称
imagestr挂件图片url
expirenum0作用尚不明确

card中的nameplate对象:

字段类型内容备注
nidnum勋章id详细说明有待补充
namestr勋章名称
imagestr挂件图片url 正常
image_smallstr勋章图片url 小
levelstr勋章等级
conditionstr勋章条件

card中的Official对象:

字段类型内容备注
rolenum认证类型用户认证类型一览
titlestr认证信息无为空
descstr认证备注无为空
typenum是否认证-1:无
0:UP主认证
1:机构认证

card中的official_verify对象:

字段类型内容备注
typenum是否认证-1:无
0:UP主认证
1:机构认证
descstr认证信息无为空

card中的vip对象:

字段类型内容备注
vipTypenum大会员类型0:无
1:月度大会员
2:年度及以上大会员
dueRemarkstr作用尚不明确
accessStatusnum0作用尚不明确
vipStatusnum大会员状态0:无
1:有
vipStatusWarnstr作用尚不明确
theme_typenum0作用尚不明确

card中的space对象:

字段类型内容备注
s_imgstr主页头图url 小图
l_imgstr主页头图url 正常

示例:

curl -G 'https://api.bilibili.com/x/web-interface/card' \
--data-urlencode 'mid=2' \
--data-urlencode 'photo=true' \
-b 'SESSDATA=xxx'
查看响应示例:
{
    "code": 0,
    "message": "0",
    "ttl": 1,
    "data": {
        "card": {
            "mid": "2",
            "name": "碧诗",
            "approve": false,
            "sex": "男",
            "rank": "20000",
            "face": "http://i2.hdslb.com/bfs/face/ef0457addb24141e15dfac6fbf45293ccf1e32ab.jpg",
            "DisplayRank": "0",
            "regtime": 0,
            "spacesta": 0,
            "birthday": "",
            "place": "",
            "description": "",
            "article": 0,
            "attentions": [],
            "fans": 969999,
            "friend": 234,
            "attention": 234,
            "sign": "kami.im 直男过气网红 # av362830 “We Are Star Dust”",
            "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": 10,
                "name": "见习偶像",
                "image": "http://i2.hdslb.com/bfs/face/e93dd9edfa7b9e18bf46fd8d71862327a2350923.png",
                "image_small": "http://i2.hdslb.com/bfs/face/275b468b043ec246737ab8580a2075bee0b1263b.png",
                "level": "普通勋章",
                "condition": "所有自制视频总播放数\u003e=10万"
            },
            "Official": {
                "role": 2,
                "title": "bilibili创始人(站长)",
                "desc": "",
                "type": 0
            },
            "official_verify": {
                "type": 0,
                "desc": "bilibili创始人(站长)"
            },
            "vip": {
                "type": 2,
                "status": 1,
                "due_date": 3896524800000,
                "vip_pay_type": 0,
                "theme_type": 0,
                "label": {
                    "path": "",
                    "text": "十年大会员",
                    "label_theme": "ten_annual_vip",
                    "text_color": "#FFFFFF",
                    "bg_style": 1,
                    "bg_color": "#FB7299",
                    "border_color": ""
                },
                "avatar_subscript": 1,
                "nickname_color": "#FB7299",
                "role": 7,
                "avatar_subscript_url": "http://i0.hdslb.com/bfs/vip/icon_Certification_big_member_22_3x.png",
                "vipType": 2,
                "vipStatus": 1
            }
        },
        "space": {
            "s_img": "http://i1.hdslb.com/bfs/space/768cc4fd97618cf589d23c2711a1d1a729f42235.png",
            "l_img": "http://i1.hdslb.com/bfs/space/cb1c3ef50e22b6096fde67febe863494caefebad.png"
        },
        "following": true,
        "archive_count": 37,
        "article_count": 0,
        "follower": 969999,
        "like_num": 3547978
    }
}

登录用户空间详细信息

https://api.bilibili.com/x/space/myinfo

请求方式:GET

认证方式:Cookie(SESSDATA)

json回复:

根对象:

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

data对象:

字段类型内容备注
midnummid
namestr昵称
sexstr性别男 女 保密
facestr头像图片url
signstr签名
ranknum10000作用尚不明确
levelnum当前等级0-6级
jointimenum0作用尚不明确
moralnum节操默认70
silencenum封禁状态0:正常
1:被封
email_statusnum已验证邮箱0:未验证
1:已验证
tel_statusnum已验证手机号0:未验证
1:已验证
identificationnum1作用尚不明确
vipobj大会员状态
birthdaynum生日时间戳
is_touristnum0作用尚不明确
is_fake_accountnum0作用尚不明确
pin_promptingnum0作用尚不明确
is_deletednum0作用尚不明确
coinsnum硬币数
followingnum粉丝数
followernum粉丝数

data中的vip对象:

字段类型内容备注
typenum会员类型0:无
1:月大会员
2:年度及以上大会员
statusnum会员状态0:无
1:有
due_datenum会员过期时间Unix时间戳(毫秒)
theme_typenum0作用尚不明确
labelobj会员标签
avatar_subscriptnum是否显示会员图标0:不显示
1:显示
nickname_colorstr会员昵称颜色颜色码

vip中的label对象:

字段类型内容备注
pathstr作用尚不明确
textstr会员名称
label_themestr会员标签vip:大会员
annual_vip:年度大会员
ten_annual_vip:十年大会员
hundred_annual_vip:百年大会员

data中的pendant对象:

字段类型内容备注
pidnum挂件id详细说明有待补充
namestr挂件名称
imagestr挂件图片url
expirenum0作用尚不明确

data中的nameplate对象:

字段类型内容备注
nidnum勋章id详细说明有待补充
namestr勋章名称
imagestr挂件图片url 正常
image_smallstr勋章图片url 小
levelstr勋章等级
conditionstr勋章条件

data中的Official对象:

字段类型内容备注
rolenum认证类型用户认证类型一览
titlestr认证信息无为空
descstr认证备注无为空
typenum是否认证-1:无
0:认证

data中的level_exp对象:

字段类型内容备注
current_levelnum当前等级0-6级
current_minnum0指当前等级从多少经验值开始
current_expnum0当前账户的经验值
next_expnum0下一个等级所需的经验值**(不是还需要多少)**

示例:

curl -G 'https://api.bilibili.com/x/space/myinfo' \
-b 'SESSDATA=xxx'
查看响应示例:
{
    "code": 0,
    "message": "0",
    "ttl": 1,
    "data": {
        "mid": 293793435,
        "name": "社会易姐QwQ",
        "sex": "男",
        "face": "http://i0.hdslb.com/bfs/face/aebb2639a0d47f2ce1fec0631f412eaf53d4a0be.jpg",
        "sign": "高考刚结束的普通技术宅一枚,喜欢MC和编程以及电子,是车车人也是术术人,粉丝群:1136462265",
        "rank": 10000,
        "level": 5,
        "jointime": 0,
        "moral": 70,
        "silence": 0,
        "email_status": 1,
        "tel_status": 1,
        "identification": 1,
        "vip": {
            "type": 2,
            "status": 1,
            "due_date": 1644163200000,
            "vip_pay_type": 0,
            "theme_type": 0,
            "label": {
                "path": "",
                "text": "年度大会员",
                "label_theme": "annual_vip",
                "text_color": "#FFFFFF",
                "bg_style": 1,
                "bg_color": "#FB7299",
                "border_color": ""
            },
            "avatar_subscript": 1,
            "nickname_color": "#FB7299",
            "role": 3,
            "avatar_subscript_url": "http://i0.hdslb.com/bfs/vip/icon_Certification_big_member_22_3x.png"
        },
        "pendant": {
            "pid": 2511,
            "name": "初音未来13周年",
            "image": "http://i0.hdslb.com/bfs/garb/item/4f8f3f1f2d47f0dad84f66aa57acd4409ea46361.png",
            "expire": 0,
            "image_enhance": "http://i0.hdslb.com/bfs/garb/item/fe0b83b53e2342b16646f6e7a9370d8a867decdb.webp",
            "image_enhance_frame": "http://i0.hdslb.com/bfs/garb/item/127c507ec8448be30cf5f79500ecc6ef2fd32f2c.png"
        },
        "nameplate": {
            "nid": 4,
            "name": "青铜殿堂",
            "image": "http://i0.hdslb.com/bfs/face/2879cd5fb8518f7c6da75887994c1b2a7fe670bd.png",
            "image_small": "http://i0.hdslb.com/bfs/face/6707c120e00a3445933308fd9b7bd9fad99e9ec4.png",
            "level": "普通勋章",
            "condition": "单个自制视频总播放数\u003e=1万"
        },
        "official": {
            "role": 0,
            "title": "",
            "desc": "",
            "type": -1
        },
        "birthday": 1015257600,
        "is_tourist": 0,
        "is_fake_account": 0,
        "pin_prompting": 0,
        "is_deleted": 0,
        "in_reg_audit": 0,
        "is_rip_user": false,
        "profession": {
            "id": 0,
            "name": "",
            "show_name": ""
        },
        "level_exp": {
            "current_level": 5,
            "current_min": 10800,
            "current_exp": 27125,
            "next_exp": 28800
        },
        "coins": 9,
        "following": 1122,
        "follower": 1122
    }
}

多用户详细信息

https://api.bilibili.com/x/polymer/pc-electron/v1/user/cards

请求方式:GET

url参数:

参数名类型内容必要性备注
uidsnums目标用户的mid列表必要每个成员间用,分隔,最多200个成员

json回复:

根对象:

字段类型内容备注
codenum返回值0:成功
-400:请求错误
40143:批量大小超过限制
messagestr错误信息默认为0
ttlnum1
dataobj信息本体用户信息随机排序

data对象:

字段类型内容备注
{用户mid}obj该mid对应的用户信息
……obj…………

data中的{用户mid}对象:

字段类型内容备注
facestr头像链接
face_nftnum是否为 NFT 头像0:不是 NFT 头像
1:是 NFT 头像
face_nft_newnum是否为新版 NFT 头像
midstrmid
namestr昵称
name_render有效时:obj
无效时:null
昵称渲染信息
nameplate有效时:obj
无效时:null
勋章信息基本同「用户空间详细信息」中的 data.nameplate 对象
officialobj认证信息基本同「用户空间详细信息」中的 data.official 对象
pendant有效时:obj
无效时:null
头像框信息基本同「用户空间详细信息」中的 data.pendant 对象,其中有些类型为 num 的字段在本接口中类型为 str
vipobj会员信息基本同「用户空间详细信息」中的 data.vip 对象,其中有些类型为 num 的字段在本接口中类型为 str

{用户mid}中的name_render对象:

字段类型内容备注
colors_infoobj昵称颜色信息(?)作用尚不明确
render_schemestr"Default""Colorful"作用尚不明确

name_render中的colors_info对象:

字段类型内容备注
colorarray昵称颜色(?)作用尚不明确
color_idsarray["6"]作用尚不明确

color数组:

类型内容备注
0obj颜色1
nobj颜色(n+1)
……obj…………

color数组中的对象:

字段类型内容备注
color_daystr浅色模式昵称颜色HEX颜色代码
color_nightstr深色模式昵称颜色HEX颜色代码

示例:

查询用户uids=1,2,3的详细信息

curl -G 'https://api.bilibili.com/x/polymer/pc-electron/v1/user/cards' \
--data-urlencode 'uids=1,2,3'
查看响应示例:
{
  "code": 0,
  "message": "0",
  "ttl": 1,
  "data": {
    "1": {
      "face": "http://i1.hdslb.com/bfs/face/34c5b30a990c7ce4a809626d8153fa7895ec7b63.gif",
      "face_nft": 0,
      "face_nft_new": 0,
      "mid": "1",
      "name": "bishi",
      "name_render": {
        "colors_info": { "color": [], "color_ids": [ "6" ] },
        "render_scheme": "Default"
      },
      "nameplate": null,
      "official": { "desc": "", "role": 0, "title": "", "type": -1 },
      "pendant": null,
      "vip": {
        "avatar_icon": {
          "icon_resource": {
            "type": "ICON_RES_TYPE_IMAGE",
            "url": "https://i0.hdslb.com/bfs/bangumi/kt/aba51485c0d02940c89aeefcf6680510d9858472.png"
          },
          "icon_type": "ICON_TYPE_VIP_ACTIVITY"
        },
        "avatar_subscript": 1,
        "avatar_subscript_url": "",
        "due_date": "1883059200000",
        "label": {
          "bg_color": "#FB7299",
          "bg_style": 1,
          "border_color": "",
          "img_label_uri_hans": "",
          "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/bangumi/kt/fb0a74b14d6a4e119ae301ba2693febeda051030.png",
          "img_label_uri_hant": "",
          "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/sGu57N6pgK.png",
          "label_theme": "ten_annual_vip",
          "path": "",
          "text": "十年大会员",
          "text_color": "#FFFFFF",
          "use_img_label": true
        },
        "nickname_color": "#FB7299",
        "role": "7",
        "status": 1,
        "theme_type": 0,
        "tv_due_date": "1633622400",
        "tv_vip_pay_type": 0,
        "tv_vip_status": 0,
        "type": 2,
        "vip_pay_type": 1
      }
    },
    "2": {
      "face": "https://i2.hdslb.com/bfs/face/ef0457addb24141e15dfac6fbf45293ccf1e32ab.jpg",
      "face_nft": 0,
      "face_nft_new": 0,
      "mid": "2",
      "name": "碧诗",
      "name_render": {
        "colors_info": { "color": [], "color_ids": [ "6" ] },
        "render_scheme": "Default"
      },
      "nameplate": {
        "condition": "所有自制视频总播放数>=10万",
        "image": "https://i1.hdslb.com/bfs/face/e93dd9edfa7b9e18bf46fd8d71862327a2350923.png",
        "image_small": "https://i2.hdslb.com/bfs/face/275b468b043ec246737ab8580a2075bee0b1263b.png",
        "level": "普通勋章",
        "name": "见习偶像",
        "nid": 10
      },
      "official": { "desc": "", "role": 2, "title": "bilibili创始人(站长)", "type": 0 },
      "pendant": {
        "expire": "0",
        "image": "https://i2.hdslb.com/bfs/garb/item/488870931b1bba66da36d22848f0720480d3d79a.png",
        "image_enhance": "https://i2.hdslb.com/bfs/garb/item/5974f17f9d96a88bafba2f6d18d647a486e88312.webp",
        "image_enhance_frame": "https://i2.hdslb.com/bfs/garb/item/4316a3910bb0bd6f2f1c267a3e9187f0b9fe5bd0.png",
        "n_pid": "32257",
        "name": "EveOneCat2",
        "pid": 32257
      },
      "vip": {
        "avatar_icon": {
          "icon_resource": {
            "type": "ICON_RES_TYPE_IMAGE",
            "url": "https://i0.hdslb.com/bfs/bangumi/kt/aba51485c0d02940c89aeefcf6680510d9858472.png"
          },
          "icon_type": "ICON_TYPE_VIP_ACTIVITY"
        },
        "avatar_subscript": 1,
        "avatar_subscript_url": "",
        "due_date": "3968841600000",
        "label": {
          "bg_color": "#FB7299",
          "bg_style": 1,
          "border_color": "",
          "img_label_uri_hans": "",
          "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/bangumi/kt/53845a8ab8b226131c5d89b198d4b61de91d0aa2.png",
          "img_label_uri_hant": "",
          "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/8u7iRTPE7N.png",
          "label_theme": "ten_annual_vip",
          "path": "",
          "text": "十年大会员",
          "text_color": "#FFFFFF",
          "use_img_label": true
        },
        "nickname_color": "#FB7299",
        "role": "7",
        "status": 1,
        "theme_type": 0,
        "tv_due_date": "2003500800",
        "tv_vip_pay_type": 1,
        "tv_vip_status": 1,
        "type": 2,
        "vip_pay_type": 0
      }
    },
    "3": {
      "face": "http://i0.hdslb.com/bfs/face/d4de6a84557eea8f18510a3f61115d96832aa071.jpg",
      "face_nft": 0,
      "face_nft_new": 0,
      "mid": "3",
      "name": "囧囧倉",
      "name_render": {
        "colors_info": {
          "color": [
            { "color_day": "#CB7919", "color_night": "#E2963C" },
            { "color_day": "#E6A75B", "color_night": "#E6A75B" },
            { "color_day": "#E9BD67", "color_night": "#F8CE7E" }
          ],
          "color_ids": [ "6" ]
        },
        "render_scheme": "Colorful"
      },
      "nameplate": null,
      "official": { "desc": "", "role": 0, "title": "", "type": -1 },
      "pendant": null,
      "vip": {
        "avatar_icon": null,
        "avatar_subscript": 0,
        "avatar_subscript_url": "",
        "due_date": "0",
        "label": {
          "bg_color": "",
          "bg_style": 0,
          "border_color": "",
          "img_label_uri_hans": "",
          "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/d7b702ef65a976b20ed854cbd04cb9e27341bb79.png",
          "img_label_uri_hant": "",
          "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/KJunwh19T5.png",
          "label_theme": "",
          "path": "",
          "text": "",
          "text_color": "",
          "use_img_label": true
        },
        "nickname_color": "",
        "role": "0",
        "status": 0,
        "theme_type": 0,
        "tv_due_date": "0",
        "tv_vip_pay_type": 0,
        "tv_vip_status": 0,
        "type": 0,
        "vip_pay_type": 0
      }
    }
  }
}

多用户详细信息2

https://api.vc.bilibili.com/account/v1/user/cards

请求方式:GET

本接口较其他接口相比,只会返回非常有限的信息

url参数:

参数名类型内容必要性备注
uidsnums目标用户的mid列表必要每个成员间用,分隔,最多50个成员,若超过此限制则返回的data数组为空

json回复:

根对象:

字段类型内容备注
codenum返回值0:成功
-400:请求错误
messagestr错误信息默认为0
ttlnum1
dataarray信息本体用户信息随机排序

data数组:

类型内容备注
0obj用户1
nobj用户(n+1)
……obj…………

data数组中的对象:

字段类型内容备注
midnummid
namestr昵称
facestr头像链接
signstr签名
ranknum用户权限等级
levelnum当前等级0-6 级
silencenum封禁状态0:正常
1:被封

示例:

查询用户uids=1,2,3的详细信息

curl -G 'https://api.vc.bilibili.com/account/v1/user/cards' \
--data-urlencode 'uids=1,2,3'
查看响应示例:
{
    "code": 0,
    "message": "",
    "ttl": 1,
    "data": [{
        "mid": 1,
        "name": "bishi",
        "face": "http://i1.hdslb.com/bfs/face/34c5b30a990c7ce4a809626d8153fa7895ec7b63.gif",
        "sign": "",
        "rank": 10000,
        "level": 6,
        "silence": 0
    }, {
        "mid": 2,
        "name": "碧诗",
        "face": "http://i2.hdslb.com/bfs/face/ef0457addb24141e15dfac6fbf45293ccf1e32ab.jpg",
        "sign": "https://kami.im 直男过气网红 #  We Are Star Dust",
        "rank": 20000,
        "level": 6,
        "silence": 0
    }, {
        "mid": 3,
        "name": "囧囧倉",
        "face": "http://i0.hdslb.com/bfs/face/d4de6a84557eea8f18510a3f61115d96832aa071.jpg",
        "sign": "富强、民主、文明、和谐、自由、平等、公正、法治、爱国、敬业、诚信、友善。",
        "rank": 10000,
        "level": 6,
        "silence": 0
    }]
}