Bilibili API (v0.1.0)

Download OpenAPI specification:Download

Bilibili API 文档。

活动

主题信息

query Parameters
sid
required
integer <int64>

活动 id

bvid
string

来源视频 bvid

Responses

Response samples

Content type
application/json
{}

获取活动列表

query Parameters
plat
required
string
Default: "1,3"
Enum: "1" "3" "1,3"

活动平台类型?

mold
integer <int64>
Default: 0

mold

http
integer <int64>
Default: 3

http

pn
integer <int64>
Default: 1

目标页码

ps
integer <int64>
Default: 15

每页条数

Responses

Response samples

Content type
application/json
{}

获取相簿热门活动列表

query Parameters
type
integer <int64>
Default: 0
Enum: 0 1 2

活动类型

biz
integer <int64>
Default: 0
Enum: 0 1 2

分区

page_num
integer <int64>
Default: 4

页码

page_size
integer <int64>
Default: 0

每页项数

Responses

Response samples

Content type
application/json
{}

相簿

取消收藏相簿

cookie Parameters
SESSDATA
required
string

SESSDATA Cookie

Request Body schema: application/x-www-form-urlencoded
fav_id
required
integer <int64>

相簿 ID

biz_type
required
integer <int64>

业务类型

csrf_token
string

CSRF Token

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "OK",
  • "message": "OK",
  • "data": [
    ]
}

收藏相簿

cookie Parameters
SESSDATA
required
string

SESSDATA Cookie

Request Body schema: application/x-www-form-urlencoded
fav_id
required
integer <int64>

相簿 ID

biz_type
required
integer <int64>

业务类型

csrf_token
string

CSRF Token

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "OK",
  • "message": "OK",
  • "data": [
    ]
}

获取相簿热门活动列表

query Parameters
type
integer <int64>
Default: 0
Enum: 0 1 2

活动类型

biz
integer <int64>
Default: 0
Enum: 0 1 2

分区

page_num
integer <int64>
Default: 4

页码

page_size
integer <int64>
Default: 0

每页项数

Responses

Response samples

Content type
application/json
{}

APP

获取 APP 端开屏图片列表

query Parameters
appkey
required
string

APP 密钥

ts
required
integer <int64>

当前时间戳

sign
required
string

APP 签名

Responses

Response samples

Content type
application/json
{}

获取 APP 端开屏幕广告信息

query Parameters
build
required
integer <int64>

客户端内部版本号

mobi_app
required
string
Enum: "android" "iphone" "ipad"

mobi_app

platform
required
string
Enum: "android" "ios"

platform

height
required
integer <int64>

屏幕高度

width
required
integer <int64>

屏幕宽度

birth
required
string

生日日期 (四位数,例 0101)

Responses

Response samples

Content type
application/json
{}

获取版本信息

query Parameters
mobi_app
string
Enum: "android" "iphone" "ipad" "win" "android_tv_yst" "android_car" "pc_client"

目标客户端类型

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": [
    ]
}

版本升级

query Parameters
abi
string
Example: abi=arm64-v8a

设备 CPU ABI

appid
string
Example: appid=tv.danmaku.bili

客户端类型

brand
string
Example: brand=google

设备品牌

build
required
integer <int64>
Example: build=8000200

当前 APP 版本号

channel
required
string
Example: channel=master

APP 分发渠道

deviceid
string

设备唯一 ID

env
string
Default: "prod"

APP 分发环境

iv
integer <int64>
Example: iv=8000210

当前 APP innerVer

mobi_app
required
string
Example: mobi_app=android

APP mobi_app

model
string
Example: model=Pixel 2 XL

设备型号

nt
required
string
Default: "1"

nt

ov
required
string
Example: ov=30

设备 OS 版本

platform
string
Example: platform=android

设备平台

screen
string
Example: screen=2712_1440@537.882_537.882

设备屏幕参数

sn
required
integer <int64>
Example: sn=15088473

当前 APP SN

vn
required
string
Example: vn=8.0.0

当前 APP 版本名称

Responses

Response samples

Content type
application/json
{}

专栏

点赞文章

cookie Parameters
SESSDATA
required
string

SESSDATA Cookie

Request Body schema: application/x-www-form-urlencoded
id
required
integer <int64>

文章 cv id

type
required
integer <int64>
Enum: 1 2

操作方式

csrf
required
string

CSRF Token

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1
}

投币文章

cookie Parameters
SESSDATA
required
string

SESSDATA Cookie

Request Body schema: application/x-www-form-urlencoded
aid
required
integer <int64>

文章 cv id

upid
required
integer <int64>

文章作者 mid

multiply
required
integer <int64> <= 2

投币数量

avtype
required
integer <int64>

avtype

csrf
required
string

CSRF Token

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

收藏文章

cookie Parameters
SESSDATA
required
string

SESSDATA Cookie

Request Body schema: application/x-www-form-urlencoded
id
required
integer <int64>

文章 cv id

csrf
required
string

CSRF Token

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1
}

获取文集基本信息

query Parameters
id
required
integer <int64>

文集 rl id

cookie Parameters
SESSDATA
required
string

SESSDATA Cookie

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

获取专栏文章基本信息

query Parameters
id
required
integer <int64>

专栏 cv id

cookie Parameters
SESSDATA
required
string

SESSDATA Cookie

Responses

Response samples

Content type
application/json
{}

用户

获取用户专栏文章列表

query Parameters
mid
required
integer <int64>

用户 uid

pn
integer <int64>
Default: 1

页码

ps
integer <int64> [ 1 .. 30 ]
Default: 30

每页数量

sort
string
Default: "publish_time"
Enum: "publish_time" "view" "fav"

排序方式

cookie Parameters
SESSDATA
required
string

SESSDATA Cookie

Responses

Response samples

Content type
application/json
{}

获取用户专栏文章列表(旧)

query Parameters
mid
required
integer <int64>

用户 uid

pn
integer <int64>
Default: 1

页码

ps
integer <int64> [ 1 .. 30 ]
Default: 30

每页数量

sort
string
Default: "publish_time"
Enum: "publish_time" "view" "fav"

排序方式

cookie Parameters
SESSDATA
required
string

SESSDATA Cookie

Responses

Response samples

Content type
application/json
{}

获取用户专栏文集列表

query Parameters
mid
required
integer <int64>

用户 uid

sort
integer <int64>
Default: 0
Enum: 0 1

排序方式

jsonp
string

jsonp

callback
string

callback

cookie Parameters
SESSDATA
required
string

SESSDATA Cookie

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {}
}

导航栏用户信息

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

登录用户信息 (APP 端)

query Parameters
access_key
required
string

APP 登录 Token

appkey
required
string

APP 密钥

ts
required
integer <int32>

当前时间戳

sign
required
string

APP 签名

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

登录用户状态数(双端)

Authorizations:
sessionData
query Parameters
access_key
string

APP 登录 Token

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

获取硬币数

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "status": "true",
  • "data": {
    }
}

音频

查询音频收藏状态

query Parameters
sid
required
integer <int64>

音频 au id

cookie Parameters
SESSDATA
required
string

SESSDATA Cookie

DedeUserID
required
integer <int64> >= 1

DedeUserID Cookie

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "success",
  • "data": true
}

查询音频投币数

query Parameters
sid
required
integer <int64>

音频 au id

cookie Parameters
SESSDATA
required
string

SESSDATA Cookie

DedeUserID
required
integer <int64> >= 1

DedeUserID Cookie

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "success",
  • "data": 1
}

投币音频

cookie Parameters
SESSDATA
required
string

SESSDATA Cookie

Request Body schema: application/x-www-form-urlencoded
sid
required
integer <int64>

音频 au id

multiply
required
integer <int64> <= 2

投币数量

csrf
required
string

CSRF Token

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "0",
  • "data": 1
}

/audio/music-service-c/web/song/info

query Parameters
sid
required
integer

音频auid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "success",
  • "data": {
    }
}

/audio/music-service-c/web/tag/song

query Parameters
sid
required
integer

音频auid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "success",
  • "data": [
    ]
}

/audio/music-service-c/web/member/song

query Parameters
sid
required
integer

音频auid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "success",
  • "data": [
    ]
}

/audio/music-service-c/web/song/lyric

query Parameters
sid
required
integer

音频auid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "success",
  • "data": "[ar:萧忆情]\n\n[ti:威风堂堂]\n\n[00:26.64]引诱谁去摘下禁果\n\n[00:28.11]甜美滋味偷咬一口\n\n[00:30.03]触及到了最深处果核\n\n[00:31.82]身体开始颤抖\n\n[00:33.85]舌尖已濡湿双腿内侧\n\n[00:35.55]神经末梢警报响彻\n\n[00:37.39]自内而外逐渐变得火热\n\n[00:39.14]现在无须再遵守规则\n\n[00:42.14]还故作矜持说违心的话\n\n[00:45.84]为何动作不停下\n\n[00:47.85]停下来\n\n[00:48.39]已经快停不下来\n\n[00:49.42]还想索取更多\n\n[00:50.46]踩碎那PRIDE\n\n[00:51.41]忘记毫无意义的理智存在\n\n[00:53.27]让暧昧因子在四处的徘徊\n\n[00:55.19]给我收起你那\n\n[00:56.21]太虚伪的STYLE\n\n[00:57.01]直白赤裸的爱\n\n[00:58.00]最原始的DIVE\n\n[00:58.86]喘息中断续的声音叫期待\n\n[01:00.65]别掩饰此刻\n\n[01:01.50]那让人意乱情迷的SMILE\n\n[01:10.90]缓慢吐息迷惑双眼的雾\n\n[01:12.49]强制禁锢身下轻舔锁骨\n\n[01:14.23]就让封锁的心渐渐领悟\n\n[01:15.97]别继续装无辜\n\n[01:17.54]开始脱下的衬衫\n\n[01:19.08]最后的纽扣解开它\n\n[01:20.98]快感get\n\n[01:21.85]从此不顾一切\n\n[01:23.32]还在犹豫什么\n\n[01:24.78]Darling\n\n[01:26.54]站在自由世界的正中央\n\n[01:30.09]窥探你幻想的是否太过浪荡\n\n[01:33.99]太难耐\n\n[01:34.41]分分秒秒太难耐\n\n[01:35.61]床笫间的狩猎\n\n[01:36.63]充满野心的TRY\n\n[01:37.66]不承认口头上无理的摊牌\n\n[01:39.58]只想要在身体里深埋\n\n[01:41.34]现在由我掌控\n\n[01:42.36]随心所欲的LIFE\n\n[01:43.40]给你要的未来\n\n[01:44.41]永远不腐坏\n\n[01:45.32]所有的阴暗面统统藏起来\n\n[01:46.70]仅为你一人展现那能骄傲夸耀的MIND\n\n[01:49.90]将不安的情绪碾至粉末\n\n[01:53.14]抹在你胸口印上最鲜艳的红\n\n[02:21.06]别打算缩起来置身之外\n\n[02:22.64]无论何时\n\n[02:23.27]NO TIME\n\n[02:23.58]ALL RIGHT\n\n[02:24.21]打破一切的羞耻值\n\n[02:25.43]哪里奇怪\n\n[02:26.06]哪里奇怪\n\n[02:26.68]哪里奇怪\n\n[02:27.30]BURN BURN BURN\n\n[02:28.22]想要的就是那\n\n[02:29.17]啊 没错\n\n[02:29.87]再给我更多的触摸\n\n[02:31.62]顺位交换贴近肌肤的DANCE\n\n[02:33.34]好吧 肆无忌惮\n\n[02:34.98]停下来\n\n[02:35.35]已经快停不下来\n\n[02:36.50]还想索取更多\n\n[02:37.68]踩碎那PRIDE\n\n[02:38.38]忘记毫无意义的理智存在\n\n[02:40.27]让暧昧因子在四处的徘徊\n\n[02:42.11]给我收起你那\n\n[02:43.16]太虚伪的STYLE\n\n[02:44.00]直白赤裸的爱\n\n[02:45.06]最原始的DIVE\n\n[02:45.90]喘息中断续的声音叫期待\n\n[02:47.76]别掩饰此刻那让人意乱情迷的SMILE\n\n[02:50.64]将不安的情绪碾至粉末\n\n[02:54.09]抹在你胸口印上最鲜艳的红\n\n[02:58.35]抛弃所有只想拥有此刻"
}

/audio/music-service-c/web/url

query Parameters
sid
required
integer

音频auid

quality
required
integer
Enum: 0 1 2 3

音质代码, 详见表格

privilege
required
integer
Value: 2

必须为2

Responses

Response samples

Content type
application/json
{}

/audio/music-service-c/url

query Parameters
access_key
required
string

APP登录Token

songid
required
integer

音频auid

quality
required
integer
Enum: 0 1 2 3

音质代码, 详见表格

privilege
required
integer
Value: 2

必须为2

mid
required
integer

当前用户mid, 可为任意值

platform
required
string

平台标识, 可为任意值

Responses

Response samples

Content type
application/json
{}

/x/copyright-music-publicity/toplist/all_period

query Parameters
list_type
required
integer
Enum: 1 2

榜单类型

csrf
string

