How to scrape Bilibili videos, comments, and creators from a BV id

Last updated

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 video row costs $0.001 as of August 2026 on the Apify Store, so 1,000 Bilibili videos cost $1.00, and URLs that fail come back as unbilled error rows. Six of the actor's seven modes work on Bilibili, 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.

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.

You never have to set the platform field by hand. The default auto setting recognises bilibili.com and b23.tv hosts and routes the URL to the Bilibili pipeline, and trending mode with platform left on auto defaults to Bilibili's popular feed.

An invalid or deleted BV id produces a 404 error row rather than a failed run, and error rows are not billed.

  • 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 processed concurrently, with 500 links per run the recommended ceiling

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. The video_url_nowm field is filled by a separate play URL request when downloadVideos is on, and Bilibili rotates those tokens, so download promptly or fetch through 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
  • video_url_nowm when a play URL is issued; tokens rotate, so some downloads fail
  • 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; the README example pulls the top 200 comments on one video with maxItems set to 200.

For creators, user_posts walks a space URL page by page and returns one row per upload with title, description, cover, publish date, play count, and comment 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, description, cover_url, created_at, play_count, comment_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.

Bilibili is also the better choice among the actor's platforms for time-sensitive monitoring, because Douyin's public creator feed can lag by around 6 days for some accounts while Bilibili's endpoints return current data.

  • 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?

Video rows cost $0.001 each as of August 2026 on the Apify Store, which works out to $1.00 per 1,000 videos from video_detail, user_posts, live_info, or trending. Comments and profiles are separate pay-per-event items with their own rates on the store's pricing tab. Error rows for deleted videos, bad BV ids, or anti-bot blocks are never billed, and you can cap a run with the ACTOR_MAX_TOTAL_CHARGE_USD setting 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 input URL. Bilibili requests run through an HTTP client pool rather than a browser, so they are fully concurrent, and a batch of 100 URLs typically finishes in 2 to 3 minutes. Keep runs at 500 URLs or fewer and split bigger jobs for parallelism.

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. Residential proxy is on by default.

  • $0.001 per video, so 1,000 Bilibili videos cost $1.00 (Apify Store, August 2026)
  • Failed URLs return error rows and are not charged
  • maxItems from 1 to 5,000 per URL, default 100
  • About 100 URLs in 2 to 3 minutes; recommended maximum 500 URLs per run
  • Console, REST API, and MCP access; export as JSON, CSV, or Excel from the dataset
Bilibili input types, the mode to use, and the fields each returns
InputModeExampleKey fields returnedNotes
Video URLvideo_detailbilibili.com/video/BV1GJ411x7h7title, description, play/like/comment/share/favorite counts, duration, cover, author mid, hashtags, video_url_nowmFull stat set; play URL tokens rotate
Short linkvideo_detail or video_commentsb23.tv/xxxxSame as the resolved BV videoResolved to the canonical BV URL automatically
Video URLvideo_commentsbilibili.com/video/BV... with maxItems 200comment_id (rpid), reply_to_id, comment_text, commenter mid, like_count, created_atPaginated to maxItems; billed per comment as its own event
Creator space URLuser_postsspace.bilibili.com/{uid}title, description, cover_url, created_at, play_count, comment_count per uploadThinner list records; like/share/favorite null
Creator space URLuser_profilespace.bilibili.com/{uid}mid, author_name, bio, avatar_url, verifiedFollower and upload counts not populated
Live room URLlive_infolive.bilibili.com/21452505live_status, live_title, viewer_count, host name, coverOne row per room per run
No URLtrendingplatform: bilibiliFull video records from the popular feedAuto platform defaults to Bilibili in trending mode
Creator space URLuser_likesspace.bilibili.com/{uid}NoneNot supported on Bilibili; returns an error row

How to do it

  1. 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. 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, or trending with platform set to bilibili and no URL.
  3. 3.Paste one url or a urls array, set maxItems (1 to 5,000), leave platform on auto, and start the run.
  4. 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.001 per delivered video row.
Run the TikTok & Douyin Scraper

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 wraps those endpoints, keeps up with changes, and turns any breakage into a structured 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?

Partly. When downloadVideos is on, the actor makes a separate play URL request for each BV id and fills video_url_nowm with the resulting stream link, preferring the highest-bandwidth DASH stream. Bilibili rotates the tokens on those links, so some downloads fail and the URLs expire quickly. Metadata and the rest of the row are always returned regardless. For reliable archiving, fetch the stream soon after the run or use the BV id with your own download client.

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, description, cover, publish date, play_count, and comment_count, while like_count, share_count, collect_count, and duration_sec are null. 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.001.

Do I need a Bilibili account, cookie, or Chinese proxy to scrape?

No account is needed for public videos, comments, profiles, live rooms, or the popular feed, and the actor runs through Apify residential proxy by default with no extra setup. The optional cookie field exists for gated content and is not required for the Bilibili modes described here. 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?

Not in this actor. The user_likes mode is TikTok and Douyin only and returns an error row for Bilibili, and there is no keyword search mode for any platform. For discovery, use trending mode to pull Bilibili's popular feed, which returns full video records including creator mids you can then follow up with user_posts. If keyword search matters for your project, tell us through the actor's issues tab so we can prioritise it.

Keep reading