Bilibili Scraper: Videos, Comments, Danmaku & Monitoring avatar

Bilibili Scraper: Videos, Comments, Danmaku & Monitoring

Pricing

from $3.50 / 1,000 video rows

Go to Apify Store
Bilibili Scraper: Videos, Comments, Danmaku & Monitoring

Bilibili Scraper: Videos, Comments, Danmaku & Monitoring

Bilibili API alternative: scrape B站 (哔哩哔哩) videos, comments with replies, danmaku (弹幕), UP主 creator profiles and the top-100 rankings by keyword, URL, creator or feed. $5 per 1,000 videos, $2 per 1,000 comments, $0.10 per 1,000 danmaku. Only-new monitor mode. No login or cookies needed.

Pricing

from $3.50 / 1,000 video rows

Rating

0.0

(0)

Developer

Kyle Wang

Kyle Wang

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

7 days ago

Last modified

Features

Limited permissions

Share

Get Bilibili (B站 / 哔哩哔哩) data as clean JSON without a login or an API key: video metadata with engagement metrics, comments with replies (楼中楼), danmaku (弹幕) with timeline positions, creator (UP主) profiles with a stats rollup, and the official top-100 rankings. Feed it keywords, video URLs, creator URLs or a ranking feed — or all four in one run. A practical Bilibili API alternative for market research, KOL vetting, comment analysis and danmaku export.

Only-new monitoring uses a named state to deliver just new videos, comments, replies and danmaku on later runs.

$5 per 1,000 videos · $2 per 1,000 comments (replies included) · $10 per 1,000 creator profiles · $0.10 per 1,000 danmaku. China residential proxy included, and runs that deliver nothing cost $0.

  • One run, four inputs — keywords, video URLs/BV ids, creator space URLs and ranking/popular feeds can be mixed; duplicates are delivered once.
  • Numbers you can sort by straight away — every video row carries engagement rate, age and views per day (all other rates are a division away from the raw stats); every creator row carries average and median views, average engagement and posting cadence for the videos fetched in the run.
  • Ready-made discovery — one input gives you Bilibili's official top-100 board for the whole site or any region.
  • Checked against Bilibili itself — in our October 2026 acceptance tests, every video field was compared with the videos' own pages (the only difference was a live counter that grew between the two reads), and the ranking's top 10 matched the official board in order.
  • Transparent delivery — fixed per-row prices, caps you control, and a run report (RUN_SUMMARY) that accounts for every source, per-video comments and danmaku, monitoring state and anything skipped, with the reason.
  • No setup — no login, no cookies or API key needed.

Scrapes publicly available data without login. Users are responsible for complying with Bilibili's terms of service in their use case.

Pricing

Pay per row delivered. Rows that fail or are skipped are never charged.

EventPriceWhen
Video row$0.005per video row delivered (engagement metrics included)
Comment row$0.002per comment or reply delivered
Creator row$0.01per creator row whose rollup includes at least one video (other creator rows, e.g. when the video list could not be fetched, are delivered free)
Danmaku row$0.0001per danmaku row delivered; no additional startup fee
Run fee$0.00005once per run, only if the run delivers at least one row

Those are FREE-tier list prices. Apify applies the subscription tier of the account running the Actor, and a paid tier costs less:

EventFREEBRONZESILVERGOLDPLATINUMDIAMOND
bilibili-video$0.005$0.0045$0.004$0.0035$0.0035$0.0035
bilibili-comment$0.002$0.0018$0.0016$0.0014$0.0014$0.0014
bilibili-creator$0.01$0.009$0.008$0.007$0.007$0.007
bilibili-danmaku$0.0001$0.00009$0.00008$0.00007$0.00007$0.00007
run-base-fee$0.00005$0.00005$0.00005$0.00005$0.00005$0.00005

BRONZE saves 10%, SILVER 20%, and GOLD, PLATINUM and DIAMOND 30% on the four row events. The run fee is never discounted. RUN_SUMMARY.billing.prices reports the prices your run actually applied, so on a paid tier the auditable bill matches the tier you are on rather than the list above.