CSRF Token(位于cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

/x/copyright-music-publicity/toplist/detail

query Parameters
list_id
required
integer
csrf
string

CSRF Token(位于cookie)

Responses

Response samples

Content type
application/json
{}

/x/copyright-music-publicity/toplist/music_list

query Parameters
list_id
required
integer
csrf
string

CSRF Token(位于cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

/x/copyright-music-publicity/toplist/subscribe/update

query Parameters
state
required
integer
Enum: 1 2

操作代码

list_id
integer
csrf
string

CSRF Token(位于cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1
}

/audio/music-service-c/web/stat/song

query Parameters
sid
required
integer

音频auid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "success",
  • "data": {
    }
}

追番

追番

cookie Parameters
SESSDATA
required
string

SESSDATA Cookie

Request Body schema: application/x-www-form-urlencoded
season_id
required
string

剧集 ss id

csrf
required
string

csrf token

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "success",
  • "result": {
    }
}

取消追番

cookie Parameters
SESSDATA
required
string

SESSDATA Cookie

Request Body schema: application/x-www-form-urlencoded
season_id
required
string

剧集 ss id

csrf
required
string

csrf token

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "success",
  • "result": {
    }
}

剧集信息

/pgc/review/user

Authorizations:
sessionData
query Parameters
media_id
required
string

剧集mdid

Responses

Response samples

Content type
application/json
{}

/pgc/view/web/season

query Parameters
season_id
integer

番剧ssid

ep_id
integer

剧集epid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "success",
  • "result": {
    }
}

/pgc/web/season/section

Authorizations:
sessionData
query Parameters
season_id
required
integer

剧集ssid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "success",
  • "result": {
    }
}

番剧时间线

/pgc/web/timeline

Authorizations:
sessionData
query Parameters
types
required
string
Enum: "1" "3" "4"

类别

before
required
integer

开始于前几日

after
required
integer

结束于后几日

Responses

Response samples

Content type
application/json
{}

视频流

/pgc/player/web/playurl

Authorizations:
sessionData
query Parameters
avid
integer

稿件avid

bvid
string

稿件bvid

ep_id
integer

稿件epid

cid
integer

视频cid

qn
integer
Enum: 6 16 32 64 74 80 112 116 120

视频清晰度选择, 未登录默认32(480P), 登录默认64(720P), 值含义见表格

fnval
integer
Enum: 0 1 2 16 80

视频获取方式选择, 默认为0, 0 2:flv方式(可能会有分段) 1:低清mp4方式(仅240P与360P,且限速65K/s) 16 80:dash方式(音视频分流,支持H.265)

fnver
integer
Value: 0

固定为0

fourk
integer
Enum: 0 1

是否允许4K视频, 默认为0, 画质最高1080P:0, 画质最高4K:1

session
string

从视频播放页的网页源码中获取

from_client
string

固定值:BROWSER

drm_tech_type
integer
Value: 2

固定值:2

Responses

Response samples

Content type
application/json
{}

仲裁操作

/x/credit/v2/jury/apply

query Parameters
csrf
required
string

cookie中bili_jct的值

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1
}

/x/credit/v2/jury/case/next

header Parameters
cookie
required
string

cookie

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

/x/credit/v2/jury/vote

query Parameters
case_id
required
string

案件id

vote
required
integer

投票类型, 见「众裁信息」中表

insiders
integer

是否观看此类视频, 默认值为0, 见「众裁信息」中表

content
string

理由

anonymous
integer

是否匿名, 默认值为0, 0:不匿名 1:匿名

csrf
required
string

cookie中bili_jct的值

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1
}

风纪委员会

/x/credit/v2/jury/jury

Authorizations:
sessionData
query Parameters
access_key
string

APP登录Token

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

/x/credit/v2/jury/kpi

query Parameters
term_id
integer

任期id, 未传参或留空时, 返回最近一次已结束的任期的数据

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

/x/credit/v2/jury/requirement

Authorizations:
sessionData
query Parameters
access_key
string

APP登录Token

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

众裁信息

/x/credit/v2/jury/case/info

Authorizations:
sessionData
query Parameters
access_key
string

APP登录Token

case_id
required
string

案件id

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

/x/credit/v2/jury/case/list

query Parameters
pn
integer

页码

ps
integer

每页显示数量

header Parameters
Cookie
required
string

Cookie

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

/x/credit/v2/jury/case/opinion

query Parameters
case_id
required
string

仲裁案件id

pn
integer

显示第x页

ps
integer

每页显示y条观点

header Parameters
Cookie
required
string

Cookie

Responses

Response samples

Content type
application/json
{}

封禁公示

/x/credit/blocked/list

query Parameters
btype
integer
Enum: 0 1

来源筛选, 仲裁系统升级后1类型已不再更新

otype
integer
Enum: 0 1 2 3 4 5 6 8 10 11

类型筛选, 默认为0, 全部类型

pn
integer

页码

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": [
    ]
}

/x/credit/blocked/info

query Parameters
id
required
integer

封禁公示id

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

全站广播

/x/web-interface/broadcast/servers

query Parameters
platform
required
string

平台选择

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

课程信息

/pugv/view/web/season

Authorizations:
sessionData
query Parameters
season_id
integer

课程ssid, 与番剧ssid不互通

ep_id
integer

课程epid, 与番剧epid不互通

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "success",
  • "data": {
    }
}

/pugv/view/web/ep/list

Authorizations:
sessionData
query Parameters
season_id
required
integer

课程ssid, 与番剧ssid不互通

ps
integer

每页项数, 默认为50

pn
integer

页码, 默认为1

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "success",
  • "data": {
    }
}

课程视频流

/pugv/player/web/playurl

Authorizations:
sessionData
query Parameters
avid
required
integer

课程avid

ep_id
required
integer

课程epid

cid
required
integer

视频cid

qn
integer
Enum: 6 16 32 64 74 80 112 116 120

视频清晰度选择, 参考qn定义

fnver
integer

视频流版本, 参考fnver定义

fnval
integer

视频流类型, 参考fnval定义

fourk
integer
Enum: 0 1

是否允许4K视频, 默认为0, 画质最高1080P:0, 画质最高4K:1

Responses

Response samples

Content type
application/json
{}

地理位置

/x/web-interface/zone

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

/xlive/web-room/v1/index/getIpInfo

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

/ip_service/v1/ip_service/get_ip_addr

query Parameters
ip
string

IP地址, IPv4或IPv6地址不限, 留空与根据请求IP确定地理位置基本相同

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "",
  • "msg": "",
  • "data": {
    }
}

/client/v1/Ip/getInfoNew

query Parameters
ip
string

IP地址, IPv4或IPv6地址不限, 留空与根据请求IP确定地理位置基本相同

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "",
  • "msg": "",
  • "data": {
    }
}

评论区操作

/x/v2/reply/add

Authorizations:
sessionData
query Parameters
access_key
string

APP登录Token

type
required
integer
Enum: 1 11 12 17

评论区类型代码, 类型代码见表

oid
required
integer

目标评论区id

root
integer

根评论rpid, 二级评论以上使用

parent
integer

父评论rpid, 二级评论同根评论id, 大于二级评论为要回复的评论id

message
required
string

发送评论内容, 最大1000字符, 表情使用表情转义符

plat
integer
Enum: 1 2 3 4

发送平台标识, 默认为1, 1:web端 2:安卓客户端 3:ios客户端 4:wp客户端

csrf
string

CSRF Token(位于cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

/x/v2/reply/action

Authorizations:
sessionData
query Parameters
access_key
string

APP登录Token

type
required
integer
Enum: 1 11 12 17

评论区类型代码, 类型代码见表

oid
required
integer

目标评论区id

rpid
required
integer

目标评论rpid

action
integer
Enum: 0 1

操作代码, 默认为0, 0:取消赞 1:点赞

csrf
string

CSRF Token(位于cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1
}

/x/v2/reply/hate

Authorizations:
sessionData
query Parameters
access_key
string

APP登录Token

type
required
integer
Enum: 1 11 12 17

评论区类型代码, 类型代码见表

oid
required
integer

目标评论区id

rpid
required
integer

目标评论rpid

action
integer
Enum: 0 1

操作代码, 默认为0, 0:取消踩 1:点踩

csrf
string

CSRF Token(位于cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1
}

/x/v2/reply/del

Authorizations:
sessionData
query Parameters
access_key
string

APP登录Token

type
required
integer
Enum: 1 11 12 17

评论区类型代码, 类型代码见表

oid
required
integer

目标评论区id

rpid
required
integer

目标评论rpid

csrf
string

CSRF Token(位于cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1
}

/x/v2/reply/top

Authorizations:
sessionData
query Parameters
access_key
string

APP登录Token

type
required
integer
Enum: 1 11 12 17

评论区类型代码, 类型代码见表

oid
required
integer

目标评论区id

rpid
required
integer

目标评论rpid

action
integer
Enum: 0 1

操作代码, 默认为0, 0:取消置顶 1:设为置顶

csrf
string

CSRF Token(位于cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1
}

/x/v2/reply/report

Authorizations:
sessionData
query Parameters
access_key
string

APP登录Token

type
required
integer
Enum: 1 11 12 17

评论区类型代码, 类型代码见表

oid
required
integer

目标评论区id

rpid
required
integer

目标评论rpid

reason
required
integer
Enum: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

举报类型, 类型代码见下表

content
string

其他举报备注, reason=0时有效

csrf
string

CSRF Token(位于cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1
}

评论区

/x/v2/reply

Authorizations:
sessionData
query Parameters
access_key
string

APP 登录 Token

type
required
integer
Enum: 1 11 12 17

评论区类型代码, 类型代码见表

oid
required
integer

目标评论区 id

sort
integer
Enum: 0 1 2

排序方式, 默认为0, 0:按时间 1:按点赞数 2:按回复数

nohot
integer
Enum: 0 1

是否不显示热评, 默认为0, 1:不显示 0:显示

ps
integer

每页项数, 默认为20, 定义域:1-20

pn
integer

页码, 默认为1

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

/x/v2/reply/wbi/main

query Parameters
access_key
string

APP 登录 Token

type
required
integer
Enum: 1 11 12 17

评论区类型代码, 类型代码见表

oid
required
integer

目标评论区 id

mode
integer
Enum: 0 1 2 3

排序方式, 默认为 3, 0 3:仅按热度 1:按热度+按时间 2:仅按时间

next
integer

翻页, 不推荐, 已弃用, 优先级比 pagination_str

object

分页信息, 见下

plat
integer

平台类型

seek_rpid
string

空, 当获取第一页评论时存在

web_location
integer

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

/x/v2/reply/reply

Authorizations:
sessionData
query Parameters
access_key
string

APP 登录 Token

type
required
integer
Enum: 1 11 12 17

评论区类型代码, 类型代码见表

oid
required
integer

目标评论区 id

root
required
integer

根回复 rpid

ps
integer

每页项数, 默认为20, 定义域:1-49

pn
integer

页码, 默认为1

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {}
}

/x/v2/reply/dialog/cursor

Authorizations:
sessionData
query Parameters
access_key
string

APP 登录 Token

type
required
integer
Enum: 1 11 12 17

评论区类型代码, 类型代码见表

oid
required
integer

目标评论区 id

root
required
integer

根回复 rpid

dialog
required
integer

对话树根 rpid

size
required
integer

每页最大项数

min_floor
integer

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {}
}

/x/v2/reply/hot

Authorizations:
sessionData
query Parameters
access_key
string

APP 登录 Token

type
required
integer
Enum: 1 11 12 17

评论区类型代码, 类型代码见表

oid
required
integer

目标评论区 id

root
required
integer

根回复 rpid

ps
integer

每页项数, 默认为20, 定义域:1-49

pn
integer

页码, 默认为1

Responses

Response samples

Content type
application/json
{ }

/x/v2/reply/count

query Parameters
type
required
integer
Enum: 1 11 12 17

评论区类型代码, 类型代码见表

oid
required
integer

目标评论区 id

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

电磁力

/studio/up-rating/v3/rating/info

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

/studio/up-rating/rating/summary

Authorizations:
sessionData
query Parameters
access_key
string

APP 登录 Token

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

/studio/up-rating/rating/history

Authorizations:
sessionData
query Parameters
access_key
string

APP 登录 Token

type
required
integer
Enum: 1 2 3

目标数据类型, 类型代码见下表

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

合集管理

/x2/creative/web/seasons

Authorizations:
sessionData
query Parameters
pn
required
integer

页码

ps
required
integer

每页数量

order
string
Enum: "ctime" "mtime"

排序方式

sort
string
Enum: "asc" "desc"

排序方式

draft
integer
Value: 1

1

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

/x2/creative/web/season/add

Authorizations:
sessionData
query Parameters
title
required
string

合集标题

desc
string

合集简介

cover
required
string

封面图, 从上传封面处获取

season_price
integer
Value: 0

0, 作用尚不明确

csrf
required
string

CSRF Token(即Cookies中bili_jct)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

/x2/creative/web/season/section/episodes/add

Authorizations:
sessionData
query Parameters
csrf
required
string

CSRF Token(即Cookies中bili_jct)

Request Body schema: application/json
required
Array of objects

视频列表

section_id
required
integer

合集小节ID

Responses

Request samples

Content type
application/json
{
  • "episode": [
    ],
  • "section_id": 0
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1
}

/x2/creative/web/season/section/edit

Authorizations:
sessionData
query Parameters
csrf
required
string

CSRF Token(即Cookies中bili_jct)

Request Body schema: application/json
object

小节信息

Array of objects

排序列表

Responses

Request samples

Content type
application/json
{
  • "section": {
    },
  • "sorts": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1
}

/x2/creative/web/season/edit

Authorizations:
sessionData
query Parameters
csrf
required
string

