Bilibili Danmaku Scraper - Bullet Comments by Timeline avatar

Bilibili Danmaku Scraper - Bullet Comments by Timeline

Pricing

from $0.02 / 1,000 danmaku scrapeds

Go to Apify Store
Bilibili Danmaku Scraper - Bullet Comments by Timeline

Bilibili Danmaku Scraper - Bullet Comments by Timeline

[💰$0.02/1K] Scrape Bilibili danmaku bullet comments with a time window. Each row keeps timeline offset, render mode, pool, colour, text and sender hash, with a per-part summary row stating declared and delivered counts. Public endpoint, no proxy, no cookies.

Pricing

from $0.02 / 1,000 danmaku scrapeds

Rating

0.0

(0)

Developer

Vladimir Che

Vladimir Che

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

7 days ago

Last modified

Features

Limited permissions

Share

Read Bilibili danmaku through the same public endpoint the player itself calls, over plain HTTP with no proxy, no account and no API key. Give the actor video links or BV ids and it fetches each part's danmaku file once, then does every filter locally, so a timeline window costs no extra requests.

The timeline window is the point of this actor. Set startSec and endSec and you keep only the bullet comments that appear inside that stretch of the video, which is what a study of one scene, one chorus or one incident actually needs. On top of that you filter by render mode, by pool, by text length and by required or forbidden substrings.

A video split into parts carries a separate danmaku file and a separate timeline per part. All parts are read by default, and a ?p=3 suffix on a link narrows that target to a single part.

BILIBILI CAPS THE DANMAKU FILE AND THINS THE TIMELINE. A video declaring 14 744 danmaku served 3 600. The cap removes rows across the whole timeline instead of cutting its tail, so the last record still lands at 1 774 of 1 775 seconds. The per-part summary row reports the declared count, the delivered count and the server maxlimit, and a larger request parameter does not change any of them because the server ignores it.

What you get

FieldDescription
resultIdStable id, built from the part cid and the danmaku id, or from the cid for a summary row
kinddanmaku for a bullet comment, video for the per-part summary row
statusok for a real row, or a diagnostic status when the target failed
reasonExplanation attached to a diagnostic row, null on a normal row
targetThe link or BV id the row came from
bvidBilibili video id
aidNumeric legacy video id
cidPart id, one per part of a multi-part video
pagePart number inside the video
pageCountHow many parts the video has
partPart title as the source spells it
titleVideo title
ownerMidNumeric uploader id
ownerNameUploader display name
dmidDanmaku id
offsetSecondsPosition of the bullet comment on the timeline, in seconds
offsetMsSame position in milliseconds
modeRender mode as a number
modeNameRender mode as a name: scroll, bottom, top, reverse, positioned, code, bas
poolPool number
poolNamePool name: normal, subtitle, special
fontsizeFont size the comment was sent with
colorColour as a decimal number
colorHexSame colour as #rrggbb
senderHashHashed sender id, as the source serves it
weightWeight the source assigns to the comment
sentAtSend time as a Unix timestamp
sentAtIsoSame send time in ISO 8601
textThe bullet comment itself
textLengthCharacter count of the text
windowStartSecTimeline window start applied to the row, null when unbounded
windowEndSecTimeline window end applied to the row, null when unbounded
videoDurationSecsDuration of the part in seconds
declaredCountDanmaku the source declares for the part, summary row only
deliveredCountDanmaku the served file actually carried, summary row only
serverMaxlimitCap the server reported, summary row only
coverageRatioShare of the timeline the served file spans, summary row only
rowsKeptRows kept after filtering, summary row only
droppedByWindowRows removed by the timeline window, summary row only
droppedByModeRows removed by the mode filter, summary row only
droppedByPoolRows removed by the pool filter, summary row only
droppedByLengthRows removed by the text length bounds, summary row only
droppedByIncludeRows removed because they missed the required substrings, summary row only
droppedByExcludeRows removed because they matched a forbidden substring, summary row only

Fields the current row type does not fill are null, never invented. Output is available as JSON, CSV or Excel.

{
"resultId": "bilibili:danmaku:43468129293:2241212402170006784",
"kind": "danmaku",
"status": "ok",
"reason": null,
"bvid": "BV1aYW86vEte",
"aid": 117586960321424,
"cid": 43468129293,
"page": 1,
"pageCount": 1,
"part": "Faker了一辈子的蹲方魂 终于…",
"dmid": "2241212402170006784",
"offsetSeconds": 1.182,
"offsetMs": 1182,
"mode": 5,
"modeName": "top",
"pool": 0,
"poolName": "normal",
"color": 16707842,
"colorHex": "#fef102",
"weight": 10,
"sentAt": 1794264538,
"sentAtIso": "2026-11-09T22:48:58.000Z",
"text": "一定要看到最后,有种大狗终于叫了的释怀感",
"textLength": 20,
"videoDurationSecs": 101,
"target": "https://www.bilibili.com/video/BV1aYW86vEte"
}