What common configurations cost at most, at FREE-tier prices (you pay only for rows delivered; videos with fewer comments than requested return fewer rows and cost less):

ConfigurationDelivers up toCost up to
Try example (prefilled keyword 音乐, 10 videos, 20 comments and 100 danmaku each)10 videos + 200 comments + 1,000 danmaku$0.55005
Defaults (20 videos, no comments)20 videos$0.10
Defaults + comments (commentsPerVideo: 20)20 videos + 400 comments$0.90
Defaults + danmaku (danmakuPerVideo: 100)20 videos + 2,000 danmaku$0.30
One ranking board (feeds: ["ranking"], maxVideos: 100)100 videos$0.50
All default caps reached300 videos + 1,000 comments + 20 creators≈ $3.70
Beyond the default caps (raise maxCommentsTotal and maxTotalChargeUsd)300 videos + 6,000 comments≈ $13.50

Measured examples: the defaults + comments run delivered 20 videos + 242 comments for $0.58 (many keyword results are new videos with few comments); 20 creators with 15 videos each and 1,000 comments delivered 295 videos + 1,000 comments + 20 creators for $3.68 in 18 minutes.

maxTotalChargeUsd (default $10) is a hard stop: the Actor stops delivering before the next row would exceed it, and the lower of this value and your platform max-charge setting applies.

Three recipes

KOL vetting — profile and benchmark creators before you contact them.

{
"creatorUrls": ["https://space.bilibili.com/946974", "https://space.bilibili.com/163637592"],
"maxVideosPerCreator": 30,
"maxVideos": 60
}

You get each creator's 30 newest videos (with engagement metrics) and one creator row per creator: followers, total likes, video count, verification, plus rollup with avgViews, medianViews, maxViews, avgEngagementRate and videosPerWeek. Set maxVideos to at least creators × maxVideosPerCreator; with a smaller maxVideos it is split evenly across the creators, so each rollup covers fewer videos.

Trend scan — what is hot right now, in one region or the whole site.

{
"feeds": ["ranking"],
"rankRegionIds": [0, 188],
"maxVideos": 200
}

Up to 100 ranked videos per region (0 = whole site, 188 = Tech), each with source.rank (its position on the board), zone, tags, stats and derived metrics. Add "keywords": ["露营装备"] to scan a product category in the same run.

Comment mining — reactions and threads for specific videos.

{
"videoUrls": ["https://www.bilibili.com/video/BV1GJ411x7h7", "BV1KiJk67EQ9"],
"commentsPerVideo": 50,
"includeReplies": true,
"commentSort": "hot"
}

Up to 50 comment rows per video: the pinned comment and Bilibili's hot list first. Many videos have a hot list shorter than that (few comments with likes), so the rest is filled newest-first; each row's sort field says which list it came from (hot or new). With includeReplies, each comment is followed by up to maxRepliesPerComment of its replies (default 10) before the next comment starts, so one very long thread cannot use up the whole allowance; the comment's replyCount still shows the full thread size. Replies carry rootRpid and parentRpid, so threads can be rebuilt.

Danmaku export — collect bullet comments without paying for comment rows.

{
"videoUrls": ["BV1ZVxf6ZENs", "BV1XwxU6xEnL"],
"commentsPerVideo": 0,
"danmakuPerVideo": 500,
"maxDanmakuTotal": 1000
}

Video rows are delivered first. Each video's comments and danmaku then follow together in video order, so the first results page can show all three core data types instead of hiding danmaku behind every comment. Set commentsPerVideo: 0 when you only want videos and danmaku; the video rows themselves are still delivered and charged. Both danmaku caps must be greater than zero to make any danmaku request.

Input