CSRF Token(即Cookies中bili_jct)

Request Body schema: application/json
object

合集信息

Array of objects

排序列表

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1
}

/x2/creative/web/season/del

Authorizations:
sessionData
query Parameters
id
required
integer

合集ID

csrf
required
string

CSRF Token(即Cookie中bili_jct)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1
}

统计与数据

/x/web/index/stat

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

/x/web/data/archive_diagnose/compare

Authorizations:
sessionData
query Parameters
t
integer

时间戳

size
integer

比较最近的N条视频, 默认5

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

/x/web/data/article

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

/x/web/data/pandect

Authorizations:
sessionData
query Parameters
type
required
integer
Enum: 1 2 3 4 5 6 7 8

目标数据类型, 类型代码见下表

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": [
    ]
}

/x/web/data/article/thirty

Authorizations:
sessionData
query Parameters
type
required
integer
Enum: 1 2 3 4 5 6

目标数据类型, 类型代码见下表

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": [
    ]
}

/x/web/data/survey

Authorizations:
sessionData
query Parameters
type
required
integer
Enum: 1 2 3 4 5 6 7 8

目标数据类型, 类型代码见下表

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

/x/web/data/playsource

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

/x/web/data/base

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

投稿

/x/vu/web/cover/up

Authorizations:
sessionData
query Parameters
ts
integer

当前时间, UNIX毫秒时间戳

csrf
required
string

CSRF Token(位于Cookie中bili_jct)

cover
required
string <base64>

视频封面, 经过base64编码的图片数据

Responses

Response samples

Content type
application/json

/x/vupre/web/archive/types/predict

Authorizations:
sessionData
query Parameters
ts
integer

当前时间, UNIX毫秒时间戳

csrf
required
string

CSRF Token(位于Cookie中bili_jct)

filename
string

视频文件名, 从视频上传接口获取,无后缀名,可为空

title
string

视频标题

upload_id
string

上传ID

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": [
    ]
}

/x/vupre/web/tag/recommend

Authorizations:
sessionData
query Parameters
upload_id
string

预测稿件类型upload_id

subtype_id
integer

子分区ID

title
string

视频标题

filename
string

预测稿件类型filename

description
string

视频简介

cover_url
string

视频封面URL, 不含https:http:字串

t
integer

当前UNIX毫秒时间戳

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": [
    ],
  • "message": "0",
  • "request_id": "TAG_1723543336295_3371"
}

/x/vu/web/add/v3

Authorizations:
sessionData
query Parameters
ts
integer

当前时间, UNIX毫秒时间戳

csrf
required
string

CSRF Token(位于Cookie中bili_jct)

Request Body schema: application/json
required
Array of objects

视频信息, 若为分P视频, 请注意数组元素顺序

cover
required
string

视频封面URL, 参见上传视频封面

cover43
required
string

视频封面URL(比例为4:3), 可为空

title
required
string

视频标题, 最多80字

copyright
required
integer

1:自制 2:转载

tid
required
integer

分类ID

tag
required
string

视频标签, 多个标签用,分隔, 最多10个

desc_format_id
required
integer

简介格式ID?, 9999:纯文本

desc
required
string

视频简介, 最多2000字

recreate
required
integer

是否允许二创, -1:允许(默认) 1:不允许

dynamic
required
string

粉丝动态

interactive
required
integer

互动视频?, 0:否

act_reserve_create
required
integer

活动预约?, 0:否

no_disturbance
required
integer

勿扰模式?, 0:否

no_reprint
required
integer

是否允许转载, 1:允许 0:不允许

required
object

字幕信息

dolby
required
integer

杜比音效, 0:否(默认) 1:是

lossless_music
required
integer

无损音乐, 0:否(默认) 1:是

up_selection_reply
required
boolean

精选评论

up_close_reply
required
boolean

关闭评论

up_close_danmu
required
boolean

关闭弹幕

web_os
required
integer

平台类型?

Responses

Request samples

Content type
application/json
{
  • "videos": [
    ],
  • "cover43": "",
  • "title": "Telnet手打HTTP",
  • "copyright": 1,
  • "tid": 122,
  • "tag": "telnet,socket,tcp,linux,http",
  • "desc_format_id": 9999,
  • "desc": "测试用Telnet手打HTTP/1.x协议访问本地服务器, 无SSL/TLS支持",
  • "recreate": -1,
  • "dynamic": "for testing",
  • "interactive": 0,
  • "act_reserve_create": 0,
  • "no_disturbance": 0,
  • "no_reprint": 1,
  • "subtitle": {
    },
  • "dolby": 0,
  • "lossless_music": 0,
  • "up_selection_reply": false,
  • "up_close_reply": false,
  • "up_close_danmu": false,
  • "web_os": 3
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

/preupload

Authorizations:
sessionData
query Parameters
name
required
string

文件名, 会影响返回的上传地址

r
required
string
Value: "upos"

上传区域?

profile
required
string
Enum: "ugcfx/bup" "feedback/bup"

上传配置?

probe_version
integer

上传版本?

upcdn
string

上传CDN?

zone
string

上传区域?

ssl
integer

是否使用SSL?

version
string

上传版本?

build
integer

上传版本?

size
integer

文件大小, 视频文件大小, 单位字节

webVersion
string

上传版本?

Responses

Response samples

Content type
application/json
{
  • "OK": 1,
  • "auth": "ak=1494471752&cdn=%2F%2Fupos-cs-upcdntxa.bilivideo.com&os=upos&sign=b6c5cc520a281200906aea97e190b098&timestamp=1722155211.324&uid=616368979&uip=108.181.24.77&uport=52096&use_dqp=0",
  • "biz_id": 500001630152509,
  • "chunk_retry": 10,
  • "chunk_retry_delay": 3,
  • "chunk_size": 10485760,
  • "endpoint": "//upos-cs-upcdntxa.bilivideo.com",
  • "endpoints": [
    ],
  • "expose_params": { },
  • "message": "0",
  • "ttl": 1
}

/x/web/archive/videos

Authorizations:
sessionData
query Parameters
aid
required
integer

av号

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

视频杂项

/x2/creative/web/archives/sp

Authorizations:
sessionData
query Parameters
pn
required
integer

页码

ps
integer

每页数量, 留空为100

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

客服消息

/x/custom/session_svr/v1/heart_beat

Authorizations:
sessionData
query Parameters
shop_id
integer
Value: 0

0

shop_father_id
integer
Value: 0

0

build
integer
Value: 0

客户端版本, web:0

mobi_app
string

客户端类型

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "ok",
  • "message": "ok",
  • "ttl": 1
}

/x/custom/msg_svr/v1/upload

Authorizations:
sessionData
Request Body schema: multipart/form-data
file
string <binary>

文件内容

filename
string

文件名

mid
integer

用户mid

csrf
string

CSRF Token(位于Cookie中bili_jct)

Responses

弹幕操作

/x/v2/dm/post

query Parameters
web_location
integer
Value: 1315873

1315873

csrf
string

CSRF Token(即Cookie中bili_jct)

w_rid
required
string

Wbi签名, 参见Wbi签名

wts
required
string

UNIX秒级时间戳, 参见Wbi签名

access_key
string

APP登录Token

type
required
integer
Enum: 1 2

弹幕类选择

oid
required
integer

视频cid

msg
required
string

弹幕内容, 长度小于100字符

bvid
string

稿件bvid

aid
integer

稿件avid

progress
integer

弹幕出现在视频内的时间, 单位为毫秒, 默认为0

color
integer

弹幕颜色设置, 十进制RGB888值, 如16777215为#FFFFFF即白色

fontsize
integer
Enum: 12 16 18 25 36 45 64

弹幕字号设置, 默认为25, 极小:12, 超小:16, 小:18, 标准:25, 大:36, 超大:45, 极大:64

pool
integer
Enum: 0 1 2

弹幕池选择, 默认为0, 0:普通池 1:字幕池 2:特殊池(代码/BAS弹幕)

mode
required
integer
Enum: 1 4 5 7 9

弹幕类型选择

rnd
integer

当前时间戳*1000000, 若无此项, 则发送弹幕冷却时间限制为90s, 若有此项, 则发送弹幕冷却时间限制为5s

colorful
integer
Value: 60001

彩色弹幕, 60001:专属渐变彩色(需要会员)

checkbox_type
integer
Enum: 0 4

是否带UP身份标识, 0:普通 4:带有标识

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

/x/v2/dm/command/post

Authorizations:
sessionData
query Parameters
access_key
string

APP 登录 Token

type
required
integer
Enum: 1 2 5

互动弹幕类型

aid
required
integer

稿件 avid

cid
required
integer

视频 cid

progress
integer

弹幕出现在视频内的时间, 单位为毫秒, 默认为 0

plat
required
integer
Enum: 1 2 8

平台标识

data
required
string

json 序列

dmid
integer

修改互动弹幕的弹幕 id, 注:修改弹幕plat必须为 8

csrf
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{ }

/x/v2/dm/command/grade/post

Authorizations:
sessionData
query Parameters
aid
required
integer

稿件aid

cid
required
integer

分P cid

progress
required
integer

播放进度, 单位为毫秒

grade_id
required
integer

打分id

grade_score
required
integer <= 10

分数, 偶数, 最大10

polaris_app_id
integer
Value: 100

100

polaris_platfrom
integer
Value: 5

5

spmid
string
Example: spmid=333.788.0.0

333.788.0.0

from_spmid
string

来源spmid

csrf
required
string

CSRF Token(即Cookie中的bili_jct)

Responses

Response samples

Content type
application/json
{ }

/x/dm/recall

Authorizations:
sessionData
query Parameters
access_key
string

APP 登录 Token

dmid
required
integer

弹幕 dmid

cid
required
integer

视频 cid

csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{ }

/x/dm/adv/buy

Authorizations:
sessionData
query Parameters
access_key
string

APP 登录 Token

mode
required
string
Value: "sp"

sp

cid
required
integer

视频 cid

csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{ }

/x/dm/adv/state

Authorizations:
sessionData
query Parameters
access_key
string

APP 登录 Token

mode
required
string
Value: "sp"

sp

cid
required
integer

视频 cid

Responses

Response samples

Content type
application/json
{ }

/x/v2/dm/thumbup/add

Authorizations:
sessionData
query Parameters
access_key
string

APP 登录 Token

dmid
required
integer

目标弹幕 dmid

oid
required
integer

目标弹幕所在视频 cid

op
required
integer
Enum: 1 2

操作

platform
string
Enum: "web_player" "android"

平台标识

csrf
required
string

CSRF Token(位于 Cookie)

Responses

Response samples

Content type
application/json
{ }

/x/dm/report/add

Authorizations:
sessionData
query Parameters
access_key
string

APP 登录 Token

cid
required
integer

视频 cid

dmid
required
integer

弹幕 dmid

reason
required
integer
Enum: 1 2 3 4 5 6 7 8 9 10 11 12

举报类型, 类型代码见下表

content
string

其他举报备注, reason=11 时有效

csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{ }

/x/v2/dm/edit/state

Authorizations:
sessionData
query Parameters
access_key
string

APP 登录 Token

type
required
integer
Value: 1

弹幕类选择

oid
required
integer

视频 cid

dmids
required
string

弹幕 dmid, 多个 id 之间用 , 分隔

state
required
integer
Enum: 1 2 3

操作代码

csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{ }

/x/v2/dm/edit/pool

Authorizations:
sessionData
query Parameters
access_key
string

APP 登录 Token

type
required
integer
Value: 1

弹幕类选择

oid
required
integer

视频 cid

dmids
required
string

弹幕 dmid, 多个 id 之间用 , 分隔

pool
required
integer
Enum: 0 1

操作代码

csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{ }

名词解释

拉取名词解释列表

该功能用于解释和科普 B 站弹幕、评论等的专有名词及梗,展示其出处,并推荐相关站内内容。

query Parameters
type_id
required
integer

名词类型,如:4代表“哔哩哔哩热词图鉴”,5代表“语言类”

pn
integer
Default: 1

页码

ps
integer
Default: 20

每页项数

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

查询名词解释详情

query Parameters
id
required
integer

名词id,如:1代表“kksk”,2代表“打脸”

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

弹幕设置

修改弹幕个人配置(web端)

修改弹幕个人配置

Authorizations:
sessionData
Request Body schema: form-data
access_key
string

APP登录Token

dm_switch
boolean

弹幕开关

blockscroll
boolean

屏蔽类型-滚动

blocktop
boolean

屏蔽类型-顶部

blockbottom
boolean

屏蔽类型-底部

blockcolor
boolean

屏蔽类型-彩色

blockspecial
boolean

屏蔽类型-特殊

ai_switch
boolean

是否打开智能云屏蔽

ai_level
integer

智能云屏蔽等级

preventshade
boolean

防挡弹幕(底部15%)

dmask
boolean

智能防挡弹幕(人像蒙版)

opacity
number

弹幕不透明度

dmarea
integer

弹幕显示区域

speedplus
number

弹幕速度

fontsize
number

字体大小

screensync
boolean

跟随屏幕缩放比例

speedsync
boolean

根据播放倍速调整速度

fontfamily
string

字体类型

bold
boolean

粗体

fontborder
integer

描边类型

drawType
string

渲染类型

ts
integer

当前时间戳

csrf
string

CSRF Token

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0
}

protobuf弹幕

获取实时弹幕(web端)

