Bilibili Scraper – Videos, Comments, Danmaku & Users
Pricing
from $17.00 / 1,000 bilibili scraped items
Bilibili Scraper – Videos, Comments, Danmaku & Users
Scrape Bilibili videos, comments, danmaku (bullet chats), creator profiles & user archives. 6 modes: search, trending, video detail, comments, user videos, profile. Clean JSON, delta mode, PPE pricing. $17/1K items + $30/1K danmaku.
Pricing
from $17.00 / 1,000 bilibili scraped items
Rating
0.0
(0)
Developer
Scrape Pilot
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
a month ago
Last modified
Categories
Security
Limited permissionsShare
📺 Bilibili Scraper Pro — Videos, Comments, Danmaku, User Profiles
The most comprehensive Bilibili scraper on Apify. Extract videos, comments, danmaku (bullet comments), creator profiles, and deep metadata from China's #1 video platform. Search by keyword, fetch trending feeds, scrape entire creator libraries, or dig deep into a single video — all with one powerful actor.
Pricing: Pay only for what you use — $17 per 1,000 items (videos, comments, users) and $30 per 1,000 danmaku profiles. Actor start: $0.02 per run.
💡 What is the Bilibili Scraper Pro?
Bilibili (B站) is the largest video platform in China with over 300 million monthly active users. This actor is designed to extract structured, actionable data from every corner of the platform — including hard-to-reach data like danmaku bullet comments and creator archive libraries.
Unlike basic scrapers, this actor uses a real browser-like session that warms up cookies (buvid3, b_nut) to avoid Bilibili's anti-bot protections, plus optional Apify residential proxies for large-scale runs. The result is a reliable, production-grade Bilibili data pipeline.
Six powerful scraping modes in one actor:
- Search Mode — Search videos by keyword with sorting, duration, and category filters.
- Popular Mode — Scrape Bilibili's trending/popular video feed.
- Video Detail Mode — Extract complete metadata for specific videos (by URL or BVID).
- Video Comments Mode — Scrape comments for one or more videos, with optional replies.
- User Videos Mode — Fetch every video from a creator's archive (plus their profile).
- User Profile Mode — Get complete creator cards: fans, level, official status, etc.
🚀 Key Features
| Feature | Description |
|---|---|
| 6 Scrape Modes | Search, Popular, Video Detail, Video Comments, User Videos, User Profile. |
| Danmaku Reaction Profiles | Parse bullet comments to get sender counts, per-minute rate, peak minute, timeline sample. |
| Nested Comments | Fetch top-level comments and (optionally) their replies in one call. |
| Creator Cards | Get fans, level, official status, archive count, total likes, and more. |
| Delta Mode | Save processed BVIDs to KV store so subsequent runs only return new items. |
| Cookie Warming | Realistic Chrome 124 fingerprint + tracking cookie handshake to bypass 412. |
| HTML Deep Parsing | Extracts window.__INITIAL_STATE__ from video pages for complete metadata. |
| Residential Proxy Ready | Compatible with Apify residential proxies for high-volume production runs. |
| Pay-Per-Event Pricing | $17/1K items, $30/1K danmaku profiles, $0.02 actor start — transparent. |
| Clean JSON Output | Consistent schema across all modes; ready for analytics or ML pipelines. |
📥 Input Parameters
The actor accepts a JSON object with the following fields. Which fields are required depends on the mode.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
mode | string | Yes | "search" | search, popular, video_detail, video_comments, user_videos, or user_profile. |
searchQuery | string | Search mode | "人工智能教程" | Keyword for search mode. |
videoUrls | array | Video modes | ["https://www.bilibili.com/video/BV1bmTb6EEs8"] | Video URLs or BVIDs for detail/comment modes. |
userUrls | array | User modes | ["https://space.bilibili.com/546195"] | Creator space URLs or MIDs. |
maxResults | integer | No | 50 | Max videos to return (search/popular/user_videos). |
sortOrder | string | No | "totalrank" | Search sort: totalrank, click, pubdate, dm, stow. |
durationFilter | string | No | "any" | any, short (<10m), medium (10–30m), long (30–60m), huge (>60m). |
category | string | No | "all" | Numeric category ID or "all". |
includeComments | boolean | No | false | Also fetch comments for each video. |
maxComments | integer | No | 20 | Max comments per video. |
sortComments | string | No | "hot" | hot or time. |
includeReplies | boolean | Video-comments mode | false | Fetch nested replies too. |
includeDanmaku | boolean | No | false | Include danmaku reaction profile for each video. |
danmakuSampleSize | integer | No | 25 | Number of danmaku items in the timeline sample. |
deltaMode | boolean | No | false | Only return items not seen in previous runs. |
deltaStateKey | string | No | "default" | Separate delta state for different pipelines. |
proxyConfiguration | object | No | – | Apify proxy config (residential strongly recommended for large runs). |
Example Input — Search Mode
{"mode": "search","searchQuery": "人工智能教程","maxResults": 20,"sortOrder": "click","durationFilter": "medium","includeComments": true,"maxComments": 10,"includeDanmaku": true}
Example Input — Video Detail Mode
{"mode": "video_detail","videoUrls": ["https://www.bilibili.com/video/BV1bmTb6EEs8","BV1qZSLBYEpa"],"includeComments": true,"maxComments": 30,"includeDanmaku": true,"danmakuSampleSize": 50}
Example Input — User Videos Mode
{"mode": "user_videos","userUrls": ["https://space.bilibili.com/546195"],"maxResults": 50,"includeComments": false}
📤 Output Fields
The actor outputs multiple record types depending on mode:
1. type: "video" — Video Record
| Field | Type | Description |
|---|---|---|
bvid | string | Bilibili video ID (BV…). |
aid | integer | Numeric archive ID. |
title | string | Video title (HTML cleaned). |
description | string | Video description. |
url | string | Canonical video URL. |
thumbnailUrl | string | Thumbnail URL (https-normalized). |
duration | integer | Duration in seconds. |
durationFormatted | string | Duration as mm:ss or h:mm:ss. |
viewCount | integer | Total views. |
likeCount | integer | Total likes. |
coinCount | integer | Bilibili coins. |
favoriteCount | integer | Favorites. |
shareCount | integer | Shares. |
danmakuCount | integer | Total danmaku. |
replyCount | integer | Total comments. |
authorName | string | Uploader display name. |
authorMid | integer | Uploader numeric ID. |
publishDate | string | ISO 8601 publish date. |
publishTimestamp | integer | Unix epoch. |
category | string | Video category name. |
tags | array | Video tags. |
scrapedAt | string | ISO 8601 extraction time. |
2. type: "comment" — Comment Record
| Field | Type | Description |
|---|---|---|
commentId | integer | Bilibili reply ID. |
text | string | Comment text. |
likeCount | integer | Likes on the comment. |
replyCount | integer | Replies to this comment. |
createdAt | string | ISO 8601 time. |
createdTimestamp | integer | Unix epoch. |
authorName | string | Commenter name. |
authorMid | integer | Commenter numeric ID. |
authorAvatar | string | Avatar URL. |
authorLevel | integer | Bilibili user level (0–6). |
videoBvid | string | Source video BVID. |
scrapedAt | string | ISO 8601 extraction time. |
3. type: "danmaku_profile" — Danmaku Reaction Profile
| Field | Type | Description |
|---|---|---|
videoBvid | string | Video BVID. |
aid | integer | Video AID. |
countFetched | integer | Danmaku fetched from XML. |
totalVideoDanmaku | integer | Total danmaku count from video metadata. |
uniqueSenders | integer | Distinct sender hashes. |
perMinuteRate | float | Danmaku per minute. |
peakMinute | object | {minute, danmakuCount} at peak. |
timelineSample | array | Sampled danmaku across the timeline: {time, timeFormatted, text, senderHash, timestamp}. |
scrapedAt | string | ISO 8601 extraction time. |
4. type: "user" — Creator Profile
| Field | Type | Description |
|---|---|---|
mid | integer | Creator numeric ID. |
name | string | Display name. |
face | string | Avatar URL. |
sign | string | Bio. |
level | integer | Bilibili level (0–6). |
fans | integer | Follower count. |
friend | integer | Following count. |
attention | integer | Accounts this creator follows. |
isOfficial | boolean | Official verification. |
officialDesc | string | Official status description. |
archiveCount | integer | Total uploaded videos. |
likeCount | integer | Total likes received. |
profileUrl | string | Space URL. |
scrapedAt | string | ISO 8601 extraction time. |
Example Output — Search Mode
[{"type": "video","bvid": "BV1qZSLBYEpa","title": "【整整600集】清华大学196小时讲完的AI人工智能从入门到精通全套教程...","viewCount": 1107723,"likeCount": 24014,"danmakuCount": 8285,"replyCount": 14643,"authorName": "IT界扛霸子","url": "https://www.bilibili.com/video/BV1qZSLBYEpa","duration": 0,"durationFormatted": "0:00","publishDate": "2026-01-15T08:00:00+00:00","scrapedAt": "2026-10-09T12:00:00+00:00"}]
Example Output — Danmaku Profile
[{"type": "danmaku_profile","videoBvid": "BV1qZSLBYEpa","aid": 113456789,"countFetched": 3000,"totalVideoDanmaku": 8285,"uniqueSenders": 2104,"perMinuteRate": 42.5,"peakMinute": {"minute": 18, "danmakuCount": 312},"timelineSample": [{"time": 5.4, "timeFormatted": "0:05", "text": "666", "senderHash": "a1b2c3d4", "timestamp": 1768460400}],"scrapedAt": "2026-10-09T12:00:05+00:00"}]
💰 Pricing
| Event | Price | Unit |
|---|---|---|
item-scraped | $17.00 per 1,000 | Videos, comments, user profiles |
danmaku-profile | $30.00 per 1,000 | Danmaku reaction profile |
apify-actor-start | $0.02 per run | Startup fee |
Example costs:
- 100 videos with comments: 100 videos + 20 comments each (2,000 comments) = $17.00 (2,000 items @ $17/1K) + $0.02 = ~$17.02.
- 50 videos with danmaku profiles: 50 videos + 50 danmaku profiles = 50 × $0.017 + 50 × $0.030 = $0.85 + $1.50 = $2.35.
- 1 user + 500 videos (user_videos mode): 501 items = ~$8.54.
🛠 How to Use on Apify
- Create a task with this actor.
- Choose the mode in the input JSON.
- Provide the required URLs / keywords.
- (Optional) Enable residential proxies for large-scale runs.
- Run – the actor scrapes everything and pushes results to the Dataset.
- Export – download as JSON, CSV, or Excel.
Running via API
curl -X POST "https://api.apify.com/v2/acts/your-username~bilibili-scraper/runs" \-H "Content-Type: application/json" \-H "Authorization: Bearer YOUR_API_TOKEN" \-d '{"mode": "search","searchQuery": "AI教程","maxResults": 20}'
🎯 Use Cases
- Trending video tracking – Monitor what content is rising on Bilibili.
- Content research – Analyze creator libraries at scale.
- Danmaku sentiment analysis – Use bullet comment timelines to find viral moments.
- Comment analytics – Study viewer reactions across videos.
- Creator intelligence – Build a database of creator stats (fans, level, uploads).
- Delta monitoring – Track new uploads from your favorite creators on a schedule.
❓ Frequently Asked Questions
1. Do I need a Bilibili account?
No. All data is public. No login or cookie supplied by you.
2. What's the difference between danmaku and comments?
Danmaku are bullet comments overlaid on the video at specific timestamps. Comments are the traditional threaded replies below the video.
3. Why is duration 0 in some search results?
Bilibili's search API occasionally omits duration. Use video_detail mode on those BVIDs for exact duration.
4. How does delta mode work?
Each processed BVID is saved in the actor's key-value store. On subsequent runs with the same deltaStateKey, already-seen items are skipped. Perfect for scheduled daily monitoring.
5. Do I need a proxy?
Not for small runs. For 500+ items per run, use Apify residential proxies to avoid 412 rate-limits.
6. Why does my danmaku count differ from the video's danmakuCount?
Bilibili's XML feed only returns a subset (~3,000) of the total danmaku. countFetched reports the number fetched, while totalVideoDanmaku reports Bilibili's public count.
7. Can I scrape playlists or合集?
Not in this version. You can scrape all videos from a creator's archive with user_videos mode.
8. Does the actor work outside Apify?
Yes — it's a standalone Python script using apify SDK. You can run it locally with the Apify CLI.
9. What happens if I hit the spending limit?
The actor detects event_charge_limit_reached and exits gracefully, saving all data pushed so far.
10. Can I run search + comments + danmaku in one go?
Yes — combine mode: "search", includeComments: true, and includeDanmaku: true.
🔍 SEO Keywords
Bilibili scraper, B站 scraper, bilibili video scraper, bilibili comments, bilibili danmaku, bilibili bullet comments, bilibili user profile scraper, bilibili search API, bilibili trending videos, Apify bilibili actor, bilibili delta scraper, bilibili creator analytics
🔗 Related Actors
- YouTube Metadata Scraper — Full YouTube metadata + formats.
- TikTok Video Downloader — Download TikTok videos without watermark.
- Instagram Reels Downloader — Reels + captions + likes.
Start scraping Bilibili today — $17/1K items, $30/1K danmaku profiles, $0.02 actor start.