Bilibili B站 Scraper - Videos, Comments, Danmaku & Subtitles
Pricing
from $6.00 / 1,000 results
Bilibili B站 Scraper - Videos, Comments, Danmaku & Subtitles
Scrape Bilibili (哔哩哔哩, B站): search videos by keyword, get video details, public comments with commenter user ID, avatar and level, danmaku (弹幕), subtitles and UP主 creator stats with recent uploads. No login or cookies needed. Export to JSON, CSV or Excel.
Pricing
from $6.00 / 1,000 results
Rating
0.0
(0)
Developer
Silkline
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
15 hours ago
Last modified
Categories
Share
Bilibili Scraper extracts public data from Bilibili (哔哩哔哩, B站) and returns clean, flat JSON. You get keyword search results, video details, public comments with each commenter's public profile, danmaku (弹幕, on-screen comments), subtitles (full transcripts with timed sentences) UP主 creator profiles with their recent videos, creator dynamics (posts), full reply threads, the popular feed, the trending search board, public favourite folders and live room status. It is made for marketers, researchers, analysts and developers who need Bilibili data without Chinese-language skills, proxies, cookies or a login. You can also use it as a Bilibili API: call it over HTTP or with the Apify Python or JavaScript client and get the same JSON back.
What is Bilibili?
Bilibili (bilibili.com, 哔哩哔哩, often called B站) is a Chinese video-sharing platform with user-uploaded videos on topics such as gaming, anime, technology, education and lifestyle. Its best-known feature is danmaku (弹幕): viewer comments that scroll across the video at the moment they refer to. Video creators on Bilibili are called UP主.
What data can you get?
The Actor has twelve modes. Each run uses one mode.
| Mode | Give it | You get |
|---|---|---|
search | a keyword | videos: title, author, views, likes, favorites, comments, danmaku count, duration, publish time, category, tags |
video | BV IDs or video URLs | the same video fields for each video (except category), plus coins and shares |
comments | BV IDs or video URLs | comment text, likes, reply count, time, plus each commenter's public profile: user ID, nickname, avatar, gender, level, verification, bio. includeReplies adds the first replies under each comment |
danmaku | BV IDs or video URLs | danmaku (on-screen comments): text, position in the video in seconds, sent time, colour, display mode, sender hash. At most 1,200 per video |
subtitles | BV IDs or video URLs | one item per video: full transcript as plain text plus timed sentences, language, and whether it is machine-made. Only videos that have subtitles |
creator | UIDs or space.bilibili.com URLs | profile (nickname, user ID, avatar, gender, level, verification, bio, followers, total views and likes) plus the creator's recent videos |
dynamics | UIDs or space.bilibili.com URLs | the creator's dynamics (posts), newest first: text, images, type, time, likes, comments, shares, linked video |
replies | comment links, or BV... <comment ID> | every reply under a comment (not only the first few): the same fields as comment items, with parentCommentId set |
popular | nothing | the current popular-videos feed (video fields) |
hotSearch | nothing | the trending search board: rank, word, heat score, search link |
favorites | UIDs or space.bilibili.com URLs | videos in the creator's public favourite folders: video fields plus folder and save time. Hidden folders count as not found |
liveRoom | room IDs or live.bilibili.com URLs | one record per room: live or not, title, viewers, followers, category, start time |
Every item has a type field: video, comment, danmaku, subtitle, creator, dynamic, trend or liveRoom (modes popular and favorites return video items; mode replies returns comment items). Fields with no data are null; an empty tags list is returned as [].
Video items (modes search, video, creator, popular, favorites)
| Field | Description |
|---|---|
bvid | Video ID (BV...) |
title | Video title |
views | View count |
likes | Like count |
coins | Coins given by viewers (mode video only) |
favorites | Times added to favorites |
shares | Share count (mode video only) |
comments | Comment count |
danmaku | Danmaku count |
publishedAt | Publish time, ISO 8601 UTC |
durationSeconds | Video length in seconds |
authorName, authorId, authorUrl, authorAvatar | Uploader's name, user ID, profile link and avatar URL (avatar where the source provides it) |
category, tags | Category (filled for search results) and tags (filled for search results and mode video) |
description | Video description, empty when the uploader wrote none |
url, coverUrl, aid | Video link, cover image URL and legacy numeric video ID |
collectorUid, folderId, folderTitle, favoritedAt | Mode favorites only: whose folder, the folder, and when the video was saved (ISO 8601 UTC) |
Comment items (modes comments, replies)
| Field | Description |
|---|---|
text | Comment text |
likes | Likes on the comment |
replyCount | Number of replies |
publishedAt | Comment time, ISO 8601 UTC |
authorName, authorId, authorAvatar | Commenter's nickname, user ID and avatar URL |
authorIpLocation | IP location field (IP属地). The source currently does not return it, so it is null |
authorGender | Commenter's public gender label |
authorLevel | Commenter's account level (0-6) |
authorBio | Commenter's public signature, as published |
authorVerifiedType | Verification type: -1 none, 0 personal, 1 organisation |
authorVerifiedTitle | Verification text |
commentId, parentCommentId | Comment ID; for replies, the ID of the top-level comment (null on top-level comments) |
bvid, videoUrl | The video the comment belongs to |
Danmaku items (mode danmaku)
| Field | Description |
|---|---|
text | Danmaku text |
timeSeconds | Position in the video where it appears, in seconds |
sentAt | When it was sent, ISO 8601 UTC |
color | Hex colour, for example #FFFFFF |
displayMode | 1-3 scrolling, 4 bottom, 5 top, 6 reverse, 7 positioned, 8 code, 9 BAS |
fontSize | Font size |
pool | 0 normal, 1 subtitle, 2 special |
senderHash | The platform's public hash of the sender's user ID |
danmakuId | Danmaku ID |
videoBvid, videoUrl | The video it belongs to |
Subtitle items (mode subtitles)
| Field | Description |
|---|---|
text | The whole transcript, one sentence per line |
segments | Timed sentences: start and end in seconds, text |
language, languageName | Language code (for example zh, en) and language name as listed on the video |
isAiGenerated | true when machine-made, false when the creator uploaded it |
availableLanguages | All subtitle tracks the video offers (ai- prefix = machine-made) |
segmentCount | Number of timed sentences |
bvid, url, title, authorName, durationSeconds | The video the subtitles belong to |
Creator items (mode creator)
| Field | Description |
|---|---|
nickname, uid, url | Creator name, user ID and profile link |
followers, following | Follower and following counts |
videoCount | Number of videos |
totalViews, totalLikes | Total views and likes |
bio, avatarUrl | Bio and avatar URL |
gender, level, birthday | Public gender label, account level (0-6), birthday (MM-DD) when shown |
verifiedType, verifiedTitle | Verification type (-1 none, 0 personal, 1 organisation) and verification text |
The creator's recent videos are returned as separate video items in the same dataset.
Dynamic items (mode dynamics)
| Field | Description |
|---|---|
dynamicId, url | Dynamic ID and link |
dynamicType | av (video post), draw (images), word (text), forward, article, opus and others the platform adds |
text | Post text (for a video post, the text written with it or the video title) |
imageUrls | Image URLs attached to the post |
bvid | Linked video, for video posts |
publishedAt | Time, ISO 8601 UTC |
likes, comments, shares | Like, comment and forward counts |
isForward | true when it forwards another post |
authorName, authorId, authorAvatar | The creator |
Trend items (mode hotSearch)
| Field | Description |
|---|---|
rank | Position on the board, 1 = hottest |
keyword, heatScore | The trending word and its heat score |
searchUrl | Bilibili search page for the word |
Live room items (mode liveRoom)
| Field | Description |
|---|---|
roomId, shortId, url | Room ID (long form), short ID if any, and link |
title, description | Room title and description text |
status, isLive | offline, live or replay; isLive is true only while broadcasting |
liveStartedAt | Start of the current broadcast, ISO 8601 UTC (null when not live) |
viewers, followers | Popularity number shown by the platform, and follower count |
areaName, parentAreaName, tags | Category and tags |
streamerId, coverUrl, keyframeUrl | Streamer's user ID, cover image, latest preview frame |
How to use Bilibili Scraper
- Open Bilibili Scraper in Apify Console.
- Choose a Mode, for example search, video details, comments, danmaku, subtitles, creator, dynamics, replies, popular, hotSearch, favorites or liveRoom.
- Fill in the input for that mode: a keyword, video URLs or BV IDs, creator UIDs or profile URLs, comment links or live room IDs. Modes
popularandhotSearchneed no input. - Set Max results (the total number of items for the whole run).
- Click Start and wait for the run to finish.
- Open the dataset and export it as JSON, CSV or Excel, or read it through the API.
Input
| Field | Type | Required | What it does | Default |
|---|---|---|---|---|
mode | string | Required | search, video, comments, danmaku, subtitles, creator, dynamics, replies, popular, hotSearch, favorites or liveRoom | search |
keyword | string | Optional (mode search) | Search keyword. Chinese keywords return the best results | 原神 |
searchOrder | string | Optional (mode search) | Ranking: totalrank (best match), click (most views), pubdate (newest), dm (most danmaku), stow (most favorites) | totalrank |
videos | array of strings | Optional (modes video, comments, danmaku, subtitles) | Video URLs or BV IDs, for example https://www.bilibili.com/video/BV1M1421t7hT or BV1M1421t7hT | none |
subtitleLanguage | string | Optional (mode subtitles) | Language code such as zh, en or en-US. Leave empty to get the fullest track available | empty |
creators | array of strings | Optional (modes creator, dynamics, favorites) | Creator UIDs or profile URLs, for example 19286458 or https://space.bilibili.com/19286458 | none |
includeReplies | boolean | Optional (mode comments) | Also return the replies shown under each comment. Each reply is billed like a comment | false |
commentLinks | array of strings | Optional (mode replies) | Comment links copied from Bilibili (https://www.bilibili.com/video/BV1M1421t7hT/#reply237107365072) or BV1M1421t7hT 237107365072. Use a top-level comment | none |
liveRooms | array of strings | Optional (mode liveRoom) | Live room IDs or URLs, for example 6 or https://live.bilibili.com/6 | none |
maxResults | integer | Optional | Maximum number of items in total for this run (1 to 5,000) | 20 |
maxResults is the total number of items for the whole run. The run stops as soon as it is reached, or when the spending limit you set in the run options is used up. Pagination is handled for you.
Search the most viewed videos for a keyword:
{"mode": "search","keyword": "原神","searchOrder": "click","maxResults": 50}
Get full stats (including coins and shares) for specific videos:
{"mode": "video","videos": ["BV1M1421t7hT"]}
Get comments with replies:
{"mode": "comments","videos": ["https://www.bilibili.com/video/BV1M1421t7hT"],"includeReplies": true,"maxResults": 200}
Get danmaku:
{"mode": "danmaku","videos": ["https://www.bilibili.com/video/BV1M1421t7hT"],"maxResults": 1200}
Get English subtitles:
{"mode": "subtitles","videos": ["https://www.bilibili.com/video/BV1M1421t7hT"],"subtitleLanguage": "en"}
Get a creator's latest dynamics, or the full reply thread of a comment:
{"mode": "dynamics", "creators": ["20165629"], "maxResults": 24}
{"mode": "replies", "commentLinks": ["https://www.bilibili.com/video/BV1M1421t7hT/#reply237107365072"]}
Get the popular feed, the trending board, a creator's public favourites, or live room status:
{"mode": "popular", "maxResults": 40}
{"mode": "hotSearch", "maxResults": 20}
{"mode": "favorites", "creators": ["19286458"]}
{"mode": "liveRoom", "liveRooms": ["6", "https://live.bilibili.com/21452505"]}
Get a creator profile and recent videos:
{"mode": "creator","creators": ["https://space.bilibili.com/19286458"],"maxResults": 30}
Output example
All values below are illustrative samples.
Video item:
{"type": "video","bvid": "BV1M1421t7hT","aid": 1054321098,"url": "https://www.bilibili.com/video/BV1M1421t7hT","title": "Example video title","description": "Example description","authorName": "ExampleUploader","authorId": 19286458,"authorUrl": "https://space.bilibili.com/19286458","authorAvatar": "https://i1.hdslb.com/bfs/face/example.jpg","coverUrl": "https://i0.hdslb.com/example.jpg","durationSeconds": 754,"publishedAt": "2025-01-15T09:30:00Z","views": 1203400,"likes": 85200,"coins": 20100,"favorites": 30500,"shares": 4100,"comments": 3200,"danmaku": 9800,"category": "Gaming","tags": ["game", "review"]}
Comment item:
{"type": "comment","bvid": "BV1M1421t7hT","videoUrl": "https://www.bilibili.com/video/BV1M1421t7hT","commentId": "245678901234","parentCommentId": null,"text": "Example comment text","likes": 312,"replyCount": 14,"publishedAt": "2025-01-16T02:10:00Z","authorName": "ExampleViewer","authorId": 123456789,"authorAvatar": "https://i1.hdslb.com/bfs/face/example2.jpg","authorIpLocation": null,"authorGender": "保密","authorLevel": 5,"authorBio": "Example signature","authorVerifiedType": -1,"authorVerifiedTitle": null}
Danmaku item:
{"type": "danmaku","danmakuId": "1598765432109876543","videoBvid": "BV1M1421t7hT","videoUrl": "https://www.bilibili.com/video/BV1M1421t7hT","text": "Example danmaku","timeSeconds": 83.5,"sentAt": "2025-01-15T12:04:00Z","displayMode": 1,"fontSize": 25,"color": "#FFFFFF","pool": 0,"senderHash": "a1b2c3d4"}
Subtitle item:
{"type": "subtitle","bvid": "BV1M1421t7hT","url": "https://www.bilibili.com/video/BV1M1421t7hT","title": "Example video title","authorName": "ExampleUploader","durationSeconds": 754,"language": "en","languageName": "English (auto-generated)","isAiGenerated": true,"availableLanguages": ["ai-zh", "ai-en"],"segmentCount": 2,"text": "Hello everyone.\nToday we look at an example.","segments": [{"start": 0.5, "end": 2.1, "text": "Hello everyone."},{"start": 2.3, "end": 5.0, "text": "Today we look at an example."}]}
Creator item:
{"type": "creator","uid": 19286458,"url": "https://space.bilibili.com/19286458","nickname": "ExampleUploader","bio": "Example creator bio","avatarUrl": "https://i1.hdslb.com/bfs/face/example.jpg","gender": "保密","level": 6,"verifiedType": 0,"verifiedTitle": "Example verification text","birthday": null,"followers": 520000,"following": 180,"videoCount": 412,"totalViews": 98000000,"totalLikes": 6400000}
Dynamic item (mode dynamics):
{"type": "dynamic","dynamicId": "1261594811568226328","dynamicType": "av","url": "https://www.bilibili.com/opus/1261594811568226328","text": "Example post text","imageUrls": [],"bvid": "BV1M1421t7hT","publishedAt": "2026-10-21T10:12:12Z","authorName": "ExampleUploader","authorId": 19286458,"authorAvatar": "https://i1.hdslb.com/bfs/face/example.jpg","likes": 2151,"comments": 73,"shares": 10,"isForward": false}
Trend item (mode hotSearch):
{"type": "trend", "rank": 1, "keyword": "Example word", "heatScore": 56139135, "searchUrl": "https://search.bilibili.com/all?keyword=Example%20word"}
Live room item (mode liveRoom):
{"type": "liveRoom","roomId": 7734200,"shortId": 6,"url": "https://live.bilibili.com/7734200","title": "Example stream title","description": null,"streamerId": 50329118,"status": "live","isLive": true,"liveStartedAt": "2026-10-15T07:50:15Z","viewers": 193302,"followers": 16896526,"areaName": "Example area","parentAreaName": "Example group","tags": ["tag1", "tag2"],"coverUrl": "https://i0.hdslb.com/bfs/live/example.jpg","keyframeUrl": "https://i0.hdslb.com/bfs/live-key-frame/example.jpg"}
How much does it cost?
The Actor uses pay-per-event pricing: a small start fee per run plus a fee per item returned. Subtitles have their own, higher fee per video. Prices are in USD and depend on your Apify plan tier.
| Event | What it covers | Bronze | Silver | Gold, Platinum, Diamond |
|---|---|---|---|---|
| Run start | charged once per run, when the first request to the data source succeeds | $0.005 | $0.005 | $0.005 |
| Result | one video, comment, reply, danmaku, creator video, dynamic, trending word or live room | $0.00736 | $0.00664 | $0.006 |
| Profile | one creator profile | $0.0092 | $0.0083 | $0.0075 |
| Subtitle | one video's subtitles (full transcript and timed sentences) | $0.01 | $0.01 | $0.01 |
Worked examples:
- 100 search results on Bronze cost about $0.74 ($0.005 start + 100 × $0.00736). On Gold and higher they cost about $0.61 ($0.005 + 100 × $0.006).
- A full reply thread of 200 replies on Gold and higher costs about $1.21 ($0.005 start + 200 × $0.006); one creator's last 24 dynamics about $0.15; the 50-word trending board about $0.31.
- Subtitles for 10 videos that have them cost about $0.11 on a paid plan ($0.005 start + 10 × $0.01).
On the free Apify plan, every run returns a sample dataset: a real result of this Actor's prefilled input, captured on the date shown in the run status, so you can see exactly what the output looks like. Your own input is not used and nothing is charged. To run your own searches, use any paid Apify plan.
The run-start fee is charged once, when the first request to the data source succeeds, even if that request returns nothing. It is not charged when the data source fails from the start or rejects the IDs (for example, when every ID is invalid or not found, or the input is wrong), or when the spending limit cannot cover it. Items are charged only when they are actually returned. Replies (with includeReplies, or in mode replies) are billed like comments. Set a maximum cost per run in the run options and the Actor stops when it is reached.
Use cases
- Influencer (KOL) research: find UP主 creators in your niche with
search, then comparefollowers,totalViewsandtotalLikesincreatormode. - Brand and product monitoring: track how often your brand appears in video titles and read what viewers say in comments and danmaku.
- China market and trend research: rank videos for any topic by views, recency, danmaku or favorites using
searchOrder. - Audience analysis: study commenters'
authorLevel,authorGenderand verification to understand who reacts to a topic. - Moment-level reactions: use danmaku
timeSecondsto see which parts of a video get the most on-screen comments. - AI and NLP datasets: collect Chinese video metadata, comment text and subtitle transcripts (
text,segments) for sentiment analysis, fine-tuning or retrieval.
Integrations and API
You can use this Actor as a Bilibili API alternative. Start runs through the Apify API, schedule them in Apify Console, and connect results to webhooks and integrations such as Zapier, Make and Google Sheets. It also works with AI agents through the Apify MCP server.
Python example with apify-client:
from apify_client import ApifyClientclient = ApifyClient("<YOUR_APIFY_TOKEN>")run = client.actor("clover_folktale/bilibili-scraper").call(run_input={"mode": "comments","videos": ["https://www.bilibili.com/video/BV1M1421t7hT"],"maxResults": 200})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item)
A longer Python example is available on GitHub: bilibili_comments.py.
Tips and limits
Danmaku mode
The source returns one fixed batch per video, at most 1,200 danmaku, sorted by their position in the video. For long videos this batch is from the start of the video only (in our test of a 22-minute video, the batch ended at about 5.5 minutes). The source offers no way to page further or pick a time range, and we cannot promise which danmaku fall in the batch. For multi-part videos only the first part is covered. Sender IDs are never returned; only the platform's public senderHash. A video with no danmaku counts as "not found".
Subtitles mode
Not every video has subtitles. Bilibili shows subtitles only where the creator uploaded them or its automatic speech recognition produced them. In our test of 15 popular videos from one search (English-speech topic, a small and not representative sample), 4 had a usable subtitle (about 27%), all four machine-made; creator-uploaded tracks we found were one-line placeholders. Machine subtitles are speech recognition output and contain mistakes, and many carry a machine-translated English track (listed as ai-en in availableLanguages).
Set subtitleLanguage to get a specific language; leave it empty to get the fullest track. The language field holds the plain code (for example en); the ai- prefix appears only in availableLanguages. A video that has no subtitle, or not in the language you asked for, counts as "not found" and is not charged. The source sometimes returns an empty subtitle list for a video that does have one (in our test the same video answered empty twice and with a subtitle once in three tries), so the Actor automatically asks again, up to 3 times in all, before it counts the video as "not found". A false miss is still possible; in that case run it again. Only the first part of a multi-part video is covered. Fetching the subtitle text takes one extra download per track; when no language is asked for, the Actor looks at up to four tracks and keeps the one with the most sentences.
Comments and replies
With "includeReplies": true, the replies the platform shows under each comment are returned right after their comment, with parentCommentId set. This is off by default. Replies are billed like comments and count toward maxResults. Long reply threads may be partial.
New modes (dynamics, replies, popular, hotSearch, favorites, liveRoom)
dynamics: newest first, 12 per page. A creator with no posts counts as "not found". Counts such as likes can be empty for some post types.replies: takes a top-level comment (its link ends in#reply<ID>). Returns the whole thread, 20 per page. A comment ID that does not belong to the video counts as "not found".popular: the platform's current popular feed; it changes through the day and ends when the platform says there is no more.hotSearch: one request returns the whole board (about 30 words at most);maxResultsabove that returns the full board.favorites: only folders the creator made public; removed videos are skipped. Creators who hide their favourites count as "not found".liveRoom: a snapshot of the room at run time. Finding streamers by category is not available.
Fields that are often empty
- Search results:
coinsandsharesare not included. Usevideomode for full stats. - Video-detail items (mode
video):categoryis empty;tagsare filled. - Creator video lists: no
coins,shares,likes,favorites,categoryortags. Usevideomode for full stats. - Creator profile:
totalViews,totalLikesandbirthdaycome back empty for some accounts; that is the platform's data. - Comments:
authorIpLocationis currently not returned by the source, so it is alwaysnull.authorVerifiedTitleis filled only for verified commenters. descriptionis empty when the uploader wrote none.- Empty
tagsare returned as[], notnull.
Language
Titles, descriptions, comments and danmaku are returned in the original language (mostly Chinese). Chinese keywords give the best search results.
Problems
If something looks wrong or a field is empty, open an issue on the Actor page with the run link. The Actor is monitored daily.
FAQ
Do I need a Bilibili account or cookies? No. No login, cookies or proxies are needed.
Is it legal to scrape Bilibili? The Actor only returns publicly visible information, including the public profile of users who appear in the results (user ID, avatar, gender, level, verification and bio, as published on the platform). Private messages, logins and anything not publicly visible are never collected. Bios are returned as published, including any business contact info the creator put there. You are responsible for using the data in line with applicable laws and Bilibili's terms.
How fresh is the data? You get what the source returns at the time of your run. To track changes over time, schedule regular runs.
Why are some fields empty? Some data is not available in every mode, or the platform does not provide it for every account or comment. See "Fields that are often empty" above.
How many results can I get?
Up to 5,000 items per run with maxResults on a paid plan. Danmaku are limited to 1,200 per video.
Can I schedule runs or use the API? Yes. Like any Apify Actor it can be started via API, scheduled, and connected to webhooks and integrations.
Which export formats are available? JSON, CSV and Excel, or read the dataset directly via the API.
Are results in English? No. Text is returned in the original language, mostly Chinese. Field names are in English.
More tools from the same developer
- Bilibili Huahuo 花火 Scraper - KOL (UP Host) Search
- Douyin 抖音 Scraper - Videos, Comments, User IDs & IP Location
- Xiaohongshu 小红书 RedNote Scraper - Notes, Comments & User IP
- Weibo 微博 Scraper - Posts, Comments, User IDs & IP Location
- Zhihu 知乎 Scraper - Answers, Articles, Comments & Users
- YouTube Scraper - Shorts, Channel Videos & Video Search