2020年5月23日,哔哩哔哩网页端及移动端启用了新的默认弹幕 API,网页端弹幕显示的上限变为原弹幕池上限的两倍。

新的 API 是以 6min 为一个单位加载,即每次加载 6min 内的弹幕

此接口与漫画弹幕相同

只能返回普通弹幕(pool=1 mode=1-7)和代码弹幕(pool=2 mode=8),BAS弹幕(pool=2 mode=9)请从弹幕元数据中获取

互动弹幕(UP 主头像弹幕、关联视频、内嵌关注按钮)也不存在这个接口,请从弹幕元数据中获取

注:仅获取 6min 的整数倍时间内的弹幕,6min 内最多弹幕数为 6000 条(如第一包中弹幕progress值域为0-360000)

query Parameters
type
required
integer
Enum: 1 2

弹幕类

oid
required
integer

视频 cid

pid
integer

稿件 avid

segment_index
required
integer

分包

pull_mode
integer

(?)

ps
integer

(?)

pe
integer

(?)

Responses

获取实时弹幕(web 端新接口,需要 wbi 认证)

2020年5月23日,哔哩哔哩网页端及移动端启用了新的默认弹幕 API,网页端弹幕显示的上限变为原弹幕池上限的两倍。

新的 API 是以 6min 为一个单位加载,即每次加载 6min 内的弹幕

此接口与漫画弹幕相同

只能返回普通弹幕(pool=1 mode=1-7)和代码弹幕(pool=2 mode=8),BAS弹幕(pool=2 mode=9)请从弹幕元数据中获取

互动弹幕(UP 主头像弹幕、关联视频、内嵌关注按钮)也不存在这个接口,请从弹幕元数据中获取

注:仅获取 6min 的整数倍时间内的弹幕,6min 内最多弹幕数为 6000 条(如第一包中弹幕progress值域为0-360000)

query Parameters
type
required
integer
Enum: 1 2

弹幕类

oid
required
integer

视频 cid

pid
integer

稿件 avid

segment_index
required
integer

分包

pull_mode
integer

(?)

ps
integer

(?)

pe
integer

(?)

Responses

获取实时弹幕(APP端)

2020年5月23日,哔哩哔哩网页端及移动端启用了新的默认弹幕 API,网页端弹幕显示的上限变为原弹幕池上限的两倍。

新的 API 是以 6min 为一个单位加载,即每次加载 6min 内的弹幕

此接口与漫画弹幕相同

只能返回普通弹幕(pool=1 mode=1-7)和代码弹幕(pool=2 mode=8),BAS弹幕(pool=2 mode=9)请从弹幕元数据中获取

互动弹幕(UP 主头像弹幕、关联视频、内嵌关注按钮)也不存在这个接口,请从弹幕元数据中获取

注:仅获取 6min 的整数倍时间内的弹幕,6min 内最多弹幕数为 6000 条(如第一包中弹幕progress值域为0-360000)

query Parameters
type
required
integer
Enum: 1 2

弹幕类

oid
required
integer

视频 cid

pid
integer

稿件 avid

segment_index
required
integer

分包

pull_mode
integer

(?)

ps
integer

(?)

pe
integer

(?)

Responses

BAS/代码弹幕专包

2020年5月23日,哔哩哔哩网页端及移动端启用了新的默认弹幕 API,网页端弹幕显示的上限变为原弹幕池上限的两倍。

path Parameters
data
required
string

data

Responses

弹幕元数据

获取弹幕个人配置与互动弹幕及BAS(代码)弹幕专包(web端)

2020-09-25 B站更新了互动弹幕功能,包括UP主头像弹幕、关联视频弹幕、视频内嵌引导关注按钮三大功能。

详情见:

Authorizations:
sessionData
query Parameters
type
required
integer
Value: 1

弹幕类

oid
required
integer

视频cid

pid
integer

稿件avid

Responses

xml弹幕

获取实时弹幕1

实时弹幕池容量有限(根据视频类型500-8000条不等),占满后再发送会使实时弹幕池底部的弹幕压入历史弹幕池(类似于堆栈)。

使用deflate压缩,注意解码

query Parameters
oid
required
integer

视频cid

Responses

获取实时弹幕2

效果与前者相同

使用deflate压缩,注意解码

path Parameters
cid
required
integer

视频cid

Responses

历史弹幕

查询历史弹幕日期

注:历史弹幕的xml接口已经失效,现已改为protobuf接口

注:查询历史弹幕需要登录

Authorizations:
sessionData
query Parameters
type
required
integer
Value: 1

1

oid
required
integer

视频cid

month
required
string <date>

查询目标年月

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": [
    ]
}

获取历史弹幕protobuf接口

Authorizations:
sessionData
query Parameters
type
required
integer
Value: 1

弹幕类

oid
required
integer

视频cid

date
required
string <date>

弹幕日期

Responses

获取历史弹幕xml接口

结果为标准xml格式弹幕

使用deflate压缩,注意解码

Authorizations:
sessionData
query Parameters
type
required
integer
Value: 1

1

oid
required
integer

视频cid

date
required
string <date>

弹幕日期

Responses

弹幕快照

获取弹幕快照

最近产生的几条弹幕内容,最多20条

query Parameters
aid
required
string

稿件avid或稿件bvid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": [
    ]
}

弹幕点赞查询

查询指定dmid的点赞数

query Parameters
oid
required
integer

视频 cid

ids
required
string

欲查询的弹幕 dmid,多个 id 之间用,分隔

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

智能防挡弹幕

webmask 资源

B 站部分视频提供“智能防挡弹幕”功能,其原理是提供了一个 webmask 二进制文件,其中保存了视频中各个位置的 svg 格式蒙版。

获取的 url 没有权鉴,不需要后面的参数也可以获取。

path Parameters
mask_id
required
string

mask_id

Responses

动态操作

删除动态

Authorizations:
sessionData
Request Body schema: form-data
dynamic_id
required
integer

动态id

csrf_token
required
string

csrf

csrf
required
string

csrf

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "message": "string",
  • "data": {
    }
}

动态

获取全部动态列表

Authorizations:
sessionData
query Parameters
timezone_offset
string
Example: timezone_offset=-480

timezone_offset

type
string
Enum: "all" "video" "pgc" "article"

分类

host_mid
integer
Example: host_mid=293793435

UP主UID

offset
integer

分页偏移量

update_baseline
string

更新基线

page
integer

页数

platform
string
Example: platform=web

平台

features
string
Enum: "itemOpusStyle,listOnlyfans" "itemOpusStyle,listOnlyfans,opusBigCover,onlyfansVote,decorationCard,onlyfansAssetsV2,forwardListHidden,ugcDelete"

功能开关?

web_location
string
Example: web_location=333.1365

web_location

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

检测是否有新动态

Authorizations:
sessionData
query Parameters
type
string
Example: type=all

动态类型

update_baseline
required
string

更新基线

web_location
string
Example: web_location=333.1365

web_location

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

根据关键字搜索用户 (at别人时的填充列表)

注意关键字不一定顺序匹配

Authorizations:
sessionData
query Parameters
keyword
string

搜索关键字

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

动态详情

query Parameters
id
required
integer

动态 ID

timezone_offset
integer
Example: timezone_offset=-480

时区偏移

platform
string
Example: platform=web

平台

gaia_source
string
Example: gaia_source=main_web

来源

features
string
Example: features=itemOpusStyle,opusBigCover,onlyfansVote,endFooterHidden,decorationCard,onlyfansAssetsV2,ugcDelete,onlyfansQaCard,commentsNewVersion

功能

web_location
string
Example: web_location=333.1368

web_location

w_rid
string

Wbi 签名

wts
integer

UNIX 秒级时间戳

header Parameters
x-bili-device-req-json
object
Example: platform,web,device,pc

设备信息?

x-bili-web-req-json
object
Example: spm_id,333.1368

请求信息?

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

动态赞与转发列表

Authorizations:
sessionData
query Parameters
id
required
integer

动态 ID

offset
string

偏移量

web_location
string
Example: web_location=333.1369

web_location

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

动态抽奖详情

query Parameters
business_id
required
integer

动态 ID

bussiness_type
required
integer
Value: 1

业务类型?

csrf
string

CSRF Token (即 Cookie 中 bili_jct 字段)

web_location
string
Example: web_location=333.1330

web_location

dynamic_id
integer

动态 ID

Responses

Response samples

Content type
application/json
{ }

获取特定动态卡片信息

query Parameters
dynamic_id
required
integer

动态id

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    },
  • "message": "string",
  • "msg": 0
}

最近更新UP主列表

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    },
  • "message": "string",
  • "ttl": 0
}

获取导航栏动态列表

Authorizations:
sessionData
query Parameters
update_baseline
integer

更新基线

offset
integer

分页偏移量

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

为图片动态上传图片

注意,非日常类型像素宽高必须大于 420

Authorizations:
sessionData
Request Body schema: multipart/form-data
file_up
required
string <binary>

需要上传的图片文件

category
required
string
Enum: "daily" "draw" "cos"

图片类型

biz
required
string

biz

csrf
required
string

CSRF Token(位于cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "data": {
    }
}

创建投票

注意,options 最少两个,下标 n 从 0 开始

Authorizations:
sessionData
Request Body schema: multipart/form-data
info[title]
required
string

投票标题

info[desc]
string

投票描述

info[type]
required
integer
Enum: 0 1

投票类型

info[choice_cnt]
required
integer

最多选几项

info[duration]
required
integer

投票持续秒数

info[options][n][desc]
string

第 n 项选项文字内容

info[options][n][img_url]
string

第 n 项选项投票图片

csrf
required
string

CSRF Token(位于cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "message": "string",
  • "data": {
    }
}

发表纯文本动态

Authorizations:
sessionData
Request Body schema: multipart/form-data
dynamic_id
required
integer

dynamic_id

type
required
integer

type

rid
required
integer

rid

content
required
string

动态内容

up_choose_comment
integer

up_choose_comment

up_close_comment
integer

up_close_comment

extension
object

位置信息

at_uids
string

动态中 at 到的用户的 uid

Array of objects
csrf_token
required
string

CSRF Token (位于 cookie)

csrf
required
string

CSRF Token (位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "data": {
    }
}

发表复杂动态

Authorizations:
sessionData
query Parameters
csrf
required
string

CSRF Token(位于cookie)

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "dyn_req": {
    }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "data": {
    }
}

立即发布定时动态

Authorizations:
sessionData
Request Body schema: multipart/form-data
draft_id
required
integer

定时动态(草稿)id

csrf
required
string

CSRF Token(位于cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": { },
  • "message": "string",
  • "ttl": 0
}

获取用户空间动态

query Parameters
offset
string

分页偏移量

host_mid
required
string

用户UID

timezone_offset
integer
Example: timezone_offset=-480

时区偏移量

features
string
Example: features=itemOpusStyle

功能

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

动态基本信息

动态转发列表

转发列表总计超过550部分继续获取可能被限制。

由于参数过多,这里不一一列举,请自行参阅其他文件理解。

query Parameters
dynamic_id
required
integer

动态id

offset
string

offset

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    },
  • "message": "string",
  • "msg": 0
}

动态点赞列表

点赞列表总计超过25K部分继续获取可能被限制。

由于参数过多,这里不一一列举,请自行参阅其他文件理解。

query Parameters
dynamic_id
required
integer

动态id

pn
integer

页码

ps
integer <= 20

每页数量

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    },
  • "message": "string",
  • "msg": 0
}

获取草稿列表

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    },
  • "message": "string",
  • "ttl": 0
}

动态信息

获取正在直播的已关注者

Authorizations:
sessionData
query Parameters
size
integer
Default: 10

每页显示数

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    },
  • "message": "string",
  • "msg": 0
}

获取发布新动态的已关注者

Authorizations:
sessionData
query Parameters
teenagers_mode
integer
Enum: 0 1

是否开启青少年模式

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    },
  • "message": "string",
  • "msg": 0
}

话题

获取包含置顶及热门的动态列表

query Parameters
topic_name
string

话题名称

topic_id
integer

话题 ID

sortby
integer
Example: sortby=2

排序方式

offset
integer

偏移值

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    },
  • "message": "string",
  • "msg": 0
}

获取历史动态列表

query Parameters
topic_name
string

话题名称

topic_id
integer

话题 ID

offset_dynamic_id
required
integer

偏移值

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    },
  • "message": "string",
  • "msg": 0
}

充电

新版本B币充电

B币方式充电

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
bp_num
integer

贝壳数量

is_bp_remains_prior
boolean

是否优先扣除B币余额

up_mid
integer

充电对象用户mid

otype
string
Enum: "up" "archive"

充电来源

oid
integer

充电来源代码

csrf
string