FieldDefaultNotes
keywords—Up to 20 keywords, Chinese or English. Bilibili returns at most 1,000 results per keyword.
videoUrls—Up to 300 video URLs, BV ids or av ids. b23.tv short links are not resolved.
creatorUrls—Up to 20 space.bilibili.com URLs or numeric mids.
feeds—ranking (top 100 per region) and/or popular (trending).
rankRegionIds[0]Up to 5 regions for the ranking feed: 0 whole site, 1 Animation, 3 Music, 4 Gaming, 5 Entertainment, 36 Knowledge, 119 Remix, 129 Dance, 155 Fashion, 160 Life, 181 Film & TV, 188 Tech, 211 Food, 217 Animals, 223 Cars, 234 Sports.
maxVideos20Hard cap for the whole run, across all inputs (max 300).
maxVideosPerKeyword20Per-keyword cap.
maxVideosPerCreator40Newest videos per creator.
commentsPerVideo00–100 comment rows per video.
includeRepliesfalseAlso fetch replies (same price, counted toward both comment caps).
maxRepliesPerComment10With includeReplies: at most this many replies per comment (1–100).
commentSorthothot (pinned comment and hot list first, topped up newest-first when the hot list is shorter than commentsPerVideo) or new (newest first).
maxCommentsTotal1000Hard cap on comment rows for the run.
danmakuPerVideo00–2,000 danmaku rows per video; 0 = off. In incremental mode, caps new rows per video per run.
maxDanmakuTotal50000–30,000 danmaku rows for the run; 0 = off. Either zero cap disables all danmaku requests.
maxTotalChargeUsd10Spending cap in USD.
proxyConfigurationApify RESIDENTIAL, ChinaKeep the default — see below.
incrementalfalseDeliver only rows new since the previous run with the same state key.
incrementalStateKeydefaultNamed monitor state; letters, digits, _ and - are kept, other characters become - (maximum 40).
incrementalResetfalseClear the selected state first, making this run a first run. Ignored when incremental is false.

Order and caps. Inputs are processed in this order: video URLs → creators → feeds → keywords, and maxVideos is shared by all of them. Creators split what is left evenly, so every creator gets a rollup (with 5 creators and maxVideos: 10, each gets 2 videos); feeds and keywords are then served first come, first served. The report shows what each source received and why it stopped. Video/creator rows are delivered first; each video's comments/replies and then its danmaku are delivered before the next video. Comments are collected per video in video order against maxCommentsTotal, and danmaku uses the same order against maxDanmakuTotal; both caps are first come, first served, so later videos may get fewer rows or none. RUN_SUMMARY.perVideoComments and RUN_SUMMARY.danmaku.perVideo show exactly what each video got. Set commentsPerVideo: 0 to reserve the remaining stages for danmaku.

Output

One dataset with four row types, told apart by type: video, comment, danmaku and creator. The dataset has Overview, Videos, Comments, Danmaku and Creators views; CSV and Excel exports flatten nested fields. Overview shows video covers and engagement alongside comment/danmaku text; danmaku rows also expose timeline offset, send time, mode and colour, so the Try result demonstrates the time-coded audience reaction rather than just a video list.

{"type":"video","bvid":"BV1KiJk67EQ9","aid":117443632567747,"cid":42756868744,"url":"https://www.bilibili.com/video/BV1KiJk67EQ9",
"title":"我造了一块会飞的滑板...","description":"…","duration":598,"pubdate":"2026-10-15T17:30:00+08:00","isRepost":false,
"category":{"tid":233,"tname":"极客DIY"},"tags":["滑板","DIY"],
"owner":{"mid":431956189,"name":"神奇阿宇Ayu"},
"stats":{"view":5363695,"danmaku":7144,"reply":10592,"favorite":89000,"coin":112376,"share":34722,"like":254161},
"derived":{"engagementRate":0.0914,"ageDays":2,"viewsPerDay":2681847.5},
"coverUrl":"https://i1.hdslb.com/bfs/archive/….jpg","source":{"mode":"ranking","keyword":null,"creatorMid":null,"rankRegionId":0,"rank":1},
"scrapedAt":"2026-10-17T09:30:00.000Z"}
{"type":"comment","bvid":"BV1GJ411x7h7","aid":80433022,"rpid":3760801399,"parentRpid":null,"rootRpid":null,
"author":{"mid":320773657,"name":"老咸鱼A"},"content":"坏消息:被骗了\n好消息:真好听","like":767623,"replyCount":2206,
"publishedAt":"2020-11-29T20:26:45+08:00","sort":"hot","isPinned":false,"scrapedAt":"2026-10-17T09:30:01.000Z"}
{"type":"danmaku","bvid":"BV1ZVxf6ZENs","dmid":"2237926911983295488","content":"前方高能","offsetSeconds":0.212,
"mode":"top","color":"#FEF102","senderHash":"de08239b","publishedAt":"2026-11-05T20:01:17+08:00","scrapedAt":"2026-11-07T06:00:00.000Z"}
{"type":"creator","mid":946974,"name":"影视飓风","sign":"…","followers":18600000,"videoCount":937,"totalLikes":300000000,
"officialTitle":"…","profileStatus":"ok","spaceUrl":"https://space.bilibili.com/946974",
"rollup":{"videosFetched":30,"avgViews":2033333,"medianViews":1650000,"maxViews":7900000,"maxVideoBvid":"BV1…",
"avgEngagementRate":0.0712,"videosPerWeek":2.19},"scrapedAt":"2026-10-17T09:30:02.000Z"}

