How to scrape Bilibili videos, comments, and creators from a BV id
Last updated
Maintained by Datapika · We publish this product under the openclawai account on Apify. Product reference
To scrape Bilibili, paste a video URL (bilibili.com/video/BV...), a creator space URL, or a live room URL into Datapika's actor on Apify, pick a mode such as video_detail or video_comments, and start the run. Each Bilibili video row costs $0.0025, so 1,000 Bilibili videos cost $2.50, and URLs that fail come back as unbilled error rows. Ten of the actor's 26 modes work on Bilibili, including keyword search, danmaku and subtitles, up to 5,000 items per URL, with play, like, reply, share, and favorite counts on every video_detail record and no login or API key required.
Scheduled price change for the TikTok & Douyin Scraper. From December 1, 2026, 18:30 UTC: $2.00 per 1,000 TikTok videos and $5.00 per 1,000 Douyin, Bilibili, Kuaishou or Xigua videos; comments $1.00, accounts and list entries $2.00 and single lookups $3.00 per 1,000; subtitles, HD links and fake-view reports keep their prices.
Which Bilibili URLs and ids does the scraper accept?
Bilibili identifies videos by BV ids, the 12-character strings that start with BV in every video URL, and the actor extracts them from any bilibili.com/video/ link. Short links of the form b23.tv/xxx are resolved to their canonical BV URL before scraping, so links copied from the Bilibili app work as pasted. Creators are addressed by their numeric uid through space.bilibili.com URLs, and live rooms by the numeric room id in live.bilibili.com URLs.
For links, leave the platform field on auto: it recognises bilibili.com and b23.tv hosts. Set platform to bilibili for keyword searches, the popular feed (trending), the hot-search list and bare BV ids, because auto reads TikTok when no link names the platform.
An invalid or deleted BV id produces a free error row rather than a failed run.
- Video: https://www.bilibili.com/video/BV1GJ411x7h7 (BV id extracted automatically)
- Short link: https://b23.tv/xxxx, resolved to the canonical BV URL first
- Creator: https://space.bilibili.com/{uid}, used by user_posts and user_profile
- Live room: https://live.bilibili.com/{room_id}, used by live_info
- Popular feed: no URL at all, just mode trending with platform bilibili
- Bulk: a urls array, one link per line, processed one after another
What fields come back for a Bilibili video?
A video_detail run returns one flat JSON row per BV id in the same unified schema used for TikTok and Douyin, so downstream code does not branch on platform. Bilibili's stat object is mapped onto the shared engagement fields: view becomes play_count, like becomes like_count, reply becomes comment_count, share becomes share_count, and favorite becomes collect_count.
Descriptive fields cover title, description, publish timestamp as ISO created_at, duration_sec, cover_url, and the creator's numeric mid plus display name. Hashtags are extracted from the description text. Two shared fields are always null on Bilibili, music_title and music_author, because the Bilibili video response carries no background audio object for the actor to map.
The raw field carries the complete platform response, so anything Bilibili returns beyond the unified fields, such as multi-part page lists, stays available for your own parsing. Recorded Bilibili runs in October 2026 returned no video file URL (video_url_nowm stayed empty), so fetch files by BV id with your own client.
- item_id is the BV id; url is the canonical bilibili.com/video/BV... link
- play_count, like_count, comment_count, share_count, collect_count from Bilibili's stat object
- title, description, created_at, duration_sec, cover_url, hashtags
- author_id (numeric mid), author_name, author_username
- danmaku and subtitles modes add on-screen comments with their timestamps and full subtitle text (subtitles on paid plans)
- raw: the untouched platform response for fields the unified schema does not cover
How do you scrape Bilibili comments and creator data?
Set mode to video_comments and pass a video URL to pull the reply thread. Each comment row carries comment_id (Bilibili's rpid), reply_to_id (the parent rpid, null for top-level comments), comment_text, the commenter's mid and username, a like_count, and an ISO created_at. Pagination continues until maxItems is reached, and includeReplies adds the replies under each comment that has 3 or more replies, on paid Apify plans.
For creators, user_posts walks a space URL page by page and returns one row per upload with title, cover, publish date, duration and play count. user_profile returns the creator's mid, display name, bio, avatar, and a verified flag derived from Bilibili's official account type.
Bilibili's list endpoints return thinner records than the single-video endpoint. If you need like, share, and favorite counts for a creator's whole catalogue, collect the BV ids from user_posts, then run video_detail over them in a second bulk run.
- video_comments: rpid, parent rpid, text, commenter mid, like count, timestamp
- user_posts: title, cover_url, created_at, duration_sec, play_count per upload
- user_profile: mid, name, bio, avatar_url, verified (official account type)
- live_info: room id, live_status, live_title, viewer_count, host name, cover
- Comment and profile rows are billed as their own pay-per-event items, listed on the store page
- user_likes is not available on Bilibili and returns a clear error row
What can you do with Bilibili data for creator analytics and China market research?
Bilibili reported 371 million monthly active users and 116.5 million average daily active users for the quarter ended June 30, 2026, in results released on August 27, 2026. It is the primary home of anime, gaming, and educational long-form video in China. Datapika gives you the numbers behind those audiences without a Chinese phone number or a Bilibili account.
Analytics teams benchmark anime and gaming channels by running user_posts on a set of space URLs on a schedule, then tracking play_count and comment_count over time. Education creators and course sellers use video_comments to read how learners react to a series. Brands entering China pull the popular feed daily to see which formats and topics are gaining traction before committing to a campaign.
For topic monitoring, search_videos takes Chinese keywords in queries and hot_search returns Bilibili's trending search terms, so a schedule can watch both the popular feed and what people search for.
- Creator benchmarking: schedule user_posts across competing anime, gaming, or education channels
- Audience research: video_comments on flagship uploads, then sentiment analysis on comment_text
- Trend spotting: trending mode pulls Bilibili's popular feed as full video records
- Live commerce and event monitoring: live_info for viewer_count and live_status on a room
- Cross-platform comparison: the same schema lets you line Bilibili up against TikTok and Douyin rows
How much does scraping Bilibili cost and how does it run at scale?
Bilibili video rows cost $0.0025 each, which works out to $2.50 per 1,000 videos from video_detail, user_posts, or trending. Comments cost $0.0005 each, and a profile or live room lookup costs $0.0015. Error rows for deleted videos, bad BV ids, or anti-bot blocks do not necessarily incur a result event; other applicable charges must still be checked, and you can cap a run with Max cost per run so a large batch stops at your budget. The actor had recorded 1,340 runs on the store as of August 2026.
maxItems defaults to 100 and accepts values from 1 to 5,000 per link or keyword. Links run one after another, and list modes return about 20 rows per request.
You can run the actor from the Apify console, call it over the Apify REST API, or expose it to an AI agent through the Apify MCP server. There is no proxy to set up.
- $0.0025 per video, so 1,000 Bilibili videos cost $2.50
- Failed URLs return error rows and are not charged
- maxItems from 1 to 5,000 per URL, default 100
- About 20 rows per request; links run one after another
- Console, REST API, and MCP access; export as JSON, CSV, or Excel from the dataset
| Input | Mode | Example | Key fields returned | Notes |
|---|---|---|---|---|
| Video URL | video_detail | bilibili.com/video/BV1GJ411x7h7 | title, description, play/like/comment/share/favorite counts, duration, cover, author mid, hashtags | Full stat set |
| Short link | video_detail or video_comments | b23.tv/xxxx | Same as the resolved BV video | Resolved to the canonical BV URL automatically |
| Video URL | video_comments | bilibili.com/video/BV... with maxItems 200 | comment_id (rpid), reply_to_id, comment_text, commenter mid, like_count, created_at | Paginated to maxItems; billed per comment as its own event |
| Creator space URL | user_posts | space.bilibili.com/{uid} | title, cover_url, created_at, duration_sec, play_count per upload | Thinner list records; like, comment, share and favorite counts null |
| Creator space URL | user_profile | space.bilibili.com/{uid} | mid, author_name, bio, avatar_url, verified | Follower and upload counts not populated |
| Live room URL | live_info | live.bilibili.com/21452505 | live_status, live_title, viewer_count, host name, cover | One row per room per run |
| No URL | trending | platform: bilibili | Full video records from the popular feed | Set platform to bilibili; auto reads TikTok |
| Creator space URL | user_likes | space.bilibili.com/{uid} | None | Not supported on Bilibili; returns an error row |
Sources you can inspect
Product documentation and implementation references. These references describe supported options and billing, not independent proof of performance. Confirm current details before running; examples and estimates are not guarantees.
How to do it
- 1.Open the actor at https://apify.com/openclawai/tiktok-douyin-bilibili-scraper (or add it to your agent via https://mcp.apify.com/?tools=fetch-actor-details,openclawai/tiktok-douyin-bilibili-scraper).
- 2.Choose a mode: video_detail or video_comments for a bilibili.com/video/BV... link, user_posts or user_profile for a space.bilibili.com/{uid} link, live_info for a live.bilibili.com room, trending with platform set to bilibili and no URL, or search_videos with platform set to bilibili and keywords in queries.
- 3.Paste links into urls, set maxItems (1 to 5,000), leave platform on auto for links, and start the run.
- 4.Read the dataset in the console or over the API; each row has platform bilibili, an item_type, the BV id or mid as item_id, and the unified stat fields, at $0.0025 per delivered video row.
Ready-made tasks
Tested inputs you can run as they are, with real sample rows.
Questions, answered
Does Bilibili have an official public API for third-party developers?
The endpoints that third-party tools rely on are the same web endpoints the Bilibili site and app call, documented by the community rather than through a developer program, and they change without notice as Bilibili rotates its anti-bot defenses. Datapika keeps up with those changes and turns any breakage into a free error row instead of a failed run, so you do not have to maintain the integration yourself.
Can I download Bilibili videos through the scraper?
Not reliably. downloadVideos adds a file URL only when the platform provides one, and recorded Bilibili runs in October 2026 returned none, so plan to fetch videos by BV id with your own download client. Metadata, stats, the cover and the BV id are always returned.
Why are follower counts empty on Bilibili profile rows?
Bilibili serves follower, following, and upload counts from a separate statistics endpoint that the user_profile mode does not call at the moment, so follower_count, following_count, and video_count are null for Bilibili while name, bio, avatar_url, verified, and the numeric mid are populated. The raw field holds the full profile response. If you need a creator's upload volume, run user_posts on the same space URL and count the rows.
Does user_posts return full engagement stats for every upload?
No. Bilibili's creator upload list returns thinner records than the single-video endpoint, so user_posts rows carry title, cover, publish date, duration_sec and play_count, while like_count, comment_count, share_count and collect_count are null (recorded runs, October 2026). To get the full stat set for a whole channel, take the BV ids from the user_posts run and pass them as a urls array to video_detail. Both runs bill each video row at $0.0025.
Do I need a Bilibili account, cookie, or Chinese proxy to scrape?
No. Public videos, comments, danmaku, subtitles, profiles, live rooms, keyword search and the popular feed need no account, cookie or proxy setup. Only public data is scraped, and you remain responsible for complying with Bilibili's terms and the privacy rules that apply to you.
Can I scrape Bilibili liked videos or search by keyword?
Keyword search, yes; liked videos, no. search_videos takes Chinese keywords in queries with platform set to bilibili and returns full video rows at $0.0025 each. The user_likes mode is TikTok and Douyin only and returns a free error row for Bilibili. For discovery without a keyword, trending pulls Bilibili's popular feed and hot_search its trending search terms.