CSRF Token(位于cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

老版本B币充电

B币方式充电

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
bp_num
integer

贝壳数量

is_bp_remains_prior
boolean

是否优先扣除B币余额

up_mid
integer

充电对象用户mid

otype
string
Enum: "up" "archive"

充电来源

oid
integer

充电来源代码

csrf
string

CSRF Token(位于cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

获取空间充电公示列表

query Parameters
up_mid
required
integer

目标用户 mid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

获取视频充电鸣谢名单

query Parameters
mid
required
integer

目标用户 mid

aid
integer

目标稿件 avid

bvid
string

目标稿件 bvid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

查询我收到的充电列表

Authorizations:
sessionData
query Parameters
currentPage
required
integer

页数

pageSize
required
integer [ 1 .. 50 ]

分页大小

customerId
required
integer
Default: 10026

customerId

beginTime
string <date>

开始日期

endTime
string <date>

结束日期

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "errno": 0,
  • "msg": "string",
  • "showMsg": "string",
  • "success": true,
  • "data": {
    }
}

查询历史充电数据

Authorizations:
sessionData
query Parameters
pn
integer

页数

ps
integer [ 1 .. 20 ]

分页大小

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

发送充电留言

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
order_id
required
string

留言token

message
required
string

留言内容

csrf
required
string

CSRF Token(位于cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0
}

查询我收到的充电留言

Authorizations:
sessionData
query Parameters
begin
string <date>
Default: "2016-01-01"

起始日期

end
string <date>
Default: "2050-01-01"

结束日期

pn
integer

页码

ps
integer [ 1 .. 12 ]

分页大小

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "ttl": 0,
  • "data": {
    }
}

查询充电留言详情

Authorizations:
sessionData
query Parameters
id
required
integer

留言id

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

回复充电留言

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
csrf
required
string

CSRF Token(位于cookie)

id
required
integer

留言id

msg
required
string

回复信息

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0
}

申请充电二维码及扫码秘钥

微信&支付宝方式充电

操作流程:

  1. 申请充电二维码及扫码秘钥,秘钥临时保存备用
  2. 使用qr_code_url中的值生成二维码
  3. 用支付宝或微信扫描
  4. 以扫码秘钥作为参数轮询检查扫码支付结果

秘钥有效时间为10分钟

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
bp_num
required
integer [ 2 .. 9999 ]

充电B币数量

up_mid
required
integer

充电对象用户mid

is_bp_remains_prior
required
boolean

是否优先扣除B币

otype
required
string
Enum: "up" "archive"

充电来源

oid
required
integer

充电来源代码

csrf
required
string

CSRF Token(位于cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

检查扫码支付结果

Authorizations:
sessionData
query Parameters
qr_token
required
string

扫码秘钥

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

包月充电

获取包月充电列表

Authorizations:
sessionData
query Parameters
page
required
integer

页码

type
required
integer
Enum: 1 2

充电状态

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

UP主包月充电详情

Authorizations:
sessionData
query Parameters
up_mid
required
integer

目标用户mid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

与UP主的包月充电关系

Authorizations:
sessionData
query Parameters
up_mid
required
integer

目标用户mid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

包月充电用户排名

Authorizations:
sessionData
query Parameters
up_mid
required
integer

目标用户mid

ps
integer
Default: 20

每页项数

pn
integer
Default: 1

页码

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

表情操作

添加表情包

只能添加有会员权限或已购买的表情包

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
package_id
required
integer <int32>

表情包 ID

business
required
string
Enum: "reply" "dynamic"

使用场景

csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0
}

移除表情包

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
package_id
required
integer <int32>

表情包 ID

business
required
string
Enum: "reply" "dynamic"

使用场景

csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0
}

表情

获取我的表情列表

Authorizations:
sessionData
query Parameters
business
required
string
Enum: "reply" "dynamic"

使用场景

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

获取指定的表情包明细

query Parameters
business
required
string
Enum: "reply" "dynamic"

使用场景

ids
required
string

表情包 ID

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

获取所有表情包列表

Authorizations:
sessionData
query Parameters
business
required
string
Enum: "reply" "dynamic"

使用场景

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

收藏夹

新建收藏夹

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
title
required
string

收藏夹标题

intro
string

收藏夹简介

privacy
integer
Enum: 0 1

是否公开

cover
string

封面图url

csrf
required
string

CSRF Token(位于cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

修改收藏夹

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
media_id
required
integer <int32>

目标收藏夹mdid

title
required
string

修改收藏夹标题

intro
string

修改收藏夹简介

privacy
integer
Enum: 0 1

是否公开

cover
string

封面图url

csrf
required
string

CSRF Token(位于cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

删除收藏夹

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
media_ids
required
string

目标收藏夹mdid列表

csrf
required
string

CSRF Token(位于cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": 0
}

批量复制内容

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
src_media_id
required
integer <int32>

源收藏夹 ID

tar_media_id
required
integer <int32>

目标收藏夹 ID

mid
required
integer <int32>

当前用户 mid

resources
required
string

目标内容 ID 列表

platform
string

平台标识

csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": 0
}

批量移动内容

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
src_media_id
required
integer <int32>

源收藏夹 ID

tar_media_id
required
integer <int32>

目标收藏夹 ID

mid
required
integer <int32>

当前用户 mid

resources
required
string

目标内容 ID 列表

platform
string

平台标识

csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": 0
}

批量删除内容

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
resources
required
string

目标内容 ID 列表

media_id
required
integer <int32>

目标收藏夹 ID

platform
string

平台标识

csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": 0
}

清空所有失效内容

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
media_id
required
integer <int32>

目标收藏夹id

csrf
required
string

CSRF Token(位于cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": 0
}

获取收藏夹元数据

注:查询权限收藏夹时需要相应用户登录

Authorizations:
sessionData
query Parameters
media_id
required
integer <int32>

目标收藏夹id(完整id)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

获取指定用户创建的所有收藏夹信息

Authorizations:
sessionData
query Parameters
up_mid
required
integer <int32>

目标用户mid

type
integer
Enum: 0 2

目标内容属性

rid
integer <int32>

目标内容id

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

查询用户收藏的视频收藏夹

query Parameters
ps
required
integer <int32> >= 1

每页项数

pn
required
integer <int32>

页码

up_mid
required
integer <int32>

目标用户mid

platform
string
Example: platform=web

平台类型

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

批量获取指定收藏id的内容

query Parameters
resources
required
string

目标内容id列表

platform
string
Example: platform=web

平台标识

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "data": [
    ]
}

获取收藏夹内容明细列表

注:查询权限收藏夹时需要相应用户登录

Authorizations:
sessionData
query Parameters
media_id
required
integer <int32>

目标收藏夹mlid(完整id)

tid
integer <int32>

分区tid

keyword
string

搜索关键字

order
string
Enum: "mtime" "view" "pubtime"

排序方式

type
integer
Enum: 0 1

查询范围

ps
required
integer <int32> [ 1 .. 20 ]

每页数量

pn
integer <int32>
Default: 1

页码

platform
string
Example: platform=web

平台标识

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "data": {
    }
}

获取收藏夹全部内容id

注:查询权限收藏夹时需要相应用户登录

Authorizations:
sessionData
query Parameters
media_id
required
integer <int32>

目标收藏夹mlid(完整id)

platform
string
Example: platform=web

平台标识

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "data": [
    ]
}

主题色

获取主题色基本信息 1

query Parameters
access_key
required
string

APP 登录 Token

appkey
required
string

APP 密钥

build
required
integer <int32>
Example: build=6082000

版本

sign
required
string

APP 签名

Responses

Response samples

Content type
application/json
{
  • "ts": 0,
  • "code": 0,
  • "data": [
    ]
}

获取主题色基本信息 2

Authorizations:
sessionData
query Parameters
mobi_app
string
Example: mobi_app=android

平台标识

build
integer <int32>
Example: build=6082000

版本

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": [
    ]
}

装扮/收藏集

装扮/收藏集搜索 API

query Parameters
keyword
string

关键词

ps
integer

每页返回数据的最大值

pn
integer

当前页数

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

收藏集信息 API

query Parameters
act_id
required
integer <int32>

收藏集活动 ID

lottery_id
integer <int32>

收藏集抽奖 ID

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

APP主题

获取主题及加载动画

query Parameters
access_key
required
string

APP 登录 Token

appkey
required
string

APP 密钥

build
required
integer <int32>
Example: build=6082000

版本

ts
required
integer <int32>
Example: ts=0

当前时间戳

sign
required
string

APP 签名

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "data": {
    }
}

历史记录

获取历史记录列表 (web 端)

注:maxbusinessview_at参数用于历史记录列表的 IFS (无限滚动),其用法类似链表的 next 指针

本接口也可以返回已失效稿件的信息

Authorizations:
sessionData
query Parameters
max
integer <int32>
Default: 0

历史记录截止目标 ID

business
string
Default: ""
Enum: "archive" "pgc" "live" "article-list" "article"

历史记录截止目标业务类型

view_at
integer <int32>
Default: 0

历史记录截止时间

type
string
Default: "all"
Enum: "all" "archive" "live" "article"

历史记录分类筛选

ps
integer <int32> <= 30
Default: 20

每页项数

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

获取视频观看历史记录 (web 端旧版)

本接口也可以返回已失效稿件的信息

Authorizations:
sessionData
query Parameters
pn
integer <int32>
Default: 1

页码

ps
integer <int32>

每页项数

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": [
    ]
}

删除历史记录

Authorizations:
sessionData
Request Body schema: x-www-form-urlencoded
kid
required
string

删除的目标记录,格式为{业务类型}_{目标id}详见备注

csrf
required
string

CSRF Token(位于cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0
}

清空历史记录

Authorizations:
sessionData
Request Body schema: x-www-form-urlencoded
csrf
required
string

CSRF Token(位于cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0
}

停用历史记录

该操作不会影响原有历史记录

Authorizations:
sessionData
Request Body schema: x-www-form-urlencoded
switch
boolean
Default: false
csrf
required
string

CSRF Token(位于cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0
}

查询历史记录停用状态

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": true
}

稍后再看

视频添加稍后再看

最多添加100个视频

Authorizations:
sessionData
Request Body schema: x-www-form-urlencoded
aid
required
integer <int32>

稿件 avid

bvid
string

稿件 bvid

csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0
}

添加频道中所有视频到稍后再看

超过容量后会截取容量之内的添加

Authorizations:
sessionData
Request Body schema: x-www-form-urlencoded
cid
required
integer <int32>

目标频道 ID

mid
required
integer <int32>

目标频道所属的用户 mid

csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "status": true,
  • "data": "string"
}

获取稍后再看视频列表

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

删除稍后再看视频

Authorizations:
sessionData
Request Body schema: x-www-form-urlencoded
viewed
boolean
Default: false
aid
integer <int32>

删除的目标记录的 avid

csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0
}

清空稍后再看视频列表

Authorizations:
sessionData
Request Body schema: x-www-form-urlencoded
csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0
}

直播

用户关注的所有 UP 的直播情况

Authorizations:
sessionData
query Parameters
page
integer <int32>
Default: 1

页码

page_size
integer <int32> [ 1 .. 10 ]
Default: 10

每页的数据数量

ignoreRecord
integer <int32>
Default: 1

尚不明确

hit_ab
boolean

尚不明确

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

直播间

获取直播间信息

query Parameters
room_id
required
integer <int32>

直播间号

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "msg": "string",
  • "data": {
    }
}

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

query Parameters
mid
required
integer <int32>

目标用户 mid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

获取房间页初始化信息

query Parameters
id
required
integer <int32>

目标直播间号(短号)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "message": "string",
  • "data": {
    }
}

获取主播信息

query Parameters
uid
required
integer <int32>

目标用户 mid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "message": "string",
  • "data": {
    }
}

获取直播间基本信息

注:亦可用于批量获取

query Parameters
req_biz
required
string
Default: "web_room_componet"

req_biz

room_ids
Array of integers

直播间短 ID

Responses

Response samples

Content type
application/json
{ }

批量查询直播间状态

query Parameters
uids[]
required
Array of integers

要查询的主播 mid

Responses

Response samples

Content type
application/json
{ }

批量查询直播间状态

Request Body schema: application/x-www-form-urlencoded
uids
required
string

要查询的主播 mid

Responses

Response samples

Content type
application/json
{ }

获取直播间最近历史弹幕

该接口部分返回信息不明, 仅供参考

query Parameters
roomid
required
integer <int32>

直播间短 ID

Responses

Response samples

Content type
application/json
{ }

获取直播间信息

query Parameters
room_id
required
integer <int32>

直播间 ID

protocol
required
string

直播协议

format
required
string

格式

codec
required
string

编码格式

qn
integer <int32>
Default: 150

清晰度编码

platform
string
Default: "web"

platform

ptype
integer <int32>
Default: 8

ptype

dolby
integer <int32>
Default: 5

dolby

panorama
integer <int32>
Default: 1

panorama

Responses

Response samples

Content type
application/json
{ }

获取直播间主播信息

query Parameters
roomid
required
integer <int32>

直播间号

Responses

Response samples

Content type
application/json
{ }

直播间分区

获取全部直播间分区列表

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "message": "string",
  • "data": [
    ]
}

直播间视频流

根据真实直播间号获取直播视频流

query Parameters
cid
required
integer <int32>

目标真实直播间号

platform
string
Default: "web"
Enum: "h5" "web"

直播流格式

quality
integer <int32>
Enum: 2 3 4

画质

qn
integer <int32>
Enum: 80 150 400 10000 20000 30000

画质

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

直播间管理

开通直播间

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
platform
required
string
Default: "web"
visit_id
string
Default: ""
csrf
required
string

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

更新直播间标题

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
room_id
required
integer <int32>

直播间 ID

title
required
string <= 20 characters

直播间标题

csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "message": "string",
  • "data": [
    ]
}

开始直播

开播时必须有分区选择

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
room_id
required
integer <int32>

直播间 ID

area_v2
required
integer <int32>

直播分区 ID(子分区 ID)

platform
required
string
Enum: "web" "bililink"

直播平台

csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "message": "string",
  • "data": {
    }
}