(Values are illustrative.)

How the metrics are computed

  • engagementRate = (like + coin + favorite + share) / view, rounded to four decimals and null when the video has no views yet. Other rates are a division away from the raw stats counts.
  • ageDays = whole days since publishing, at least 1; viewsPerDay = view / ageDays, one decimal.
  • Creator rollup uses only that creator's videos fetched in this run: medianViews averages the two middle values for an even count; videosPerWeek = videosFetched / max(1, days between the oldest and newest fetched video / 7), and is null with fewer than two videos. Very large accounts (hundreds of thousands of uploads) may not list their videos; their creator row then has an empty rollup and the report says why.
  • tname is Bilibili's classic zone name.
  • Phone numbers and email addresses in titles, descriptions, bios, comments and danmaku are replaced with [removed]. Comment authors appear only as public mid and nickname; danmaku senders appear only as Bilibili's sender hash.

Run report. RUN_SUMMARY in the default key-value store lists requested vs delivered counts, per-source results (perCreator, perRegion, perKeyword), perVideoComments, per-video danmaku results (first 50 plus an overflow count), incremental monitor results, what was skipped and why (skippedBy: budget, request quota, deadline, risk-control stop, rejected items), billed events, request statistics and a plain-English humanReadableReason whenever something was cut short.

Danmaku

Set both danmakuPerVideo and maxDanmakuTotal above zero to enable danmaku. The default danmakuPerVideo: 0 makes no danmaku requests and produces no danmaku rows. One XML-list request is made per selected video per run; content is not cached across runs.

A danmaku row has type: "danmaku" and these nine data fields:

FieldMeaning
bvidJoin key to the video row.
dmidBilibili's danmaku id as a string, preserving 19-digit ids without JavaScript precision loss.
contentBullet-comment text, with phone numbers and emails masked.
offsetSecondsPosition on the video timeline in seconds, rounded to three decimal places.
modescroll, bottom, top, reverse, advanced, code, baseline or other for an unknown source mode.
colorUppercase #RRGGBB colour converted from Bilibili's integer.
senderHashBilibili's anonymised sender hash, not a user id.
publishedAtSend time in ISO 8601 Beijing time (+08:00).
scrapedAtScrape time in UTC ISO 8601.

Anonymous source and coverage limit. Danmaku comes only from Bilibili's anonymous x/v1/dm/list.so XML list, without login or cookies. It does not use the login-only history/recent endpoints or the protobuf full-timeline segment endpoint. The returned row count is not the video's stats.danmaku total, and the XML <maxlimit> value is not the number of rows returned.

In anonymous probes on 2026-11-07, one response returned 3,600 rows for a 1,634-second video reporting 8,619 danmaku; a 16,005-second video reporting 65,964 danmaku returned 7,200 rows covering only 0–3,217.6 seconds. Thus the anonymous list exposes at most a few thousand rows per request and, for very long high-density videos, only the beginning of the timeline. New danmaku later in such a video may not be present at all. This Actor never claims a full danmaku export: RUN_SUMMARY.danmaku reports sourceReturned, coverageShort, actual delivery and stop reasons. coverageShort is a Bilibili source limitation, not a billing shortfall.

