Bilibili Scraper - Videos, Creators, Comments, Danmaku
Pricing
from $0.02 / 1,000 video scrapeds
Bilibili Scraper - Videos, Creators, Comments, Danmaku
[💰$0.02/1K] Scrape Bilibili video search, creator profiles and uploads, comments and danmaku in seven modes. Every row keeps view, like, favourite and coin counts with tags, duration, owner, category and a stable resultId for dedupe. Public web API, no proxy, no cookies, no login.
Pricing
from $0.02 / 1,000 video scrapeds
Rating
0.0
(0)
Developer
Vladimir Che
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
8 days ago
Last modified
Categories
Features
Share
Scrape Bilibili through the same public web API the site itself calls, over plain HTTP with no proxy, no cookies, no account and no API key. Seven input modes cover keyword search, a single video, a creator and the whole upload list, the popular feed, the ranking board, comments and danmaku.
Search walks six sort orders and unions them, because one order alone plateaus at 288 distinct videos while all six together return 1144 to 1199 for a single keyword. Creator mode reads the upload list at 50 videos per request and follows it to the end: 683 of 683 videos on the reference channel. Every row carries a stable resultId, so repeated runs deduplicate.
BILIBILI CAPS COMMENTS AND DANMAKU ON THE SERVER SIDE. Comments yield nine distinct root comments per video plus up to twenty replies under each, and the danmaku file is cut by the server maxlimit and by four available segment pages. The actor reports those caps per target instead of hiding them.
What you get
| Field | Description |
|---|---|
resultId | Stable id built from the mode and the entity, used to deduplicate runs |
kind | Which mode produced the row: search, video, creator, popular, ranking, comment, danmaku |
status | ok for a real row, or a diagnostic status when the target returned nothing |
reason | Explanation attached to a diagnostic row, null on a normal row |
bvid | Bilibili video id, the one the site puts in its own URLs |
aid | Numeric legacy video id |
cid | Part id, filled when the row belongs to one part of a multi-part video |
title | Video title as published |
description | Video description as published, with the source line breaks preserved |
url | Canonical video URL |
cover | Cover image URL |
durationSeconds | Duration in seconds |
publishedAt | Publish time in ISO 8601 |
tid | Numeric category id |
tname | Category name in Chinese, as the source spells it |
viewCount | View count at scrape time |
likeCount | Like count at scrape time |
favoriteCount | Favourite count at scrape time |
coinCount | Coin count at scrape time, null when the endpoint omits it |
danmakuCount | Number of danmaku the source declares for the video |
commentCount | Number of comments the source declares for the video |
tags | Tag list exactly as the video page carries it |
ownerMid | Numeric creator id |
ownerName | Creator display name |
pages | Part list for a multi-part video, null for a single-part video |
target | The keyword, video or creator id the row came from |
searchOrder | Sort order that produced the row in search mode |
searchRank | Position of the video inside that sort order |
rpid | Comment id |
rootRpid | Root comment id a reply belongs to |
message | Comment text |
replyCount | Replies the source declares under a root comment |
offsetSeconds | Position of a danmaku on the video timeline, in seconds |
mode | Danmaku render mode as a number |
color | Danmaku colour as a number |
Fields the current mode does not fill are null, never invented and never dropped. Output is available as JSON, CSV or Excel.
{"resultId": "bilibili:video:BV1ug4y1t7Ty","kind": "search","status": "ok","reason": null,"bvid": "BV1ug4y1t7Ty","aid": 823643366,"title": "【整整600集】清华大学196小时讲完的AI人工智能从入门到精通全套教程,全程干货无废话!...","url": "https://www.bilibili.com/video/BV1ug4y1t7Ty","durationSeconds": 217142,"publishedAt": "2023-03-18T08:08:31.000Z","tid": 231,"tname": "计算机技术","viewCount": 828248,"likeCount": 19924,"favoriteCount": 51372,"danmakuCount": 7713,"commentCount": 9251,"ownerMid": 1741962246,"ownerName": "IT界扛霸子","tags": ["人工智能", "计算机", "机器学习", "AI", "科技猎手2023"],"target": "人工智能教程","searchOrder": "totalrank","searchRank": 1}
How to use it
- Pick
mode. Search needs keywords, video needs video links, creator needs numeric creator ids. - Fill only the inputs your mode reads. The rest stay at their defaults and are ignored.
- Cap the run with
maxItemsandrunBudgetSecsso an expensive keyword cannot run away. - Start the run and download the dataset as JSON, CSV or Excel.
{"mode": "search","queries": ["人工智能教程", "露营"],"searchOrders": ["totalrank", "click"],"maxItems": 200,"maxPagesPerOrder": 3,"rowsPerPage": 20,"requestDelayMs": 400,"requestTimeoutSecs": 25,"runBudgetSecs": 300}
| Input | Default | What it does |
|---|---|---|
mode | search | Which of the seven modes to run |
queries | [] | Keywords, one target per keyword |
videoUrls | [] | Video links or bare BV ids |
creatorMids | [] | Numeric creator ids |
searchOrders | ["totalrank"] | Which sort orders to walk and merge |
maxItems | 200 | Hard cap on dataset rows for the whole run |
maxPagesPerOrder | 5 | Page cap per keyword per sort order |
rowsPerPage | 20 | Videos requested per search call |
maxCreatorPages | 40 | Page cap for the creator upload list, 50 videos per page |
includeReplies | false | Fetch the replies under each root comment |
commentsPerVideo | 9 | Root comments kept per video |
danmakuLimit | 3000 | Danmaku rows kept per video |
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
Three saved inputs, one per question this actor answers. Each one shows only the fields it needs, and each returns data on its first run.
| Task | Input | Question it answers |
|---|---|---|
| Bilibili Keyword Search Scraper | mode: search, queries, searchOrders, maxPagesPerOrder | what exists on a topic, merged over three sort orders so the long tail is not lost |
| Bilibili Creator Videos | mode: creator, creatorMids, maxCreatorPages | the upload list behind a channel id, page by page |
| Bilibili Video Comments | mode: comments, videoUrls, commentsPerVideo, includeReplies | root comments under one video with the replies attached |
All three run with runBudgetSecs at 205, so they finish before the platform timeout instead of being killed by it.
Modes
| Mode | What it requests | Rows it leaves |
|---|---|---|
search | Search pages for every keyword and sort order | One row per distinct video, with searchOrder and searchRank |
video | The view endpoint per video id | One row per video with the full statistic block and the part list |
creator | Creator card plus the upload list, 50 per page | One creator row plus one row per uploaded video |
popular | The popular feed, paged | One row per video on the feed |
ranking | The ranking board | One row per ranked video |
comments | Comment endpoints per video | One row per root comment, plus replies when enabled |
danmaku | The danmaku file per part | One row per bullet comment inside the cap |
Use cases
- Social listening across Chinese video - track how a product, a game or a topic is covered by Bilibili creators, with view and like counts to rank the videos that matter.
- Creator prospecting - pull a channel's whole upload list with view counts per video and decide on a sponsorship without opening the site.
- Dataset building for research - collect titles, tags, categories and durations into a table you can join with your own data.
- Comment and danmaku mining - read what viewers say about a specific video, bounded by the window and the caps the source really applies.
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, on top of the usual Apify platform costs:
video-scraped- one video row, from search, video, popular, ranking or creator mode.creator-scraped- one creator profile row.comment-scraped- one comment or reply row.danmaku-scraped- one danmaku row.apify-actor-start- charged once per run, the first five seconds of compute are not billed.
Nothing else is charged. A diagnostic row for a target that returned nothing is priced at the same per row rate as a real row, so a bad keyword cannot produce free traffic. Requests that return an error are retried and cost nothing extra.
Honest limits
- Comments are capped hard by Bilibili: nine distinct root comments per video and at most twenty replies under each, whichever endpoint and sort order is asked. A video declaring 9 251 comments still yields nine roots.
- Danmaku is capped by the server maxlimit and by the four segment pages the endpoint serves. A video declaring 7 713 danmaku cannot be read to the end through this path.
- Subtitles, article bodies, favourites and anime subscriptions are not reachable without a logged-in session and are not advertised here.
- Search depth per sort order plateaus on its own: one order stops at 288 distinct videos, so wide coverage requires the union of several orders and proportionally more requests.
- The actor runs without a proxy. Bilibili answers 412 when requests to the space endpoint come too fast, so
requestDelayMsmust stay above a few hundred milliseconds. - Fields the source omits stay
null.coinCount,shareCountandscoreare commonly absent from the search payload.
FAQ
Do I need a Bilibili account or cookies? No. Every mode reads endpoints that answer anonymous requests. No account, cookie or API key is used.
Why does a video with thousands of comments return only nine?
Because the source serves nine distinct root comments per video regardless of the requested count. The commentsPerVideo input above nine changes nothing, and the actor reports the real number.
Can I read the whole danmaku file of a long video? Not through this path. The server enforces a maxlimit and serves only four six-minute segment pages, so a long video loses rows in the middle of the timeline rather than at its end.
What happens when a keyword returns nothing?
The run leaves one explicit diagnostic row with status and reason instead of silence, so an empty dataset never means a broken run.
Can I resume a run that hit the budget? Yes, within the same run only. Rows already pushed are kept, and the summary reports the budget as exhausted. A new run starts from the beginning.
How do I avoid duplicates between runs?
Filter on resultId. It is stable across runs for the same video, creator, comment or danmaku, so a downstream join removes the overlap.
Does the actor need a proxy?
No. Runs complete without one. Very large keyword lists benefit from a longer requestDelayMs rather than from a proxy.
Which mode should I pick for a single video?
video for the statistic block and the part list, comments for the thread, danmaku for the bullet comments. Combining modes on one target is not supported in one run, except through search, which also fills the video fields.
Is the Chinese category name usable as a filter?
tname and tid both come straight from the source, so they join cleanly with a category table of your own, but the actor does not translate them.
Related actors
- /bilibili-danmaku-scraper - reads danmaku alone, with a time window, render mode and pool filters.
Changelog
- 2026-11-14: card rewritten to the publishing standard, price set to $0.02 per 1 000 rows.
- 2026-11-09: seven modes verified against live Bilibili without a proxy or cookies.