关闭直播

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
room_id
required
integer <int32>

直播间 ID

csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "message": "string",
  • "data": {
    }
}

更新直播间公告

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
room_id
required
integer <int32>

直播间 ID

uid
required
integer <int32>

用户 ID

content
required
string <= 60 characters

公告内容

csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": { },
  • "message": "string",
  • "ttl": 0
}

禁言观众

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
room_id
required
string

直播间 ID

tuid
required
string

要禁言的 UID

msg
string

要禁言的弹幕内容

mobile_app
required
string
Default: "web"

web

csrf_token
required
string

CSRF Token

csrf
required
string

CSRF Token

visit_id
string

不明

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": { }
}

查询直播间禁言列表

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
room_id
required
string

直播间 ID

ps1
required
integer <int32>

列表页码

csrf_token
required
string

CSRF Token

csrf
required
string

CSRF Token

visit_id
string

不明

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

解除禁言

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
roomid
required
string

直播间 ID

id
required
integer <int32>

禁言记录 ID

csrf_token
required
string

CSRF Token

csrf
required
string

CSRF Token

visit_id
string

不明

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": { }
}

直播间信息流

获取信息流认证秘钥

query Parameters
id
required
integer <int32>

直播间真实 ID

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

直播间人气红包

获取指定直播间的红包信息

query Parameters
roomid
required
string

直播间id

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

直播心跳上报

直播心跳 (Web 端)

query Parameters
hb
string

heartbeat 正文

pf
string
Example: pf=web

平台名称

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

直播签到

直播签到

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": { }
}

本月直播签到信息

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

上月直播签到信息

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

登录

获取公钥&盐 (web 端)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

登录操作 (web 端)

Request Body schema: application/x-www-form-urlencoded
username
required
string

用户登录账号

password
required
string

加密后的带盐密码

keep
required
integer <int32>
Default: 0

0

token
required
string

登录 token

challenge
required
string

极验 challenge

validate
required
string

极验 result

seccode
required
string

极验 result + '|jordan'

go_url
string
Default: "https://www.bilibili.com"

跳转 URL

source
string
Enum: "main_web" "main_mini"

登录来源

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "data": {
    }
}

获取公钥&盐 (web 端-旧版)

query Parameters
act
required
string
Default: "getkey"

act

Responses

Response samples

Content type
application/json
{
  • "hash": "string",
  • "key": "string"
}

登录操作 (web 端-旧版)

Request Body schema: application/x-www-form-urlencoded
captchaType
required
integer <int32>
Default: 6
username
required
string

用户登录账号

password
required
string

加密后的带盐密码

keep
required
boolean

是否记住登录

key
required
string

登录 token

challenge
required
string

极验 challenge

validate
required
string

极验 result

seccode
required
string

极验 result + '|jordan'

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "ts": 0,
  • "message": "string",
  • "data": {
    }
}

获取公钥&盐 (APP 端)

Request Body schema: application/x-www-form-urlencoded
appkey
required
string

APP 密钥

sign
required
string

APP 签名

Responses

Response samples

Content type
application/json
{
  • "hash": "string",
  • "key": "string"
}

获取 captcha

Request Body schema: application/x-www-form-urlencoded
source
required
string
Default: "risk"

risk

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

发送验证码

Request Body schema: application/x-www-form-urlencoded
tmp_code
required
string
Default: ""

URL query 中的 tmp_code

sms_type
required
string
Default: "loginTelCheck"

loginTelCheck

recaptcha_token
required
string
Default: ""

验证码 token

gee_challenge
required
string
Default: ""

极验 challenge

gee_validate
required
string
Default: ""

极验 validate

gee_seccode
required
string
Default: ""

极验 seccode

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

验证手机验证码

Request Body schema: application/x-www-form-urlencoded
tmp_code
required
string
Default: ""

URL query 中的 tmp_code

captcha_key
required
string
Default: ""

验证码 key

type
required
string
Default: "loginTelCheck"

loginTelCheck

code
required
integer
Default: ""

接收到的验证码

request_id
required
string
Default: ""

URL query 中的 request_id

source
required
string
Default: "risk"

risk

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

交换 Cookie

Request Body schema: application/x-www-form-urlencoded
source
required
string
Default: "risk"

risk

code
required
string
Default: ""

交换代码

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

申请 captcha 验证码

query Parameters
source
required
string
Default: "main_web"

来源

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

申请 captcha 验证码 (旧版)

query Parameters
plat
required
integer <int32>
Default: 6

平台类型

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

获取国际冠字码 (web 端)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

发送短信验证码 (APP 端)

同手机号短信发送 CD 时间为 60s

短信验证码 timeout 为 5min

Request Body schema: application/x-www-form-urlencoded
cid
required
integer
Default: ""

国际冠字码

tel
required
string
Default: ""

手机号码

login_session_id
required
string
Default: ""

登录标识

recaptcha_token
required
string
Default: ""

登录 API token

gee_challenge
required
string
Default: ""

极验 challenge

gee_validate
required
string
Default: ""

极验 result

gee_seccode
required
string
Default: ""

极验 result jordan

channel
required
string
Default: "bili"

通道?

buvid
required
string
Default: ""

buvid

local_id
required
string
Default: ""

local_id

statistics
required
string
Default: ""

desc

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

发送短信验证码 (web 端)

同手机号短信发送 CD 时间为 60s

短信验证码 timeout 为 5min

Request Body schema: application/x-www-form-urlencoded
cid
required
integer
Default: ""

国际冠字码

tel
required
string
Default: ""

手机号码

source
required
string
Default: ""

登录来源

token
required
string
Default: ""

登录 API token

challenge
required
string
Default: ""

极验 challenge

validate
required
string
Default: ""

极验 result

seccode
required
string
Default: ""

极验 result + '|jordan'

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

使用短信验证码登录 (APP 端)

Request Body schema: application/x-www-form-urlencoded
cid
required
integer
Default: ""

国际冠字码

tel
required
string
Default: ""

手机号码

login_session_id
required
string
Default: ""

登录标识

code
required
integer
Default: ""

短信验证码

captcha_key
required
string
Default: ""

短信登录 token

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "data": {
    }
}

使用短信验证码登录 (web 端)

Request Body schema: application/x-www-form-urlencoded
cid
required
integer
Default: ""

国际冠字码

tel
required
string
Default: ""

手机号码

code
required
integer
Default: ""

短信验证码

source
required
string
Default: ""

登录来源

captcha_key
required
string
Default: ""

短信登录 token

go_url
required
string
Default: "https://www.bilibili.com"

跳转 URL

keep
required
boolean
Default: ""

是否记住登录

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "data": {
    }
}

检查是否需要刷新

Authorizations:
sessionData
query Parameters
csrf
string

CSRF Token(位于 Cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

获取 refresh_csrf

Authorizations:
sessionData
path Parameters
correspondPath
required
string

使用当前毫秒时间戳生成的签名

Responses

刷新 Cookie

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
csrf
required
string
Default: ""

CSRF Token

refresh_csrf
required
string
Default: ""

实时刷新口令

source
required
string
Default: "main_web"

访问来源?

refresh_token
required
string
Default: ""

持久化刷新口令

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

确认更新

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
csrf
required
string
Default: ""

CSRF Token(位于 cookie)

refresh_token
required
string
Default: ""

旧的持久化刷新口令

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0
}

退出登录 (web 端)

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
biliCSRF
required
string

CSRF Token (位于 cookie 中的 bili_jct)

gourl
string
Default: "javascript:history.go(-1)"

成功后跳转到的页面

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "status": true,
  • "ts": 0,
  • "message": "string",
  • "data": {
    }
}

登录记录

查询登录记录

Authorizations:
sessionData
query Parameters
mid
required
integer <int32>

用户 mid

buvid
string

设备虚拟 ID

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

最近一周的登录情况

Authorizations:
sessionData
query Parameters
jsonp
string
Default: "jsonp"

回调函数名?

web_location
string
Default: "333.33"

网页位置?

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

个人中心

获取我的信息

Authorizations:
sessionData
query Parameters
access_key
string

APP 登录 Token

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

查询每日奖励状态

Authorizations:
sessionData
query Parameters
access_key
string

APP 登录 Token

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

查询每日投币获得经验数

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "number": 0
}

查询大会员状态

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

查询账号安全情况

Authorizations:
sessionData
query Parameters
access_key
string

APP 登录 Token

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "data": {
    }
}

查询账号实名认证状态

Authorizations:
sessionData
query Parameters
access_key
string

APP 登录 Token

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

查询实名认证详细信息

Authorizations:
sessionData
query Parameters
access_key
string

APP 登录 Token

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

查询硬币变化情况

Authorizations:
sessionData
query Parameters
access_key
string

APP 登录 Token

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

修改个人签名

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
access_key
required
string
Default: ""

APP 登录 Token

user_sign
required
string
Default: ""

要设置的签名内容

csrf
required
string
Default: ""

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0
}

最近一周的经验记录

Authorizations:
sessionData
query Parameters
jsonp
string
Default: "jsonp"

回调函数名?

web_location
string
Default: "333.33"

网页位置?

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

最近一周的节操记录

Authorizations:
sessionData
query Parameters
jsonp
string
Default: "jsonp"

回调函数名?

web_location
string
Default: "333.33"

网页位置?

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

漫画

分享漫画

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
platform
required
string
Default: "android"

平台

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "meta": { },
  • "data": {
    }
}

漫画签到

签到

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
platform
required
string
Default: "android"

平台

device
required
string
Default: "h5"

平台

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "meta": { },
  • "data": { }
}

查询签到状态

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "data": {
    }
}

漫画购买

购买漫画章节

Authorizations:
sessionData
query Parameters
access_key
required
string

APP登录凭证,使用APP鉴权方式时必填

appkey
string
Default: "cc8617fd6961e070"
mobi_app
string
Default: "android_comic"
version
string
Default: "4.13.0"
build
string
Default: "36413002"
channel
string
Default: "bilicomic"
platform
required
string
Default: "android"
device
string
Default: "android"
buvid
string
machine
string
Default: "samsung+SM-G9730"
is_teenager
integer
Default: 0
no_recommend
integer
Default: 0
ts
integer

秒级时间戳

Request Body schema: application/json
required
epId
required
integer

章节id

buyMethod
required
integer
Enum: 2 4 5

购买方式

couponId
required
integer

漫读券id

comicId
integer

漫画id

autoPayGoldStatus
integer

自动支付漫币状态

isPresale
integer

是否预售

Responses

Request samples

Content type
application/json
{
  • "epId": 0,
  • "buyMethod": 2,
  • "couponId": 0,
  • "comicId": 0,
  • "autoPayGoldStatus": 0,
  • "isPresale": 0
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "data": {
    }
}

漫画详情

获取漫画详情

Authorizations:
sessionData
query Parameters
access_key
string

APP登录凭证

appkey
string
Default: "cc8617fd6961e070"
mobi_app
string
Default: "android_comic"
version
string
Default: "4.13.0"
build
string
Default: "36413002"
channel
string
Default: "bilicomic"
platform
string
Default: "android"

可选值:web/android

device
required
string

如不填则不会获取ep_list信息,可选值:pc/android

buvid
string
machine
string
Default: "samsung+SM-G9730"
is_teenager
integer
Default: 0
no_recommend
integer
Default: 0
ts
integer

秒级时间戳

Request Body schema: application/json
required
comicId
required
integer

漫画id

Responses

Request samples

Content type
application/json
{
  • "comicId": 0
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "data": {
    }
}

漫画图片

获取当前话全部图片地址

Authorizations:
sessionData
query Parameters
access_key
required
string

APP登录凭证,使用APP鉴权方式时必填

appkey
string
Default: "cc8617fd6961e070"
mobi_app
string
Default: "android_comic"
version
string
Default: "4.21.0"
build
string
Default: "36421000"
channel
string
Default: "bilicomic"
platform
string
Default: "android"
device
string
Default: "android"
buvid
string
Example: buvid=XY118701XXXXXXXXX104911DXXXXXCAEXXXXE

长度为37

machine
string

手机品牌+型号

is_teenager
integer
Default: 0
no_recommend
integer
Default: 0
ts
integer

秒级时间戳

Request Body schema: application/json
required
epId
required
integer

当前话的id

Responses

Request samples

Content type
application/json
{
  • "epId": 0
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "data": {
    }
}

获取某一图片的token

Authorizations:
sessionData
query Parameters
access_key
required
string

APP登录凭证,使用APP鉴权方式时必填

appkey
string
Default: "cc8617fd6961e070"
mobi_app
string
Default: "android_comic"
version
string
Default: "4.21.0"
build
string
Default: "36421000"
channel
string
Default: "bilicomic"
platform
string
Default: "android"
device
string
Default: "android"
buvid
string
Example: buvid=XY118701XXXXXXXXX104911DXXXXXCAEXXXXE

长度为37

machine
string
Default: "samsung+SM-G9730"

手机品牌+型号

is_teenager
integer
Default: 0
no_recommend
integer
Default: 0
ts
integer

秒级时间戳

Request Body schema: application/json
required
urls
required
Array of strings

请求token的图片地址

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "data": [
    ]
}

轻享卡

获取轻享卡信息

Authorizations:
sessionData
query Parameters
access_key
string

登录access_key,与SESSDATA二选其一

Request Body schema: application/x-www-form-urlencoded
optional
access_key
string

登录access_key

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "data": {
    }
}

领取轻享卡奖励