Within each video, rows are deduplicated by dmid and sorted by offsetSeconds, then string dmid. In a non-incremental run, rows above the cap are sampled evenly across the returned timeline rather than taking only the first N; the per-video summary sets sampled: true. Multi-P videos deliver danmaku only for P1, identified by the video row's own cid; other P are not traversed, and the summary marks multipart: true when appropriate.

Incremental monitoring

Set incremental: true and give each monitor a stable incrementalStateKey:

{
"videoUrls": ["BV1ZVxf6ZENs", "BV1XwxU6xEnL"],
"commentsPerVideo": 50,
"includeReplies": true,
"danmakuPerVideo": 100,
"incremental": true,
"incrementalStateKey": "product-watch"
}
  • First run: when the state record does not exist, the run behaves like a normal run, delivers creator rows and establishes watermarks. incrementalReset: true clears the selected state first, so that run is also a first run.
  • Later runs: videos are deduplicated by bvid and old video rows are not delivered again or refreshed with new stats. Comments, replies and danmaku use send/publish-time watermarks plus ids at the same-second boundary. Creator rows are delivered only on the first run; later runs still report creator collection activity but do not charge a creator-row event. An av/numeric-aid input may need one detail request to resolve its bvid before the Actor can tell whether it is old.
  • Only delivered rows advance state. Budget, quota, deadline or risk-control truncation never advances a watermark past rows that were not pushed. Zero new rows do not trigger the run base fee or any row event.

Monitoring state is stored in the named key-value store bilibili-monitor-state, not the default per-run store. Records are named state.<sanitizedKey>; a save-failure fallback is named recovery.<sanitizedKey>. The state key keeps only letters, digits, _ and -, replaces every other character with -, and is capped at 40 characters; an empty result becomes default. Named stores are isolated per Apify account, so another buyer's identically named store is separate. Non-incremental runs never open this store. The default store's RUN_STATE is used only to resume the same run after migration.

A successful later run with no new video, comment, reply or danmaku rows delivers zero rows and returns errorCode: "NO_NEW_ROWS", distinct from NO_RESULTS for an input that itself produced nothing:

NO_NEW_ROWS: No new rows since the last run for state "<key>". Nothing was charged.

NO_NEW_ROWS means the incremental check completed. Server, network or Bilibili API failures during an empty check return UPSTREAM_ZERO and fail the run; an empty check cut short by quota, deadline, missing danmaku billing, a state-save failure or another incomplete source returns MONITOR_CHECK_INCOMPLETE with partial: true. HTTP 403/404 danmaku responses also make an empty check incomplete instead of confirming that nothing changed. Neither result claims that nothing changed, and neither charges for rows that were not delivered.

Monitoring semantics and limits:

  • Comments are forced to newest-first (commentSort is ignored). If more new comments arrive between runs than commentsPerVideo, only the newest capped subset is delivered and older new comments are not backfilled later; raise commentsPerVideo to widen the monitoring window. Replies are fetched only under root comments visited in the latest pages, so a new reply under an old root outside those pages can be missed. Replies do not advance the root-comment watermark. At most 200 root-comment reply watermarks are retained per video; the oldest are evicted above that limit.
  • Incremental danmaku is not evenly sampled: the oldest contiguous prefix of new rows up to the cap is delivered, and the watermark advances only through that prefix. Output is still timeline-sorted. If the platform short-pushes a batch, delivered rows outside the continuous prefix are remembered as sparse ids and merged into the watermark on a later run. At most 500 sparse ids per video and 500 ids per same-second boundary are retained; evictions above these limits can cause a small number of duplicates.
  • Keyword discovery stops after two consecutive pages with no new videos and may see only the first few dozen search results, so a new video ranked farther back can be missed. A creator archive stops after a 30-video page is entirely old; ranking/popular lists are not stopped early.
  • State retains at most 1,000 videos, evicting the least recently seen. If the JSON record would exceed 4 MB, old videos are evicted until 800 remain, then eviction continues as needed until the record is at most 4 MB. RUN_SUMMARY.monitor.evicted, replyWatermarksEvicted and danmakuSparseEvicted report these evictions; evicted history can cause a small number of duplicates. State with an unsupported version is treated as new and reported as stateReset: "version".
  • Saves are throttled to once every 15 seconds with a final forced save. A crash can therefore repeat rows from at most one unsaved window (up to 15 seconds). A failed save does not fail the run, but monitor.stateSaved becomes false and the run is partial. The Actor then writes only the monitor watermarks to recovery.<stateKey> in the same named store; the next run finds that record naturally, merges it with any older state and does not inherit the previous run's delivery or billing counters. A successful state save clears the recovery record. RUN_STATE in the default per-run store remains same-run migration state and is removed at the end. If both the state and recovery writes fail, the next run may repeat rows.
  • If the named store cannot be opened, the run fails closed before scraping with MONITOR_STATE_UNAVAILABLE and charges nothing. Do not run two runs with the same incrementalStateKey concurrently; this mode has no lock and concurrent writes are last-writer-wins.