How to use it

  1. Paste one or more video links, BV ids or av ids into videoUrls.
  2. Set the timeline window with startSec and endSec when you only need one scene.
  3. Narrow by render mode, pool or text when the window alone is too wide.
  4. Cap the run with maxItems and runBudgetSecs, then download the dataset.
{
"videoUrls": ["https://www.bilibili.com/video/BV1WEWs66EBP"],
"pageScope": "first",
"startSec": 0,
"endSec": 600,
"modes": ["scroll", "top"],
"minLength": 2,
"maxItems": 5000,
"requestDelayMs": 400,
"requestTimeoutSecs": 25,
"runBudgetSecs": 300
}
InputDefaultWhat it does
videoUrlsemptyVideo links, BV ids or av ids, one target per video
maxVideos50How many of the listed videos to process, in the given order
pageScopeallRead every part, the first part only, or the last part only
startSecemptyKeep only danmaku at or after this second of the timeline
endSecemptyKeep only danmaku at or before this second of the timeline
modes[]Keep only these render modes, names or numbers
pools[]Keep only these pools, names or numbers
minLength0Drop text shorter than this many characters
maxLength0Drop text longer than this many characters, zero means no bound
includeText[]Keep only text containing at least one of these substrings
excludeText[]Drop text containing any of these substrings
maxItems20000Hard cap on rows for the whole run, summary rows included
requestDelayMs400Gap between requests in milliseconds
requestTimeoutSecs25Per-request timeout in seconds
runBudgetSecsemptyWall-clock budget, stops requesting when spent

Ready-made tasks

TaskInputQuestion it answers
Bilibili Danmaku Scraper: Bullet Comments TimelinevideoUrls, pageScope: first, startSec, endSecevery bullet comment of one scene, with the exact second it appeared

Two more inputs, not saved as tasks because they differ from the one above by a single field:

  • Top comments only: add {"modes":["top"],"minLength":4} to keep the pinned and highlighted comments that carry the most repeated phrases.
  • Multi-part series: {"videoUrls":["https://www.bilibili.com/video/BV1WEWs66EBP"],"pageScope":"all","maxItems":50000} reads every part as its own timeline.

Modes

ModeWhat it requestsRows it leaves
all partsOne video card plus one danmaku file per partOne summary row and the danmaku rows for every part
first partOne video card plus the danmaku file of part 1One summary row and the danmaku rows of part 1
last partOne video card plus the danmaku file of the final partOne summary row and the danmaku rows of the final part
?p= suffixOne video card plus the file of the named partOne summary row and the danmaku rows of that part

Use cases

  • Audience reaction research - take one scene of a video and read every bullet comment that appeared during it, without reading the whole timeline.
  • Language and slang study - collect danmaku from a set of popular videos, keep only the modes that render prominently, and get a corpus with timestamps for alignment.
  • Content quality triage - compare declaredCount against deliveredCount per part to see how much of a crowded timeline the source actually serves.
  • Rights and moderation review - pull the text and send time of comments around a specific incident, bounded to the seconds that matter.

Cost

$0.02 per 1 000 rows. The Store adds a 20 % Apify margin on top of that price, and the buyer sees the margin in the invoice, not in this number.

You pay per row the actor actually pushed into the default dataset:

  • danmaku-scraped - one bullet comment row.
  • video-scraped - one per-part summary row, which carries the declared and delivered counts.
  • apify-actor-start - charged once per run, the first five seconds of compute are not billed.

Nothing else is charged. Filters such as the timeline window, mode, pool and text reduce the number of rows and therefore the bill, because filtered out comments are never pushed. Requests that fail are retried and cost nothing extra.

Honest limits

  • The served danmaku file is capped by the server. A video declaring 14 744 danmaku served 3 600, and the cap thins the timeline rather than truncating its end.
  • A larger request parameter does not raise the cap. The server ignores it, which is why the actor reports the cap per part instead of pretending to bypass it.
  • Only the four segment pages the endpoint serves can be read. Older parts of very long timelines are simply absent from the file.
  • Sender identity is a hash served by the source. The actor passes it through and cannot resolve it to an account.
  • Danmaku text arrives in the language viewers used, usually Chinese. The actor does not translate, normalise or deduplicate repeated phrases.
  • The timeline window is applied to the already served file, so a narrow window on a capped file can return very few rows. That is the source cap, not a bug in the filter.
  • colorHex and modeName are derived from the numeric fields the source serves. The original numbers stay in color and mode.

FAQ

Why did my short window return so few comments? Because the server thins the file across the whole timeline before you see it. A crowded video loses rows everywhere, and a narrow window keeps its proportional share.

Can I get the full danmaku of a video with tens of thousands of comments? Not through this endpoint. The cap is applied on the server and no request parameter lifts it. The summary row tells you how much was declared and how much was delivered.

What does pageScope do for a single-part video? Nothing. A video with one part has one danmaku file, so all, first and last return the same rows.

How do I read only one part of a multi-part video? Add ?p=3 to that link. The suffix overrides pageScope for that target only.

Are numeric mode and pool values accepted? Yes. modes and pools accept names and numbers, so ["5"] and ["top"] select the same render mode.

What happens when a video link is wrong? The run leaves one diagnostic row with status and reason for that target and continues with the rest, so one bad link does not stop the run.

Is the summary row chargeable? Yes, it is a dataset row and it is priced at the same per row rate as a comment. It is emitted once per part so you can audit the cap.

Do I need cookies or a proxy? No. The danmaku endpoint answers anonymous requests, and runs complete without a proxy or a login.

Can I join the output with the video scraper? Yes. resultId in the video scraper starts with bilibili:video: and here with bilibili:danmaku:, and both share bvid and cid, so the join is on bvid for video level work and on cid for part level work.

  • /bilibili-scraper - search, video details, creator profiles and uploads, comments and danmaku across seven modes.

Changelog

  • 2026-11-16: task bilibili-danmaku published, linked above and run once from itself.
  • 2026-11-14: card rewritten to the publishing standard, price set to $0.02 per 1 000 rows.
  • 2026-11-09: 69 559 danmaku rows collected over 77 requests with no duplicates.