Authorizations:
sessionData
query Parameters
access_key
string

登录access_key,与SESSDATA二选其一

Request Body schema: application/json
required
weekIndex
required
integer

第几周

type
required
integer

领取类型

Responses

Request samples

Content type
application/json
{
  • "weekIndex": 0,
  • "type": 0
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "data": { }
}

积分商城

获取当前持有点数

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "data": {
    }
}

获取兑换奖品列表

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "data": [
    ]
}

兑换物品

Authorizations:
sessionData
Request Body schema:
required
product_id
required
integer

物品id

product_num
required
integer

兑换个数

point
required
integer

物品所需点数 现价(real_cost)

Responses

Request samples

Content type
No sample

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

获取兑换历史记录

Authorizations:
sessionData
Request Body schema:
required
act_id
required
integer
Default: 90018

固定值:90018

Responses

Request samples

Content type
No sample

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "data": {
    }
}

获取玩法说明

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "data": {
    }
}

漫画赛季

获取赛季信息

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "data": {
    }
}

赛季奖励领取

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
required
season_id
required
string

赛季 id

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string"
}

漫画用户信息

获取拥有的漫读券列表

Authorizations:
sessionData
query Parameters
access_key
required
string

APP登录凭证,使用APP鉴权方式时必填

Request Body schema: application/json
required
pageNum
required
integer

页数

pageSize
required
integer

分页大小

notExpired
boolean
tabType
integer
Default: 1
type
integer
Default: 0

Responses

Request samples

Content type
application/json
{
  • "pageNum": 0,
  • "pageSize": 0,
  • "notExpired": true,
  • "tabType": 1,
  • "type": 0
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "data": {
    }
}

获取已购漫画

Authorizations:
sessionData
query Parameters
device
string

设备

platform
string

平台

Request Body schema: application/json
required
page_num
required
integer

页数

page_size
required
integer
Default: 15

分页大小

Responses

Request samples

Content type
application/json
{
  • "page_num": 0,
  • "page_size": 15
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "data": [
    ]
}

通知消息

获取未读消息数

Authorizations:
sessionData
query Parameters
build
integer
Default: 0

客户端内部版本号

mobi_app
string
Default: "web"

平台标识

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

获取未读消息数(新接口)

Authorizations:
sessionData
query Parameters
build
integer
Default: 0

客户端内部版本号

mobi_app
string
Default: "web"

平台标识

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

答题操作

提交基础题或附加题

Authorizations:
sessionData
query Parameters
csrf
required
string

CSRF Token(位于 cookie)

Request Body schema: application/x-www-form-urlencoded
required
question_id
required
integer

题目 ID

ans_hash
required
string

选项 hash

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

提交自选题

Authorizations:
sessionData
query Parameters
csrf
required
string

CSRF Token(位于 cookie)

Request Body schema: application/x-www-form-urlencoded
required
question_id
required
integer

题目 ID

ans_hash
required
string

选项 hash

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

获取验证码

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 0,
  • "data": {
    }
}

提交验证码

Authorizations:
sessionData
query Parameters
csrf
required
string

CSRF Token(位于 cookie)

Request Body schema: application/x-www-form-urlencoded
required
types
string

自选题分类(旧版)

type
string

验证码类型

bilibili_token
string
bilibili_code
string
geetest_challenge
string

极验 key

geetest_seccode
string

极验结果 + '|jordan'

geetest_validate
string

极验结果

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1
}

提交自选题分类

Authorizations:
sessionData
query Parameters
csrf
required
string

CSRF Token(位于 cookie)

Request Body schema: application/x-www-form-urlencoded
required
types
required
string

自选题分类(新版)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1
}

提前交卷

Authorizations:
sessionData
query Parameters
csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

拉取题目

拉取基础题

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

拉取附加题

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

拉取自选题

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

查询信息

查询答题状态

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

查询自选题分类

Authorizations:
sessionData

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": [
    ]
}

查询答题结果

query Parameters
hid
required
integer

答题会话 ID

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

笔记操作

保存视频笔记

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
required
oid
required
integer

目标 ID

oid_type
required
integer
Default: 0
Value: 0

目标 ID 类型

note_id
integer

笔记 ID

title
required
string

笔记标题

summary
required
string

笔记预览文本

content
required
string

笔记正文 JSON 序列

tags
string

笔记跳转标签列表

cls
integer
Default: 1
from
string
Enum: "auto" "save" "close"

提交类型

cont_len
integer

正文字数

platform
string

平台

publish
integer
Enum: 0 1

是否公开笔记

auto_comment
integer
Enum: 0 1

是否添加到评论区

csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

删除视频笔记

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
required
oid
required
integer

目标稿件 avid

note_id
integer

笔记 ID

csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1
}

笔记详细信息

查询该稿件是否禁止笔记

query Parameters
aid
required
integer

稿件 avid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

查询私有笔记内容

Authorizations:
sessionData
query Parameters
oid
required
integer

目标 ID

oid_type
required
integer

目标 ID 类型

note_id
required
integer

笔记 ID

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

查询公开笔记内容

query Parameters
cvid
required
integer

笔记对应的专栏 cvid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

笔记列表

查询稿件私有笔记

Authorizations:
sessionData
query Parameters
oid
required
integer

目标 ID

oid_type
required
integer

目标 ID 类型

csrf
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

查询用户私有笔记

Authorizations:
sessionData
query Parameters
ps
required
integer

每页项数

pn
required
integer

页码

csrf
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

查询稿件公开笔记

query Parameters
oid
required
integer

目标 ID

oid_type
required
integer

目标 ID 类型

ps
required
integer

每页项数

pn
required
integer

页码

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

查询用户公开笔记

Authorizations:
sessionData
query Parameters
ps
required
integer

每页项数

pn
required
integer

页码

csrf
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

默认搜索&热搜

获取默认搜索内容(web 端)

query Parameters
wbi_sign
string

wbi 签名

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

获取热搜列表

query Parameters
limit
required
integer [ 1 .. 50 ]

结果限制

platform
string
Default: "web"

平台标识

Responses

Response samples

Content type
application/json
{}

获取热搜列表(web 端)

Responses

Response samples

Content type
application/json
{
  • "exp_str": "string",
  • "code": 0,
  • "cost": {
    },
  • "seid": "string",
  • "timestamp": 0,
  • "message": "string",
  • "list": [
    ]
}

获取热搜列表(手机端)

query Parameters
limit
integer [ 1 .. 100 ]

热搜数量

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

搜索

综合搜索(web 端)

query Parameters
wbi_sign
string

wbi 签名

keyword
required
string

需要搜索的关键词

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

分类搜索(web 端)

query Parameters
wbi_sign
string

wbi 签名

search_type
required
string
Enum: "video" "media_bangumi" "media_ft" "live" "live_room" "live_user" "article" "topic" "bili_user" "photo"

搜索目标类型

keyword
required
string

需要搜索的关键词

order
string
Default: "totalrank"
Enum: "totalrank" "click" "pubdate" "dm" "stow" "scores" "attention" "online" "live_time" "0" "fans" "level"

结果排序方式

order_sort
integer
Default: 0
Enum: 0 1

用户粉丝数及等级排序顺序

user_type
integer
Default: 0
Enum: 0 1 2 3

用户分类筛选

duration
integer
Default: 0
Enum: 0 1 2 3 4

视频时长筛选

tids
integer
Default: 0

视频分区筛选

category_id
integer
Default: 0

专栏及相簿分区筛选

page
integer
Default: 1

页码

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

搜索建议

获取搜索建议关键词(web 端)

query Parameters
term
required
string

需要获得建议的输入内容

main_ver
string
Default: "v1"
highlight
string
func
string
Default: "suggest"
suggest_type
string
Default: "accurate"
sub_type
string
Default: "tag"
userid
integer

本用户 mid

bangumi_acc_num
integer
Default: 1
special_acc_num
integer
Default: 1
topic_acc_num
integer
Default: 1
upuser_acc_num
integer
Default: 1
tag_num
integer
Default: 10
special_num
integer
Default: 10
bangumi_num
integer
Default: 10
upuser_num
integer
Default: 3
rnd
number <float>
buvid
string

同 Cookie 中 buvid3

spmid
string
Default: "333.1007"

Responses

Response samples

Content type
application/json
{
  • "exp_str": "string",
  • "code": 0,
  • "result": {
    },
  • "stoken": "string"
}

青少年模式

开启/关闭青少年模式

header Parameters
Device-Id
required
string

设备 ID

Fp_local
required
string

本地设备指纹

Fp_remote
required
string

远程设备指纹

Session_id
required
string

会话 ID

App-Key
required
string
Default: android
Request Body schema: application/x-www-form-urlencoded
required
appkey
required
string

APP 密钥

ts
required
integer

当前时间戳

sign
required
string

APP 签名

access_key
required
string

APP 登录 Token

device_model
required
string

设备 Model

channel
required
string

APP 下载渠道

mobi_app
required
string

APP 包类型

platform
required
string

平台类型

c_locale
string
Default: "zh_CN"

语言

s_locale
string
Default: "zh_CN"

语言

statistics
required
string

统计信息

pwd
required
integer

密码

teenagers_mode
required
integer
Enum: 0 1

开启/关闭模式

teenagers_status
required
integer
Enum: 0 1

当前模式状态

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1
}

昵称检查

检查昵称是否可注册

query Parameters
nickName
required
string <= 16 characters

目标昵称

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

老粉计划

加入老粉计划

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
required
aid
string
Default: ""
up_mid
required
integer

UP 主 UID

source
integer
Default: 4
scene
integer
Default: 105
platform
string
Default: "web"
mobi_app
string
Default: "pc"
csrf
required
string

用户 csrf

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

老粉计划发送留言

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
required
aid
string
Default: ""
up_mid
required
integer

UP 主 UID

source
integer
Default: 4
scene
integer
Default: 105
content
required
string

留言内容

csrf
required
string

用户 csrf

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "0",
  • "ttl": 1,
  • "data": {
    }
}

用户基本信息

用户空间详细信息

query Parameters
mid
required
integer

目标用户 mid

w_rid
required
string

Wbi 签名

wts
required
integer

当前时间戳

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

用户名片信息

query Parameters
mid
required
integer

目标用户 mid

photo
boolean

是否请求用户主页头图

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

所有粉丝勋章

指定用户的所有粉丝勋章信息

query Parameters
target_id
required
integer

目标 mid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

用户注册

发送短信验证码

query Parameters
key
required
string

人机验证 key

captchaType
required
integer

验证码类型

type
required
integer
Default: 1

短信类型

cid
required
integer

国际冠字码

tel
required
string

手机号码

challenge
required
string

人机验证 challenge

validate
required
string

人机验证 validate

seccode
required
string

人机验证 seccode

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

提交注册请求

Request Body schema: application/x-www-form-urlencoded
required
cid
required
integer

国际冠字码

tel
required
string

手机号码

code
required
string

短信验证码

nickName
required
string

昵称

pwd
required
string

密码

plat
required
integer
Default: 0

平台?

gourl
string
Default: "https://www.bilibili.com/"

注册成功跳转地址

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "data": {
    }
}

用户关系相关

查询用户粉丝明细

query Parameters
access_key
string

APP 登录 Token

vmid
required
integer

目标用户 mid

ps
integer
Default: 50

每页项数

pn
integer
Default: 1

页码

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "code": 0,
  • "message": "string",
  • "ttl": 1
}

查询用户关注明细

query Parameters
access_key
string

APP 登录 Token

vmid
required
integer

目标用户 mid

order_type
string
Value: "attention"

排序方式

ps
integer
Default: 50

每页项数

pn
integer
Default: 1

页码

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "code": 0,
  • "message": "string",
  • "ttl": 1
}

查询用户关注明细2

query Parameters
vmid
required
integer

目标用户 mid

order
string
Enum: "desc" "asc"

排序方式

ps
integer
Default: 50

每页项数

pn
integer
Default: 1

页码

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "code": 0,
  • "message": "string",
  • "ttl": 1
}

查询用户关注明细3

query Parameters
vmid
required
integer

目标用户 mid

ps
integer
Default: 20

每页项数

pn
integer
Default: 1

页码

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "data": {
    },
  • "ts": 0,
  • "request_id": "string"
}

搜索关注明细

query Parameters
access_key
string

APP 登录 Token

vmid
required
integer

目标用户 mid

name
string

搜索关键词

ps
integer
Default: 50

每页项数

pn
integer
Default: 1

页码

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "code": 0,
  • "message": "string",
  • "ttl": 1
}

查询共同关注明细

query Parameters
access_key
string

APP 登录 Token

vmid
required
integer

目标用户 mid

ps
integer
Default: 50

每页项数

pn
integer
Default: 1

页码

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "code": 0,
  • "message": "string",
  • "ttl": 1
}

查询悄悄关注明细

query Parameters
access_key
string

APP 登录 Token

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "code": 0,
  • "message": "string",
  • "ttl": 1
}

查询互相关注明细

query Parameters
access_key
string

APP 登录 Token

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "code": 0,
  • "message": "string",
  • "ttl": 1
}

用户空间相关

查询用户置顶视频

query Parameters
vmid
required
integer

目标用户 mid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

设置置顶视频

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
required
aid
integer

置顶目标稿件 avid

bvid
string

置顶目标稿件 bvid

reason
string <= 40 characters

置顶视频备注

csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1
}

取消置顶视频

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
required
csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1
}

