🇨🇳 Bilibili Comments Scraper · B站评论 API (WBI-signed) avatar

🇨🇳 Bilibili Comments Scraper · B站评论 API (WBI-signed)

Pricing

from $20.00 / 1,000 comments

Go to Apify Store
🇨🇳 Bilibili Comments Scraper · B站评论 API (WBI-signed)

🇨🇳 Bilibili Comments Scraper · B站评论 API (WBI-signed)

Scrape comments from any Bilibili video (哔哩哔哩) via the current WBI-signed reply API — the scheme that broke older B站 scrapers. Pass BVIDs/URLs; get author, user level, likes, reply count & ISO timestamp, with optional anonymization. China social-listening, sentiment & creator research. No login.

Pricing

from $20.00 / 1,000 comments

Rating

0.0

(0)

Developer

NexGenData

NexGenData

Maintained by Community

Actor stats

1

Bookmarked

33

Total users

2

Monthly active users

4 days ago

Last modified

Categories

Share

Scrape comments from any Bilibili video using the platform's current WBI-signed reply API — the signature scheme that broke most older B站 comment scrapers when Bilibili retired its legacy endpoint. Pass BVIDs or video URLs, set how many comments per video, and get clean records with author, user level, likes, reply count and ISO timestamps, with optional username anonymization for shareable datasets. It's purpose-built for China social-listening, video-engagement analysis and sentiment work on Gen-Z China's home platform.

No login, no cookies — the WBI flow works for publicly visible comments without authentication.

📊 Sample Output

Bilibili Comments Scraper sample output — Chinese video comments with author, user level, likes, reply count and timestamp in clean JSON for sentiment and social-listening

Why the WBI signature matters

Bilibili (哔哩哔哩) deprecated its legacy /x/v2/reply comment endpoint, and most older Bilibili comment scrapers stopped returning data overnight. This actor uses the current WBI-signed /x/v2/reply/wbi/main API — it computes the rotating signature Bilibili now requires, so comments keep flowing. That signing logic is the moat: it's the reason this works when DIY scrapers return nothing.

What you get per comment

Each dataset record is a flat JSON object:

  • Identitybvid, aid, rpid (comment id)
  • Contenttext (full UTF-8 Chinese / English / emoji)
  • Authorauthor (username), user_mid, user_level, user_sex
  • Engagementlikes, reply_count, is_top (pinned)
  • Timetimestamp (ISO 8601, UTC, +00:00 offset), raw ctime (unix seconds) and scraped_at

Note: datacenter IPs often return only the ~3 pinned comments. Full pagination needs a residential proxy (the schema defaults to RESIDENTIAL). If Bilibili reports more comments than it returned for a video, the run finishes with a PARTIAL: status message naming that video — it is never reported as complete. Set anonymize_users to replace usernames with a stable SHA-256 pseudonym (user_ + 12 hex chars) and blank user_mid for shareable research datasets; the same user always maps to the same pseudonym.

Input

InputTypeDescription
videosarrayBVIDs or full video URLs (e.g. BV1xx411c7mu or a bilibili.com/video/... URL). Required (or one of the aliases below) — an empty input fails immediately and charges no comments.
video_urlsarrayAlias for videos (merged if both given).
videostringA single BVID or URL when you only need one.
max_comments_per_videointegerCap per video (1–2000). The actor paginates the WBI API until the cap, no more comments, or the run's time budget.
anonymize_usersbooleanReplace usernames with a stable SHA-256 pseudonym and blank user_mid (privacy mode).
proxyConfigurationproxyApify proxy. RESIDENTIAL recommended (datacenter may return only pinned comments).

Sample input

{
"videos": ["BV1xx411c7mu", "https://www.bilibili.com/video/BV1xx411c7mu/"],
"max_comments_per_video": 100,
"anonymize_users": false,
"proxyConfiguration": {
"useApifyProxy": true,
"apifyProxyGroups": ["RESIDENTIAL"]
}
}

Sample output (JSON)

{
"bvid": "BV1xx411c7mu",
"aid": 106,
"rpid": 268543201234,
"text": "这个视频太棒了!",
"author": "用户名",
"user_mid": 123456789,
"user_level": 5,
"user_sex": "保密",
"likes": 1280,
"reply_count": 14,
"is_top": false,
"timestamp": "2026-06-20T11:42:00+00:00",
"ctime": 1781955720,
"scraped_at": "2026-09-03T19:55:12.345678+00:00"
}

With anonymize_users: true, author becomes e.g. user_15e2b0d3c338 and user_mid is null.

Run status and time budget

A run has a 300 s time limit. The actor stops fetching new pages 30 s before that limit so every comment already delivered is saved and reported. If any video was cut short — by the time budget, by a later-page block, or because Bilibili returned fewer comments than it reports — the run ends SUCCEEDED with a PARTIAL: status message naming each affected video, how many comments it got and why (e.g. truncated at 340 by time budget). Requesting the maximum for several videos in one run will hit the time budget; split large jobs across runs. A run with no valid videos, or where every video is blocked, ends FAILED with the reason and charges no comments.

Use cases

  • Brand & marketing — read audience reaction to your or a competitor's Bilibili videos and campaigns.
  • Consumer research — Gen-Z China sentiment and opinion mining from comment threads.
  • Social listening — track comment volume and sentiment across a creator's uploads.
  • AI / NLP training — build a labeled Chinese-comment corpus, with optional anonymization.

Pricing — pay per comment

  • Actor start: $0.005 per run
  • Per comment: $0.02 per comment delivered to the dataset

A 100-comment pull on one video = $2.005. You pay only for comments that land in your dataset; a failed run or an empty input charges only the actor start. A run that stops at its time budget charges only the comments it delivered and says so in its PARTIAL: status message.

Quick start (Python)

from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("nexgendata/bilibili-video-comments").call(run_input={
"videos": ["BV1xx411c7mu"],
"max_comments_per_video": 100,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item["author"], item["text"])

❓ FAQ

Does it need login or cookies? No — the WBI flow works for publicly visible comments without auth.

Why do other Bilibili comment scrapers return nothing now? Bilibili deprecated the legacy /x/v2/reply; this actor uses the current WBI-signed /x/v2/reply/wbi/main.

How many comments per video? Up to 2,000 via pagination, within the run's 300 s time budget (roughly 2,500 comments per run in total). A residential proxy is recommended — datacenter IPs may return only pinned comments, and the run then reports PARTIAL rather than pretending it was complete.

Can I anonymize usernames? Yes — anonymize_users replaces usernames with a stable SHA-256 pseudonym (user_ + 12 hex chars) and blanks user_mid; the same user always gets the same pseudonym across runs.

Can I pass a URL instead of a BVID? Yes — full video URLs and bare BVIDs both work.


Get $5 in Apify credit: https://apify.com/nexgendata