Bilibili Scraper - Videos, Creators, Comments, Danmaku avatar

Bilibili Scraper - Videos, Creators, Comments, Danmaku

Pricing

from $0.02 / 1,000 video scrapeds

Go to Apify Store
Bilibili Scraper - Videos, Creators, Comments, Danmaku

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

Vladimir Che

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 days ago

Last modified

Features

Limited permissions

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

FieldDescription
resultIdStable id built from the mode and the entity, used to deduplicate runs
kindWhich mode produced the row: search, video, creator, popular, ranking, comment, danmaku
statusok for a real row, or a diagnostic status when the target returned nothing
reasonExplanation attached to a diagnostic row, null on a normal row
bvidBilibili video id, the one the site puts in its own URLs
aidNumeric legacy video id
cidPart id, filled when the row belongs to one part of a multi-part video
titleVideo title as published
descriptionVideo description as published, with the source line breaks preserved
urlCanonical video URL
coverCover image URL
durationSecondsDuration in seconds
publishedAtPublish time in ISO 8601
tidNumeric category id
tnameCategory name in Chinese, as the source spells it
viewCountView count at scrape time
likeCountLike count at scrape time
favoriteCountFavourite count at scrape time
coinCountCoin count at scrape time, null when the endpoint omits it
danmakuCountNumber of danmaku the source declares for the video
commentCountNumber of comments the source declares for the video
tagsTag list exactly as the video page carries it
ownerMidNumeric creator id
ownerNameCreator display name
pagesPart list for a multi-part video, null for a single-part video
targetThe keyword, video or creator id the row came from
searchOrderSort order that produced the row in search mode
searchRankPosition of the video inside that sort order
rpidComment id
rootRpidRoot comment id a reply belongs to
messageComment text
replyCountReplies the source declares under a root comment
offsetSecondsPosition of a danmaku on the video timeline, in seconds
modeDanmaku render mode as a number
colorDanmaku 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

  1. Pick mode. Search needs keywords, video needs video links, creator needs numeric creator ids.
  2. Fill only the inputs your mode reads. The rest stay at their defaults and are ignored.
  3. Cap the run with maxItems and runBudgetSecs so an expensive keyword cannot run away.
  4. 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
}
InputDefaultWhat it does
modesearchWhich 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
maxItems200Hard cap on dataset rows for the whole run
maxPagesPerOrder5Page cap per keyword per sort order
rowsPerPage20Videos requested per search call
maxCreatorPages40Page cap for the creator upload list, 50 videos per page
includeRepliesfalseFetch the replies under each root comment
commentsPerVideo9Root comments kept per video
danmakuLimit3000Danmaku rows kept per video
requestDelayMs400Gap between requests in milliseconds
requestTimeoutSecs25Per-request timeout in seconds
runBudgetSecsemptyWall-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.

TaskInputQuestion it answers
Bilibili Keyword Search Scrapermode: search, queries, searchOrders, maxPagesPerOrderwhat exists on a topic, merged over three sort orders so the long tail is not lost
Bilibili Creator Videosmode: creator, creatorMids, maxCreatorPagesthe upload list behind a channel id, page by page
Bilibili Video Commentsmode: comments, videoUrls, commentsPerVideo, includeRepliesroot 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

ModeWhat it requestsRows it leaves
searchSearch pages for every keyword and sort orderOne row per distinct video, with searchOrder and searchRank
videoThe view endpoint per video idOne row per video with the full statistic block and the part list
creatorCreator card plus the upload list, 50 per pageOne creator row plus one row per uploaded video
popularThe popular feed, pagedOne row per video on the feed
rankingThe ranking boardOne row per ranked video
commentsComment endpoints per videoOne row per root comment, plus replies when enabled
danmakuThe danmaku file per partOne 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 requestDelayMs must stay above a few hundred milliseconds.
  • Fields the source omits stay null. coinCount, shareCount and score are 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.

  • /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.