查询用户代表作视频列表

query Parameters
vmid
required
integer

目标用户 mid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": [
    ]
}

添加代表作视频

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
required
aid
integer

置顶目标稿件 avid

bvid
string

置顶目标稿件 bvid

reason
string <= 40 characters

代表作备注

csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1
}

删除代表作视频

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
required
aid
integer

要删除的目标稿件 avid

bvid
string

要删除的目标稿件 bvid

csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1
}

查看用户个人 TAG

query Parameters
mid
required
integer

目标用户 mid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": [
    ]
}

修改个人 TAG

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
required
tags
string

要设置的 TAG 内容

csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1
}

查看用户空间公告

query Parameters
mid
required
integer

目标用户 mid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": "string"
}

修改空间公告

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
required
notice
string <= 150 characters

要设置的公告内容

csrf
required
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1
}

查询空间设置

query Parameters
mid
required
integer

目标用户 mid

Responses

Response samples

Content type
application/json
{
  • "status": true,
  • "data": {
    }
}

查询可用头图列表 (Web 端)

query Parameters
mid
required
integer

目标用户 mid

Responses

Response samples

Content type
application/json
{
  • "status": true,
  • "data": [
    ]
}

用户状态数

关系状态数

query Parameters
access_key
string

APP 登录 Token

vmid
required
integer

目标用户 mid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

UP 主状态数

Authorizations:
sessionData
query Parameters
access_key
string

APP 登录 Token

mid
required
integer

目标用户 mid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

用户导航栏状态数

query Parameters
mid
required
integer

目标用户 mid

web_location
string
Default: "333.999"

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

点赞

点赞视频(web 端)

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
required
aid
integer

稿件 avid

bvid
string

稿件 bvid

like
required
integer
Enum: 1 2

操作方式

csrf
required
string

CSRF Token(位于 Cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1
}

点赞视频(APP 端)

header Parameters
access_key
required
string

APP 登录 Token

Request Body schema: application/x-www-form-urlencoded
required
aid
required
integer

稿件 avid

like
required
integer
Enum: 0 1

操作方式

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

判断视频近期是否被点赞(双端)

query Parameters
access_key
string

APP 登录 Token

aid
integer

稿件 avid

bvid
string

稿件 bvid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": 0
}

点踩

点踩视频(App 端)

header Parameters
access_key
required
string

APP 登录 Token

Request Body schema: application/x-www-form-urlencoded
required
aid
required
integer

视频 aid

dislike
required
integer
Enum: 0 1

操作类型

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1
}

投币

投币视频(APP 端)

header Parameters
access_key
required
string

APP 登录 Token

Request Body schema: application/x-www-form-urlencoded
required
aid
required
integer

稿件 avid

multiply
required
integer <= 2

投币数量

select_like
integer
Enum: 0 1

附加点赞

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

判断视频是否被投币(双端)

query Parameters
access_key
string

APP 登录 Token

aid
integer

稿件 avid

bvid
string

稿件 bvid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

收藏

收藏视频(双端)

Authorizations:
sessionData
query Parameters
access_key
string

APP 登录 Token

csrf
required
string

CSRF Token(位于 Cookie)

Request Body schema: application/x-www-form-urlencoded
required
rid
required
integer

稿件 avid

type
required
integer
Default: 2
Value: 2
add_media_ids
string

需要加入的收藏夹 mlid

del_media_ids
string

需要取消的收藏夹 mlid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "data": {
    }
}

收藏视频(Web 端)

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
required
rid
required
integer

稿件 avid

type
required
integer
Default: 2
Value: 2
add_media_ids
string

需要加入的收藏夹 mlid

del_media_ids
string

需要取消的收藏夹 mlid

csrf
required
string

CSRF Token(即 Cookie 中 bili_jct)

platform
string
Default: "web"

平台标识?

eab_x
integer
Default: 1
ramval
integer

正整数

ga
integer
Default: 1
gaia_source
string
Default: "web_normal"

gaia_source

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

判断视频是否被收藏(双端)

query Parameters
access_key
string

APP 登录 Token

aid
required
string

稿件 avid 或稿件 bvid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

一键三连

一键三连视频(web 端)

Authorizations:
sessionData
Request Body schema: application/x-www-form-urlencoded
required
aid
integer

稿件 avid

bvid
string

稿件 bvid

csrf
required
string

CSRF Token(位于 Cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

一键三连视频(APP 端)

header Parameters
access_key
required
string

APP 登录 Token

Request Body schema: application/x-www-form-urlencoded
required
aid
required
integer

稿件 avid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

分享

分享视频 (Web 端)

cookie Parameters
buvid3
required
string

浏览器 buvid

Request Body schema: application/x-www-form-urlencoded
required
aid
integer

稿件 aid

bvid
string

稿件 bvid

csrf
string

CSRF Token (即 Cookie 中 bili_jct)

eab_x
integer
Default: 2

eab_x

ramval
integer
Default: 0

ramval

source
string
Default: "web_normal"

source

ga
integer
Default: 1

ga

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": 0
}

稿件投诉

获取投诉类型

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": [
    ]
}

投诉稿件

Authorizations:
sessionData
cookie Parameters
Buid
required
string

风控代码

header Parameters
buid
required
string

风控代码

Request Body schema: application/x-www-form-urlencoded
required
csrf
required
string

csrf token (位于 cookie bili_jct)

aid
required
integer

稿件 aid

tid
required
integer

投诉理由 tid

desc
required
string

投诉理由详细描述

attach
string

附件(多个附件用逗号隔开)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1
}

合集和视频列表信息

获取视频合集信息

query Parameters
mid
required
integer

用户 mid

season_id
required
integer

视频合集 ID

sort_reverse
boolean

排序方式

page_num
integer
Default: 1

页码索引

page_size
integer
Default: 30

单页内容数量

gaia_vtoken
string

风控验证?

web_location
string
Default: "333.999"

页面位置?

w_rid
string

WBI 签名

wts
integer

UNIX 秒级时间戳

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

只获取系列视频

query Parameters
mid
required
integer

用户 mid

page_num
required
integer

页码索引

page_size
required
integer

单页内容数量

gaia_vtoken
string

风控验证?

w_rid
string

WBI 签名

wts
integer

UNIX 秒级时间戳

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

获取系列和合集视频

query Parameters
mid
required
integer

用户 mid

page_num
required
integer
Default: 1

页码

page_size
required
integer
Default: 20

每页数量

w_rid
string

WBI 签名

wts
integer

UNIX 秒级时间戳

web_location
string
Default: "333.999"

页面位置?

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "code": 0,
  • "message": "string",
  • "ttl": 1
}

视频基本信息

获取视频详细信息 (web 端)

query Parameters
aid
integer

稿件 avid

bvid
string

稿件 bvid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

获取视频超详细信息 (web 端)

query Parameters
aid
integer

稿件 avid

bvid
string

稿件 bvid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

互动视频信息

获取互动视频模块详细信息

Authorizations:
sessionData
query Parameters
aid
integer

稿件 avid

bvid
string

稿件 bvid

graph_version
required
integer

剧情图 ID

edge_id
integer

模块编号

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

高能进度条

获取弹幕趋势顶点列表

query Parameters
cid
required
integer

视频 cid

aid
integer

稿件 avid

bvid
string

稿件 bvid

Responses

Response samples

Content type
application/json
{
  • "step_sec": 0,
  • "tagstr": "string",
  • "events": {
    },
  • "debug": "string"
}

视频在线人数

获取视频在线人数 (web 端)

query Parameters
aid
integer

稿件 avid

bvid
string

稿件 bvid

cid
required
integer

视频 cid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

获取视频在线人数 (APP 端)

query Parameters
aid
required
integer

稿件 avid

appkey
required
string
Default: "1d8b6e7d45233436"

APP 密钥

cid
required
integer

视频 cid

ts
required
integer

当前时间戳

sign
required
string

APP 签名

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

web 播放器信息

web 播放器信息

query Parameters
aid
integer

稿件 avid

bvid
string

稿件 bvid

cid
required
integer

稿件 cid

season_id
integer

番剧 season_id

ep_id
integer

剧集 ep_id

w_rid
string

WBI 签名

wts
integer

当前 unix 时间戳

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

播放反馈

播放反馈

Request Body schema: application/x-www-form-urlencoded
mid
integer

当前用户 mid

buvid
string

BUVID (APP) 或 buvid3 (Web)

app_key
string

APP 密钥

url
string

日志 URL

task_type
integer

任务类型

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

视频推荐

获取单视频推荐列表 (web 端)

query Parameters
aid
integer

稿件 avid

bvid
string

稿件 bvid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": [
    ]
}

获取首页视频推荐列表 (web 端)

query Parameters
fresh_type
integer
Default: 4

相关性

ps
integer
Default: 12

单页返回的记录条数

fresh_idx
integer

当前翻页号

fresh_idx_1h
integer

当前翻页号 (一小时前?)

brush
integer

刷子?

fetch_row
integer

本次抓取的最后一行行号

web_location
integer
Default: 1430650

网页位置

y_num
integer

普通列数

last_y_num
integer

总列数

feed_version
string
Default: "V8"
homepage_ver
integer
Default: 1

首页版本

screen
string

浏览器视口大小

seo_info
string
last_showlist
string

上次抓取的视频 av 号列表

uniq_id
string
w_rid
string

WBI 签名

wts
integer

UNIX 时间戳

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

视频观看数据上报

上报观看进度(双端)

Request Body schema: application/x-www-form-urlencoded
access_key
string

APP 登录 Token

aid
required
integer

稿件 avid

cid
required
integer

视频 cid

progress
integer

观看进度

platform
string

平台标识

csrf
string

CSRF Token(位于 cookie)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1
}

上报视频播放心跳(web 端)

Authorizations:
sessionData
query Parameters
w_start_ts
integer

参见请求正文同名无 w_ 前缀参数

w_mid
integer

参见请求正文同名无 w_ 前缀参数

w_aid
integer

参见请求正文同名无 w_ 前缀参数

w_dt
integer
Default: 2
w_realtime
integer

参见请求正文同名无 w_ 前缀参数

w_playedtime
integer

参见请求正文同名无 w_ 前缀参数

w_real_played_time
integer

参见请求正文同名无 w_ 前缀参数

w_video_duration
integer

参见请求正文同名无 w_ 前缀参数

w_last_play_progress_time
integer

参见请求正文同名无 w_ 前缀参数

web_location
integer
Default: 1315873

网页位置

w_rid
string

WBI 签名

wts
integer

UNIX 秒级时间戳

Request Body schema: application/x-www-form-urlencoded
required
aid
integer

稿件 avid

bvid
string

稿件 bvid

cid
integer

视频 cid

epid
integer

番剧 epid

sid
integer

番剧 ssid

mid
integer

当前用户 mid

played_time
integer

视频播放进度

realtime
integer

本轮页面会话真实播放时间

real_played_time
integer

本轮页面会话真实视频播放持续时间

refer_url
string

与请求头 Referer 字段相同

quality
integer

视频清晰度

video_duration
integer

视频时长

last_play_progress_time
integer

play_time 与本轮页面会话开始时 played_time 之和

max_play_progress_time
integer

本轮页面会话所有最大 last_play_progress_time 与本轮页面会话开始时 played_time 之和

start_ts
integer

开始播放时刻

type
integer

视频类型

sub_type
integer

剧集副类型

dt
integer
Default: 2
outer
integer
Default: 0
spmid
string
Default: "333.788.0.0"
from_spmid
string

播放来源?

session
string

会话信息?

extra
object

额外信息,如播放器版本

play_type
integer

播放动作

csrf
string

CSRF Token (即 Cookie 中 bili_jct)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1
}

开始观看视频 (web 端)

Authorizations:
sessionData
query Parameters
w_aid
integer

稿件 aid

w_part
integer

视频分 P 编号

w_ftime
integer

点击时间戳?

w_stime
integer

开始播放时间戳?

w_type
integer

视频类型

web_location
integer
Default: 1315873

网页位置?

w_rid
string

WBI 签名

wts
integer

UNIX 秒级时间戳

Request Body schema: application/x-www-form-urlencoded
optional
mid
integer

当前用户 mid

aid
required
integer

稿件 aid

cid
integer

视频 cid

part
integer

视频分 P 编号

lv
integer

当前用户等级

ftime
integer

同 URL 参数中带有 w_ 前缀的同名参数

stime
integer

同 URL 参数中带有 w_ 前缀的同名参数

type
integer

视频类型

sub_type
integer

视频子类型

referer_url
string

与请求头 Referer 字段相同

outer
integer
Default: 0
spmid
string
Default: "333.788.0.0"

作用尚不明确

from_spmid
string

播放来源?

session
string

会话信息?

csrf
string

CSRF Token (即 Cookie 中 bili_jct)

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1
}

视频快照

获取视频快照 (web 端)

query Parameters
aid
integer

稿件 avid

bvid
string

稿件 bvid

cid
integer

分 P cid

index
integer
Enum: 0 1

json 数组截取时间表

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

获取视频快照 (APP 端)

query Parameters
aid
required
integer

稿件 avid

appkey
required
string
Default: "1d8b6e7d45233436"

APP 密钥

cid
required
integer

分 P cid

ts
required
integer

当前时间戳

sign
required
string

APP 签名

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}

获取视频快照 (web 端) (用于封面预览)

query Parameters
aid
required
integer

稿件 avid

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "ttl": 1,
  • "data": {
    }
}