记录B站关于视频的api

转载自 Rorical

已获得原作者允许。

更新于20-6-2

随时更新,请不要用这些来麻烦哔哩哔哩

请注意,所有的接口请求时候务必带上cookie,referer和csrf_token

通过各种id获取视频详情

GET https://api.bilibili.com/x/web-interface/view?bvid=#视频bvid
GET https://api.bilibili.com/x/web-interface/view?aid=#视频avid

正常返回
{"code":0,"message":"0","ttl":1,"data":{"bvid":"#bvid","aid":#avid,"videos":#包含视频数量,"tid":#分区id,"tname":"#分区","copyright":1,"pic":"#头图","title":"#视频标题","pubdate":#发布时间,"ctime":#创建时间,"desc":"#视频简介","state":0,"attribute":#UnKnow,"duration":#UnKnow,"mission_id":#UnKnow,"rights":{"bp":0,"elec":0,"download":1,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0},"owner":{"mid":#作者id,"name":"#作者名字","face":"#作者头像"},"stat":{"aid":avid,"view":#观看量,"danmaku":#弹幕,"reply":#评论,"favorite":#收藏,"coin":#投币,"share":#分享,"now_rank":0,"his_rank":0,"like":#点赞,"dislike":#差评,"evaluation":""},"dynamic":"分类?","cid":#UnKnow,"dimension":{"width":1920,"height":1080,"rotate":0},"no_cache":false,"pages":[{"cid":#UnKnow,"page":1,"from":"vupload","part":"fans","duration":#UnKnow,"vid":"","weblink":"","dimension":{"width":1920,"height":1080,"rotate":0}}],"subtitle":{"allow_submit":false,"list":[]}}}
Shell

获取视频简介

GET https://api.bilibili.com/x/web-interface/archive/desc?callback=#回调参数&aid=#视频avid&page=&jsonp=jsonp

正常返回
#回调函数({"code":0,"message":"0","ttl":1,"data":"#内容"})
Shell

获取视频tags

GET https://api.bilibili.com/x/tag/archive/tags?callback=#回调参数&aid=#视频avid&jsonp=jsonp

正常返回
#回调函数({"code":0,"message":"0","ttl":1,"data":[{"tag_id":716671,"tag_name":"饭圈","cover":"","head_cover":"","content":"","short_content":"","type":0,"state":0,"ctime":1436866637,"count":{"view":0,"use":7196,"atten":942},"is_atten":0,"likes":122,"hates":18,"attribute":1,"liked":1,"hated":0}]})
Shell

视频点赞接口

POST https://api.bilibili.com/x/web-interface/archive/like

aid: #视频avid
like: #1为点赞,2为取消

正常返回
{"code":0,"message":"0","ttl":1}
Shell

获取你有没有给这个视频点赞

GET https://api.bilibili.com/x/web-interface/archive/has/like?jsonp=jsonp&aid=#视频avid&callback=#回调函数
Shell

视频tag点赞接口

POST https://api.bilibili.com/x/tag/archive/like2

tag_id: #tag的id
aid: #视频avid
jsonp: jsonp

正常返回
{"code":0,"message":"0","ttl":1}
超出限制
{"code":16012,"message":"顶/踩太多次啦,休息休息~","ttl":1}
Shell

评论点赞

POST https://api.bilibili.com/x/v2/reply/action

oid: #视频avid
type: 1
rpid: #评论的id
action: #1点赞,0取消点赞
jsonp: jsonp

正常返回
{"code":0,"message":"0","ttl":1}
Shell

评论点踩

POST https://api.bilibili.com/x/v2/reply/hate

oid: #视频avid
type: 1
rpid: #评论的id
action: #1点赞,0取消点赞
jsonp: jsonp

正常返回
{"code":0,"message":"0","ttl":1}
Shell

唉。。。

本文作者 : 呆憨 小咸鱼
本文采用 CC BY-NC-SA 4.0 许可协议。转载和引用时请注意遵守协议、注明出处!
本文链接 : https://blog.daihan.top/ji-lu-b-zhan-guan-yu-shi-pin-de-api.html

评论

  1. _Wr_
    Windows Chrome 83.0.4103.61
    4月前
    2020-6-04 18:59:56

    为什么要“唉。。。”?

    • 呆憨 小咸鱼 博主
      Windows Chrome 75.0.3770.100
      4月前
      2020-6-09 15:43:36

      手动at原作者

  2. Rorical
    Windows Edge 84.0.522.11
    4月前
    2020-6-04 21:06:06

    自动允许可海星wwwwwww

    • 呆憨 小咸鱼 博主
      Windows Chrome 75.0.3770.100
      4月前
      2020-6-09 15:42:59

      难道不是你QQ上让我转载的嘛 :huaji: :huaji2:

      • Rorical
        Windows Chrome 76.0.3809.87
        3月前
        2020-7-08 20:56:40

        看看我的文章点赞量有多高( ̄▽ ̄)”

发送评论 编辑评论


|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