Bilibili Danmaku Scraper - Bullet Comments by Timeline
Pricing
from $0.02 / 1,000 danmaku scrapeds
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
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
7 days ago
Last modified
Categories
Features
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
| Field | Description |
|---|---|
resultId | Stable id, built from the part cid and the danmaku id, or from the cid for a summary row |
kind | danmaku for a bullet comment, video for the per-part summary row |
status | ok for a real row, or a diagnostic status when the target failed |
reason | Explanation attached to a diagnostic row, null on a normal row |
target | The link or BV id the row came from |
bvid | Bilibili video id |
aid | Numeric legacy video id |
cid | Part id, one per part of a multi-part video |
page | Part number inside the video |
pageCount | How many parts the video has |
part | Part title as the source spells it |
title | Video title |
ownerMid | Numeric uploader id |
ownerName | Uploader display name |
dmid | Danmaku id |
offsetSeconds | Position of the bullet comment on the timeline, in seconds |
offsetMs | Same position in milliseconds |
mode | Render mode as a number |
modeName | Render mode as a name: scroll, bottom, top, reverse, positioned, code, bas |
pool | Pool number |
poolName | Pool name: normal, subtitle, special |
fontsize | Font size the comment was sent with |
color | Colour as a decimal number |
colorHex | Same colour as #rrggbb |
senderHash | Hashed sender id, as the source serves it |
weight | Weight the source assigns to the comment |
sentAt | Send time as a Unix timestamp |
sentAtIso | Same send time in ISO 8601 |
text | The bullet comment itself |
textLength | Character count of the text |
windowStartSec | Timeline window start applied to the row, null when unbounded |
windowEndSec | Timeline window end applied to the row, null when unbounded |
videoDurationSecs | Duration of the part in seconds |
declaredCount | Danmaku the source declares for the part, summary row only |
deliveredCount | Danmaku the served file actually carried, summary row only |
serverMaxlimit | Cap the server reported, summary row only |
coverageRatio | Share of the timeline the served file spans, summary row only |
rowsKept | Rows kept after filtering, summary row only |
droppedByWindow | Rows removed by the timeline window, summary row only |
droppedByMode | Rows removed by the mode filter, summary row only |
droppedByPool | Rows removed by the pool filter, summary row only |
droppedByLength | Rows removed by the text length bounds, summary row only |
droppedByInclude | Rows removed because they missed the required substrings, summary row only |
droppedByExclude | Rows 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
- Paste one or more video links, BV ids or
avids intovideoUrls. - Set the timeline window with
startSecandendSecwhen you only need one scene. - Narrow by render mode, pool or text when the window alone is too wide.
- Cap the run with
maxItemsandrunBudgetSecs, 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}
| Input | Default | What it does |
|---|---|---|
videoUrls | empty | Video links, BV ids or av ids, one target per video |
maxVideos | 50 | How many of the listed videos to process, in the given order |
pageScope | all | Read every part, the first part only, or the last part only |
startSec | empty | Keep only danmaku at or after this second of the timeline |
endSec | empty | Keep 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 |
minLength | 0 | Drop text shorter than this many characters |
maxLength | 0 | Drop 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 |
maxItems | 20000 | Hard cap on rows for the whole run, summary rows included |
requestDelayMs | 400 | Gap between requests in milliseconds |
requestTimeoutSecs | 25 | Per-request timeout in seconds |
runBudgetSecs | empty | Wall-clock budget, stops requesting when spent |
Ready-made tasks
| Task | Input | Question it answers |
|---|---|---|
| Bilibili Danmaku Scraper: Bullet Comments Timeline | videoUrls, pageScope: first, startSec, endSec | every 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
| Mode | What it requests | Rows it leaves |
|---|---|---|
all parts | One video card plus one danmaku file per part | One summary row and the danmaku rows for every part |
first part | One video card plus the danmaku file of part 1 | One summary row and the danmaku rows of part 1 |
last part | One video card plus the danmaku file of the final part | One summary row and the danmaku rows of the final part |
?p= suffix | One video card plus the file of the named part | One 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
declaredCountagainstdeliveredCountper 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.
colorHexandmodeNameare derived from the numeric fields the source serves. The original numbers stay incolorandmode.
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.
Related actors
- /bilibili-scraper - search, video details, creator profiles and uploads, comments and danmaku across seven modes.
Changelog
- 2026-11-16: task
bilibili-danmakupublished, 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.