Bilibili B站 Scraper - Videos, Comments, Danmaku & Subtitles avatar

Bilibili B站 Scraper - Videos, Comments, Danmaku & Subtitles

Pricing

from $6.00 / 1,000 results

Go to Apify Store
Bilibili B站 Scraper - Videos, Comments, Danmaku & Subtitles

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

Silkline

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

15 hours ago

Last modified

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.

ModeGive itYou get
searcha keywordvideos: title, author, views, likes, favorites, comments, danmaku count, duration, publish time, category, tags
videoBV IDs or video URLsthe same video fields for each video (except category), plus coins and shares
commentsBV IDs or video URLscomment 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
danmakuBV IDs or video URLsdanmaku (on-screen comments): text, position in the video in seconds, sent time, colour, display mode, sender hash. At most 1,200 per video
subtitlesBV IDs or video URLsone item per video: full transcript as plain text plus timed sentences, language, and whether it is machine-made. Only videos that have subtitles
creatorUIDs or space.bilibili.com URLsprofile (nickname, user ID, avatar, gender, level, verification, bio, followers, total views and likes) plus the creator's recent videos
dynamicsUIDs or space.bilibili.com URLsthe creator's dynamics (posts), newest first: text, images, type, time, likes, comments, shares, linked video
repliescomment links, or BV... <comment ID>every reply under a comment (not only the first few): the same fields as comment items, with parentCommentId set
popularnothingthe current popular-videos feed (video fields)
hotSearchnothingthe trending search board: rank, word, heat score, search link
favoritesUIDs or space.bilibili.com URLsvideos in the creator's public favourite folders: video fields plus folder and save time. Hidden folders count as not found
liveRoomroom IDs or live.bilibili.com URLsone 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 [].

FieldDescription
bvidVideo ID (BV...)
titleVideo title
viewsView count
likesLike count
coinsCoins given by viewers (mode video only)
favoritesTimes added to favorites
sharesShare count (mode video only)
commentsComment count
danmakuDanmaku count
publishedAtPublish time, ISO 8601 UTC
durationSecondsVideo length in seconds
authorName, authorId, authorUrl, authorAvatarUploader's name, user ID, profile link and avatar URL (avatar where the source provides it)
category, tagsCategory (filled for search results) and tags (filled for search results and mode video)
descriptionVideo description, empty when the uploader wrote none
url, coverUrl, aidVideo link, cover image URL and legacy numeric video ID
collectorUid, folderId, folderTitle, favoritedAtMode favorites only: whose folder, the folder, and when the video was saved (ISO 8601 UTC)

Comment items (modes comments, replies)

FieldDescription
textComment text
likesLikes on the comment
replyCountNumber of replies
publishedAtComment time, ISO 8601 UTC
authorName, authorId, authorAvatarCommenter's nickname, user ID and avatar URL
authorIpLocationIP location field (IP属地). The source currently does not return it, so it is null
authorGenderCommenter's public gender label
authorLevelCommenter's account level (0-6)
authorBioCommenter's public signature, as published
authorVerifiedTypeVerification type: -1 none, 0 personal, 1 organisation
authorVerifiedTitleVerification text
commentId, parentCommentIdComment ID; for replies, the ID of the top-level comment (null on top-level comments)
bvid, videoUrlThe video the comment belongs to

Danmaku items (mode danmaku)

FieldDescription
textDanmaku text
timeSecondsPosition in the video where it appears, in seconds
sentAtWhen it was sent, ISO 8601 UTC
colorHex colour, for example #FFFFFF
displayMode1-3 scrolling, 4 bottom, 5 top, 6 reverse, 7 positioned, 8 code, 9 BAS
fontSizeFont size
pool0 normal, 1 subtitle, 2 special
senderHashThe platform's public hash of the sender's user ID
danmakuIdDanmaku ID
videoBvid, videoUrlThe video it belongs to

Subtitle items (mode subtitles)

FieldDescription
textThe whole transcript, one sentence per line
segmentsTimed sentences: start and end in seconds, text
language, languageNameLanguage code (for example zh, en) and language name as listed on the video
isAiGeneratedtrue when machine-made, false when the creator uploaded it
availableLanguagesAll subtitle tracks the video offers (ai- prefix = machine-made)
segmentCountNumber of timed sentences
bvid, url, title, authorName, durationSecondsThe video the subtitles belong to

Creator items (mode creator)