Reliability and limits

  • Proxy. Bilibili rejects most requests that come from outside mainland China — including Apify's own servers — so the default is the Apify RESIDENTIAL proxy in China. Its cost is on us, not you. With another proxy or a direct connection most requests are rejected, and the run usually stops within seconds with nothing delivered and nothing charged — keep the default.
  • Pacing. Requests are sent one at a time with a short random pause (about 2 seconds per request in tests), so a default run takes about a minute, a full ranking board about 3–4 minutes and the largest default job about 18 minutes.
  • Stops. A run stops early, keeps everything already delivered and explains why when (1) the spending cap is reached, (2) 1,500 requests have been made, (3) the run is close to its timeout, or (4) Bilibili rejects three requests in a row. Any run that delivers nothing costs $0; if Bilibili's rejections were the reason, the run is marked failed.
  • Platform limits. Search returns at most 1,000 results per keyword; the ranking board has 100 videos per region.
  • Creator video lists. Bilibili rejects many creator video-list requests at random, so each page is retried up to 8 times with pauses on fresh connections. If a creator's list still cannot be fetched, you get the profile row free, with an empty rollup, and the report says so.

What this Actor does not do

No login or account features, no subtitles or transcripts, no video or audio files, no live streams, no anime/film (OGV) catalogues, and no private or personal data beyond public nicknames, ids and anonymised sender hashes. Danmaku is limited to the partial anonymous XML list described above; this is not a subtitle, full-timeline protobuf or sentiment-analysis feature.

This ActorTypical alternatives
Keyword, URL, creator and ranking input in one run✅Usually one mode per run
Engagement rates and creator rollups in the rows✅Usually raw counts only
Comment replies with thread ids✅Varies
Anonymous XML danmaku with timeline positions✅ (source coverage is partial)Varies
Subtitles and transcripts❌Some offer them
PricingFixed per row, zero-delivery runs freeVaries

FAQ

Do I need a Bilibili account, cookies or an API key? No.

Can I search in English? Yes, but most Bilibili content is in Chinese; Chinese keywords return more relevant results.

Why do some search results look unrelated? Bilibili's search is fuzzy, like the website: for rare, misspelled or very long keywords it matches parts of the keyword. Use specific keywords and check title and tags before relying on a result.

Why did some videos not come back? Deleted, private or region-locked videos are listed in RUN_SUMMARY.perVideoUrl.unavailable; items Bilibili rejected are counted in skippedBy.blocked. Neither is charged.

Why do later videos have fewer comments? maxCommentsTotal is shared first come, first served in video order. Raise it, or lower commentsPerVideo, to spread comments further. A video can also simply have fewer comments than you asked for: its stats.reply count includes replies and comments Bilibili has folded or removed, so it is often higher than what can be listed. RUN_SUMMARY.perVideoComments shows each video's result and stop reason.

Can I schedule it or call it from n8n, Make or my own code? Yes. Input and output are plain JSON; use the Apify API, an Apify schedule or any integration that can start an Actor run.