Bilibili Scraper: Videos, Danmaku, Comments
Pricing
from $12.00 / 1,000 videos
Bilibili Scraper: Videos, Danmaku, Comments
Bilibili scraper for video search, details, popular, danmaku, comments, subtitle transcripts and profiles. Charged only for rows delivered. $12 per 1,000 video rows.
Pricing
from $12.00 / 1,000 videos
Rating
0.0
(0)
Developer
Agnes Maina
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share
Bilibili Scraper: videos, danmaku, comments, transcripts
This Bilibili scraper reads video search results, video details, the popular list, danmaku (the timed comments displayed over a video), comments, subtitle transcripts, an uploader's videos and channel profiles. You pay for rows you receive: $0.012 per video row, which is $12 per 1,000 videos, and every billable event fires only after a successful dataset push.
Limits before you run it: maxItems caps items at 1,000 per query or per user, maxDanmakuPerVideo at 10,000 and maxCommentsPerVideo at 5,000. Which modes need a cookie you supply yourself: comments and transcript. Without one, comments stop at the top 3 ordinary replies per video plus a pinned reply, with totalComments still reporting the true total, and transcript returns the subtitle language list only, with hasText false, so it costs nothing per row. The other six modes, search, video_detail, popular, danmaku, user_videos and profile, need no cookie, and profile mode ignores it.
What you get
One row type per mode, and each one has its own price:
| Mode | Rows you get | Billed as |
|---|---|---|
search | Video search rows per queries entry, with coins and shares from signed video detail | one video event per row |
popular | The popular video list, maxItems in total | one video event per row |
user_videos | An uploader's videos, maxItems per mid | one video event per row |
video_detail | Detail and statistics for each BV ID or video URL | one video-detail event per row |
danmaku | Timed on-screen comments per video, up to maxDanmakuPerVideo across all pages | one danmaku-video event per video that delivered a row |
comments | Comments per video, up to maxCommentsPerVideo including second-level replies, each row with totalComments | one comment event per delivered row with non-empty text |
transcript | Subtitle language rows per part and language, with hasText saying whether text came with it | one transcript event per row with text |
profile | Uploader profiles, maxItems across all mids, missing fields null | one profile event per non-empty row |
Rows are keyed by bvid for video modes and by mid for profile mode, which is what delta mode tracks. Each run writes RUN_SUMMARY with pushed rows, charged events and errors.
Try it in 30 seconds
- Open the Actor page in the Apify Store and click Try for free.
- Pick
mode, fill the input it needs, click Start and open the dataset.
BV1VeHQ6tEaS is a video ID and 946974 is an uploader's numeric mid. Apify Proxy (datacenter) is the default; these examples switch it off only to keep the input short.
| What you want | Input |
|---|---|
| Search for videos | {"mode":"search","queries":["Genshin Impact"],"maxItems":20,"proxyConfiguration":{"useApifyProxy":false}} |
| Video detail and statistics | {"mode":"video_detail","videoUrls":["BV1VeHQ6tEaS"],"proxyConfiguration":{"useApifyProxy":false}} |
| The popular list | {"mode":"popular","maxItems":20,"proxyConfiguration":{"useApifyProxy":false}} |
| Danmaku for a video | {"mode":"danmaku","videoUrls":["BV1VeHQ6tEaS"],"maxDanmakuPerVideo":100,"proxyConfiguration":{"useApifyProxy":false}} |
| Comments for a video | {"mode":"comments","videoUrls":["BV1VeHQ6tEaS"],"maxCommentsPerVideo":50,"proxyConfiguration":{"useApifyProxy":false}} |
| Subtitle languages, or text with a cookie | {"mode":"transcript","videoUrls":["BV1VeHQ6tEaS"],"proxyConfiguration":{"useApifyProxy":false}} |
| An uploader's videos | {"mode":"user_videos","userIds":["946974"],"maxItems":5,"proxyConfiguration":{"useApifyProxy":false}} |
| Uploader profiles | {"mode":"profile","userIds":["946974","https://space.bilibili.com/8295295"],"maxItems":2,"proxyConfiguration":{"useApifyProxy":false}} |
Pricing
| Event | Price | What counts |
|---|---|---|
video | $0.012 | One search, popular or user_videos row |
video-detail | $0.02 | One video_detail row |
comment | $0.008 | One delivered comment with non-empty text |
danmaku-video | $0.01 | One video that delivers at least one danmaku row, whatever the count |
transcript | $0.01 | One delivered transcript row with text, per part and language |
profile | $0.012 | One non-empty profile row |
That is $12 per 1,000 video rows, $0.01 per danmaku set and $0.01 per transcript with text. The current pricing has no start event. Language-only transcript rows are free, so a run with no cookie and no subtitle text has no event charges.
Input
| Field | Type | Default | Limits and behavior |
|---|---|---|---|
mode | string | search | search, video_detail, popular, danmaku, comments, transcript, user_videos or profile |
queries | array | one prefilled query | One Bilibili video search per entry |
videoUrls | array | none | BV IDs or bilibili.com/video/BV URLs |
userIds | array | none | Numeric mid, space.bilibili.com/ |
maxItems | integer | 100 | 1 through 1000. Maximum per query or user, total for popular, or videos processed after dedupe and delta for videoUrls modes. Profile caps delivered rows across all mids |
maxDanmakuPerVideo | integer | 5000 | 1 through 10000 danmaku rows per video across all pages |
maxCommentsPerVideo | integer | 100 | 1 through 5000 comments per video, including second-level replies |
publishedAfter | string | none | Inclusive start date, YYYY-MM-DD in UTC, for search and user_videos |
publishedBefore | string | none | Inclusive end date, YYYY-MM-DD in UTC, for search and user_videos |
cookie | string | none | Secret input. A bare SESSDATA value or a full browser cookie string. It unlocks comments past the visitor limit of 3 and subtitle text, and is never logged or stored |
deltaMode | boolean | false | Skip a mode and bvid pair delivered by an earlier run before detail fetching, or a profile and mid pair before card fetching, and never bill it again |
proxyConfiguration | object | {"useApifyProxy":true} | Datacenter Apify Proxy by default. Custom proxy URLs and disabled proxy are honored |
Delta mode
deltaMode true skips items already delivered by an earlier run, tracked in the named key-value store bilibili-scraper-seen. Already delivered means the prior push and charge succeeded and the marker was saved. For danmaku, comments and transcript, the whole video's intended rows must finish before the marker is saved. Failed videos and zero-row results get no marker and are retried next run. A crash between a push and its marker can repeat rows, because the push, the charge and the marker are not one transaction. Completed language-only transcript markers also skip later cookie enabled delta runs, so turn delta off to fetch text that only a cookie unlocks.
Use cases
- Track what a channel publishes with
user_videosandmaxItems. - Follow the discussion under one video with
comments, then readtotalCommentsagainst the delivered rows. - Read the timed comment track for a video with
danmaku, billed per video. - Collect subtitle text where a cookie unlocks it, through
transcript. - Build an uploader list from
profilerows across several mids.
Integrations
Run it from the Apify API and read the dataset back in the same call:
curl -X POST "https://api.apify.com/v2/acts/agnes.developer.queen~bilibili-scraper/run-sync-get-dataset-items" \-H "Authorization: Bearer $APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"mode":"search","queries":["Genshin Impact"],"maxItems":20}'
The same call works from Python, Node.js, Make, n8n or Zapier. AI assistants and MCP clients can call the Actor through the Apify MCP server:
https://mcp.apify.com/?tools=agnes.developer.queen/bilibili-scraper
FAQ
Do I need a login or a cookie?
No Bilibili account is needed. A SESSDATA session cookie you supply yourself is only needed to go past 3 ordinary comments per video and to get subtitle text. The other six modes run without one, and profile ignores it.
What is danmaku?
Danmaku are the timed comments displayed over a video as it plays. The actor bills one danmaku-video event per video that produced a row, not per row, so a video with 5,000 danmaku rows costs the same as one with a single row.
Can I get subtitles or transcripts?
Without a cookie, transcript returns the language list only, with hasText false, and a video with no listed languages produces no rows. Add a valid login session in cookie to unlock comment pagination and subtitle text, billed per transcript row with text.
How do I get only new videos?
Set deltaMode to true and run on a schedule. Video modes key on mode plus bvid, profile keys on mode plus mid. Items that failed or produced no rows are retried next run.
What does maxItems apply to?
It caps items per query or per user, the popular list in total, and videos processed after dedupe and delta in the videoUrls modes. For profile it caps delivered rows across all mids. The hard cap is 1,000.
Can I filter by upload date?
Yes, with publishedAfter and publishedBefore as YYYY-MM-DD dates in UTC. Both are inclusive, for search and user_videos.
What happens when a request fails?
A transport error on a video is recorded in RUN_SUMMARY.errors, leaves that video unmarked and is retried on the next delta run, with no row charged. user_videos also retries risk-control responses such as -352 with a fresh visitor session before falling back to an author-filtered search.
Why was a row charged?
Every billable event fires only after a successful dataset push, so a charge means the row is in your dataset. An empty result or a failed request costs nothing.
Related Actors
- Meta Ad Library Scraper pulls public ad data from Meta.
- Google Ads Transparency Scraper does the same for Google Ads, on the same pay per delivered row model.
Support
Open an issue on the Issues tab of the Store page with the run ID, your input and RUN_SUMMARY.