Bilibili Scraper: videos, comments, danmaku, users & search
Pricing
from $1.00 / 1,000 videos
Bilibili Scraper: videos, comments, danmaku, users & search
Scrape Bilibili (哔哩哔哩, B站) videos with views, likes, coins, favorites, shares, danmaku and tags, comments with replies, danmaku (bullet comments), UP主 profiles and uploads, video search past 1,000 results, user search and the Popular list. No login, no cookies, no browser.
Pricing
from $1.00 / 1,000 videos
Rating
0.0
(0)
Developer
Spyridon Pikoulas
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
4 days ago
Last modified
Categories
Share
Bilibili Scraper
Scrape videos, comments, danmaku, UP主 profiles and search results from Bilibili (哔哩哔哩, B站), without an account, cookies or a browser:
- Videos: any video by its URL, ID (BV1xx411c7mD, av170001) or b23.tv short link, with its views, likes, coins, favorites, shares, danmaku and comment counts, tags, parts and uploader.
- Search: videos for a keyword, in Chinese or any language, by relevance, most played, newest, most danmaku or most favorited, filtered by duration, category and date. Bilibili shows 1,000 results per search; past that, the run searches date ranges and keeps going. Users (UP主) can be searched by keyword too.
- Users (UP主): a profile's followers, following, video count, total likes, level, verification and live room, and their uploads, newest or most played first.
- Comments: the comments of every video, hot or newest first, pinned ones first, with their replies.
- Danmaku (弹幕): the bullet comments of every video, with their time in the video, in timeline order.
- Popular: the videos of Bilibili's Popular page (综合热门), in its order.
Every video comes with its title, description, date, duration, category, tags, uploader and avatar, cover, parts (with their durations), resolution, collection, subtitle languages, reprint, interactive and charge-only flags, highest rank, and Bilibili's note under it. Every comment comes with its text, author and their level, likes, reply count, date, pictures, and the comment it answers, so threads can be rebuilt.
It is fast: 1,500 videos from one search took 17 seconds, and 142 videos with every detail (from two users' uploads, a search and the Popular list) took 58 seconds. It costs $1 per 1,000 videos or users, $0.30 per 1,000 comments and $0.05 per 1,000 danmaku.
What people use it for
- Influencer (KOL) discovery in China: the UP主 of a niche, with their followers, likes and what their videos get.
- Market and brand research: what Chinese viewers watch and say about a product, a game or a brand, with full comment threads and danmaku.
- Content and trend analysis: what does well in a category or on the Popular page, by views, coins and favorites.
- Datasets for AI and sentiment analysis: Chinese comments and danmaku at scale.
- Monitoring: new videos for a keyword or from a list of creators since a date.
How to scrape Bilibili
- Click Try for free; Apify's free plan covers a first run.
- Enter Videos, Users or Search terms, or turn on the Popular list, and how many results you want.
- Click Start, then download the results as JSON, CSV, Excel or HTML, or read them through the API.
An input with more options:
{"videos": ["https://www.bilibili.com/video/BV1DeaV6uEG1", "av170001"],"users": ["https://space.bilibili.com/546195", "2"],"maxVideosPerUser": 50,"userVideosSort": "click","searchTerms": ["原神", "sourdough"],"searchSort": "click","searchDuration": "10to30","maxResultsPerSearch": 200,"publishedAfter": "2026-01-01","includePopular": true,"maxPopularVideos": 100,"maxCommentsPerVideo": 100,"commentsSort": "hot","maxRepliesPerComment": 10,"maxDanmakuPerVideo": 500}
A Bilibili URL works in any of the lists: a space URL gives the user, a search.bilibili.com URL
the search. Set searchType to users to search for UP主: each comes with their profile and
uploads. Set maxVideosPerUser to 0 for profiles only, or turn off includeUserDetails for
uploads only. Turning off includeVideoDetails makes searches, uploads and the Popular list much
faster, with what the lists show: search results then have views, likes, favorites, danmaku,
comments and tags but no coins or shares; uploads have views and danmaku.
searchCategoryId takes Bilibili's category IDs: 4 games, 17 single-player games, 36 knowledge,
76 food, 188 tech, 3 music, 129 dance, 160 life, 1 animation.
Output
A video:
{"type": "video","id": "BV1DeaV6uEG1","aid": 117348539370363,"url": "https://www.bilibili.com/video/BV1DeaV6uEG1","title": "主播退坑4年后回归原神,竟然......","description": "审核辛苦","publishedAt": "2026-09-28T12:04:59Z","durationSeconds": 346,"category": "网络游戏","categoryId": 65,"views": 85594,"likes": 4078,"coins": 457,"favorites": 471,"shares": 431,"danmaku": 231,"comments": 1344,"highestRank": null,"tags": ["原神六周年", "游戏杂谈", "原神回坑", "原神", "原神至冬"],"uploaderId": "33621433","uploaderName": "小狮子piano","uploaderUrl": "https://space.bilibili.com/33621433","uploaderAvatar": "https://i1.hdslb.com/bfs/face/608c3f526f9eab18ee9b73b212dc67ed45a7353e.jpg","cover": "https://i1.hdslb.com/bfs/archive/cdd33ba451677a7f5974e806c364157f1945d5dc.jpg","partsCount": 1,"parts": [{"cid": 42277799526, "page": 1, "title": "主播退坑4年后回归原神,竟然......", "durationSeconds": 346}],"cid": 42277799526,"width": 1920,"height": 1080,"isReprint": false,"isInteractive": false,"isChargeOnly": false,"collection": null,"collectionId": null,"subtitleLanguages": [],"note": "个人观点,仅供参考","location": null,"input": "原神","position": 2}
A user ("type": "user"):
{"type": "user","id": "546195","url": "https://space.bilibili.com/546195","name": "老番茄","sign": "新浪微博:_老番茄_","sex": "男","level": 6,"avatar": "https://i0.hdslb.com/bfs/face/bc5ca101313d4db223c395d64779e76eb3482d60.jpg","followers": 20805336,"following": 6,"videos": 678,"articles": 0,"likes": 195266674,"isVerified": true,"verification": "2025百大UP主、2025年度商业影响力奖UP主、2022年度联合创作奖UP主","verificationType": "person","isVip": true,"vipType": "annual","isSeniorMember": false,"birthday": null,"school": null,"liveRoomId": null,"liveRoomUrl": null,"liveRoomTitle": null,"isLive": null,"topPhoto": null,"tags": null,"input": "https://space.bilibili.com/546195"}
A comment, here a reply:
{"type": "comment","id": "315356677217","videoId": "BV1DeaV6uEG1","videoTitle": "主播退坑4年后回归原神,竟然......","text": "商单应该是商单,但是确实一回坑就能去至冬啊","author": "我该以何见亻尔","authorId": "1241947195","authorLevel": 6,"authorAvatar": "https://i1.hdslb.com/bfs/face/8574705b40250617680037313a7500d9e1f2c271.jpg","authorIsVip": false,"authorIsUploader": false,"likes": 7,"replyCount": 0,"publishedAt": "2026-09-28T12:13:39Z","isReply": true,"rootId": "318911462880","parentId": "318911462880","isPinned": false,"isLikedByUploader": false,"pictures": [],"input": "https://www.bilibili.com/video/BV1DeaV6uEG1"}
A danmaku:
{"type": "danmaku","id": "2210561664876077568","videoId": "BV1DeaV6uEG1","videoTitle": "主播退坑4年后回归原神,竟然......","cid": 42277799526,"part": 1,"text": "大家好,蜗牛叉哥","timeSeconds": 0.501,"mode": 5,"fontSize": 25,"color": "#ffaa02","sentAt": "2026-09-28T15:51:25Z","pool": 0,"senderHash": "fe2a14c0","input": "https://www.bilibili.com/video/BV1DeaV6uEG1"}
Each reply comes right after its comment. rootId is the comment a reply sits under and
parentId the one it answers. A danmaku's mode is 1 to 3 for scrolling, 4 for bottom and 5 for
top; senderHash is Bilibili's hash of the sender's user ID, not the ID itself. input says which
video, user, search or popular an item came from, and position gives a video's place in its
search, uploads or the Popular list.
Use it as an API
One call runs it and returns the results as JSON (for runs under 5 minutes; longer ones start a run and read its dataset). Apify's Python and JavaScript clients, and its Make, Zapier and n8n integrations, work the same way.
curl -X POST "https://api.apify.com/v2/acts/pikoulas~bilibili/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"searchTerms": ["原神"], "maxResultsPerSearch": 10, "maxCommentsPerVideo": 20}'
AI agents can call it as a tool through Apify's MCP server: https://mcp.apify.com?tools=pikoulas/bilibili.
How much does it cost to scrape Bilibili?
You pay $0.001 per video or user, which is $1 per 1,000, $0.0003 per comment ($0.30 per 1,000) and $0.00005 per danmaku ($0.05 per 1,000). Runs that go through Apify's residential proxy also pay its traffic, $0.0012 per 100 KB; a video with its details is 8 to 50 KB, which adds $0.0001 to $0.0006 per video. There are no monthly fees.
Good to know
- No proxy is needed for most runs. Bilibili's risk control refuses IPs that ask too fast, one kind of request at a time; the run keeps to a few requests a second, pauses when refused, and then switches to Apify's residential proxy by itself.
- Bilibili shows up to 1,000 results per search. For more, a video search is split into date
ranges (from
publishedAfter, or Bilibili's first day, topublishedBeforeor now), newest first. A user search gives at most 1,000 users. - Danmaku: Bilibili gives the latest few thousand of each part of a video (3,555 of a 34-minute video's 8,838), however many there are.
- Comments: every comment and reply can be scraped, logged out (1,327 of 1,327 on a test video, and 3,330 replies of one comment).
categoryis empty for videos given by URL, as Bilibili names categories only in lists;categoryIdis always there.- A user's birthday, school, live room and top photo come from a second request that Bilibili's risk control refuses now and then; those fields are then empty, and the rest of the profile is there.
- Subtitles and Bilibili's ranking page need a login, so they aren't included;
subtitleLanguageslists the languages a video has subtitles in. - A video found by several searches, users or lists is given once per run. Deleted, hidden and missing videos and users are skipped, and the log names them. Nothing was region-blocked in tests from Europe.
FAQ
Is it legal to scrape Bilibili?
It collects only what Bilibili shows publicly, without logging in. Scraping public data is generally legal, but personal data is protected by laws such as the GDPR, the CCPA and China's PIPL, and Bilibili's terms may limit how you use what you collect. If you're unsure, ask a lawyer; Apify's Is web scraping legal? is a good start.
Does it need a Bilibili account or cookies?
No. Everything it gives is what Bilibili shows to a visitor who isn't logged in.
Something missing or not working?
Open an issue on the Issues tab with the input you used, or ask there for a field you need.