FieldDescription
nickname, uid, urlCreator name, user ID and profile link
followers, followingFollower and following counts
videoCountNumber of videos
totalViews, totalLikesTotal views and likes
bio, avatarUrlBio and avatar URL
gender, level, birthdayPublic gender label, account level (0-6), birthday (MM-DD) when shown
verifiedType, verifiedTitleVerification 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)

FieldDescription
dynamicId, urlDynamic ID and link
dynamicTypeav (video post), draw (images), word (text), forward, article, opus and others the platform adds
textPost text (for a video post, the text written with it or the video title)
imageUrlsImage URLs attached to the post
bvidLinked video, for video posts
publishedAtTime, ISO 8601 UTC
likes, comments, sharesLike, comment and forward counts
isForwardtrue when it forwards another post
authorName, authorId, authorAvatarThe creator

Trend items (mode hotSearch)

FieldDescription
rankPosition on the board, 1 = hottest
keyword, heatScoreThe trending word and its heat score
searchUrlBilibili search page for the word

Live room items (mode liveRoom)

FieldDescription
roomId, shortId, urlRoom ID (long form), short ID if any, and link
title, descriptionRoom title and description text
status, isLiveoffline, live or replay; isLive is true only while broadcasting
liveStartedAtStart of the current broadcast, ISO 8601 UTC (null when not live)
viewers, followersPopularity number shown by the platform, and follower count
areaName, parentAreaName, tagsCategory and tags
streamerId, coverUrl, keyframeUrlStreamer's user ID, cover image, latest preview frame

How to use Bilibili Scraper

  1. Open Bilibili Scraper in Apify Console.
  2. Choose a Mode, for example search, video details, comments, danmaku, subtitles, creator, dynamics, replies, popular, hotSearch, favorites or liveRoom.
  3. 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 popular and hotSearch need no input.
  4. Set Max results (the total number of items for the whole run).
  5. Click Start and wait for the run to finish.
  6. Open the dataset and export it as JSON, CSV or Excel, or read it through the API.

Input

FieldTypeRequiredWhat it doesDefault
modestringRequiredsearch, video, comments, danmaku, subtitles, creator, dynamics, replies, popular, hotSearch, favorites or liveRoomsearch
keywordstringOptional (mode search)Search keyword. Chinese keywords return the best results原神
searchOrderstringOptional (mode search)Ranking: totalrank (best match), click (most views), pubdate (newest), dm (most danmaku), stow (most favorites)totalrank
videosarray of stringsOptional (modes video, comments, danmaku, subtitles)Video URLs or BV IDs, for example https://www.bilibili.com/video/BV1M1421t7hT or BV1M1421t7hTnone
subtitleLanguagestringOptional (mode subtitles)Language code such as zh, en or en-US. Leave empty to get the fullest track availableempty
creatorsarray of stringsOptional (modes creator, dynamics, favorites)Creator UIDs or profile URLs, for example 19286458 or https://space.bilibili.com/19286458none
includeRepliesbooleanOptional (mode comments)Also return the replies shown under each comment. Each reply is billed like a commentfalse
commentLinksarray of stringsOptional (mode replies)Comment links copied from Bilibili (https://www.bilibili.com/video/BV1M1421t7hT/#reply237107365072) or BV1M1421t7hT 237107365072. Use a top-level commentnone
liveRoomsarray of stringsOptional (mode liveRoom)Live room IDs or URLs, for example 6 or https://live.bilibili.com/6none
maxResultsintegerOptionalMaximum 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.

EventWhat it coversBronzeSilverGold, Platinum, Diamond
Run startcharged once per run, when the first request to the data source succeeds$0.005$0.005$0.005
Resultone video, comment, reply, danmaku, creator video, dynamic, trending word or live room$0.00736$0.00664$0.006
Profileone creator profile$0.0092$0.0083$0.0075
Subtitleone 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 compare followers, totalViews and totalLikes in creator mode.
  • 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, authorGender and verification to understand who reacts to a topic.
  • Moment-level reactions: use danmaku timeSeconds to 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 ApifyClient
client = 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.

  • 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); maxResults above 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: coins and shares are not included. Use video mode for full stats.
  • Video-detail items (mode video): category is empty; tags are filled.
  • Creator video lists: no coins, shares, likes, favorites, category or tags. Use video mode for full stats.
  • Creator profile: totalViews, totalLikes and birthday come back empty for some accounts; that is the platform's data.
  • Comments: authorIpLocation is currently not returned by the source, so it is always null. authorVerifiedTitle is filled only for verified commenters.
  • description is empty when the uploader wrote none.
  • Empty tags are returned as [], not null.

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