Bilibili Scraper — Video, Comments, Danmaku & UP主 (B站)
Pricing
from $7.00 / 1,000 results
Bilibili Scraper — Video, Comments, Danmaku & UP主 (B站)
Scrape Bilibili (B站/哔哩哔哩) without an API key or login. Export videos, engagement stats (views, likes, coins, favorites, danmaku 弹幕), comments and creator/UP主 profiles by keyword, URL or trending feed. A fast Bilibili API alternative for market research, KOL lead-gen and AI datasets. JSON/CSV/Excel.
Pricing
from $7.00 / 1,000 results
Rating
0.0
(0)
Developer
Haketa
Maintained by CommunityActor stats
0
Bookmarked
7
Total users
1
Monthly active users
a day ago
Last modified
Categories
Features
Share
Bilibili Scraper 🎬 — Videos, Comments, Danmaku & Creators (B站 / 哔哩哔哩)
Scrape Bilibili (B站 / 哔哩哔哩) video metadata, engagement metrics, comments, danmaku (弹幕) bullet comments, and creator / UP主 profiles at scale — by keyword, video URL, creator ID, or trending feed. No API key. No login. No cookies.
This Bilibili scraper turns public data on Bilibili (哔哩哔哩, widely known as B站 or bili bili) — China's premier video community, home of danmaku (弹幕) bullet comments and a massive UP主 creator ecosystem — into clean, structured JSON, CSV, and Excel datasets. Use it as a fast, drop-in Bilibili API alternative: enter keywords in English or Chinese, paste video URLs or creator IDs, or enable the trending feed, press Start, and stream structured records in seconds.
🎯 Built for KOL / influencer marketing agencies, China market researchers, social-listening & brand-intelligence teams, AI / NLP dataset engineers, MCNs, and media analysts.
⚡ At a Glance
| Feature | Details |
|---|---|
| Target Platform | Bilibili.com (哔哩哔哩 / B站) |
| Extraction Modes | Keyword Search (EN + 中文), Trending / Popular Feed, Direct Video URLs (BV / av), Creator Profiles (UP主) |
| Video Metrics Captured | Views (播放), Danmaku Count (弹幕), Likes (点赞), Favorites (收藏), Comments (评论), Coins (投币), Shares (分享) |
| Per-Video Enrichment | Top Comments sorted by likes (topComments[]) + On-screen Danmaku bullet comments with timestamps (danmaku[]) |
| Creator / KOL Lead Gen | Followers, Following, Video Count, Total Likes, Level, Official Verification, Bio, and auto-extracted Business Email |
| Pagination & Scale | Auto-scaling pagination (searchPages: 0 = auto) — 1,000+ unique videos per run (~42 videos/page, up to 50 pages/keyword) |
| Deduplication | Automatic cross-keyword & cross-mode deduplication by bvid |
| Engine & Cost | High-speed pure HTTP with parallel enrichment (maxConcurrency) and default Apify Proxy |
📑 Table of Contents
- Why Scrape Bilibili?
- What This Bilibili Scraper Does
- Use Cases
- Input Configuration
- Output Schema & Field Reference
- Pagination & 1,000+ Scale
- How to Use
- API Usage Examples
- Tips for Best Results
- FAQ
- Related Scrapers
- Changelog
🔎 Why Scrape Bilibili?
Bilibili data is one of the richest consumer, gaming, tech, anime, and youth-culture signals on the Chinese internet. With over 300 million monthly active users, B站 is where Chinese audiences review hardware, discuss AI and programming, launch gaming trends, evaluate consumer brands, and react in real time via danmaku (弹幕) — synchronized bullet comments that fly across the video timeline.
Collecting Bilibili data manually or maintaining custom scripts is challenging:
- No open bulk export API: Bilibili does not provide a public developer API for bulk video search, danmaku extraction, or UP主 lead generation.
- Fragmented engagement metrics: Views, danmaku counts, likes, favorites, comments, coins, and creator contact details live across separate feeds and formats (JSON + compressed XML for danmaku).
- HTML entities & encoding quirks: Raw search responses embed HTML markup and encoded entities (
",&,') inside titles and descriptions, while danmaku streams use deflated XML attribute tuples.
This Bilibili data extractor handles every step automatically: it paginates across keywords and trending feeds, decodes all text cleanly, resolves video stream IDs (cid) when danmaku are requested, extracts business emails from UP主 bios, and outputs ready-to-analyze records.
✨ What This Bilibili Scraper Does
- ✅ Four flexible discovery modes in one actor — combine 🔎 Keyword Search (English or 中文), 🔥 Trending / Popular Feed, 🎬 Direct Video URLs / BV IDs, and 👤 Creator / UP主 Profiles in a single run.
- ✅ Unlocked 1,000+ video pagination — set
searchPages: 0(the default) and the scraper automatically calculates and walks as many result pages as needed (~42 videos per page, up to 50 pages per keyword) to hit yourmaxVideostarget (1,000+videos supported). - ✅ Complete video engagement metrics — captures
views(播放),danmakuCount(弹幕),likes(点赞),favorites(收藏), andcomments(评论) on every search and trending video, pluscoins(投币) andshares(分享) on the trending feed. - ✅ Rich video metadata —
bvid,aid,cid, canonicalurl, decodedtitleanddescription, HTTPScoverimage,category(分区),durationSeconds, ISO-8601publishedAt,tags, and creator attribution (author,authorMid,authorUrl,authorAvatar). - ✅ UP主 / Creator KOL lead generation — extracts
followers,following,videoCount,totalLikes,level,officialverification title,bio, and automatically parses any business email (businessEmail) listed in the creator's bio. - ✅ Optional Top Comments (
includeComments) — attaches top-liked audience comments with author name,authorMid,likes,replyCount, and ISO timestamp. - ✅ Optional Danmaku Bullet Comments (
includeDanmaku) — downloads and parses Bilibili's signature on-screen bullet comments withtext, exact video timestamp (videoTimeSec), andsentAtdate. - ✅ Zero-config fallback — running with empty input
{}automatically returns a fresh sample of trending and popular Bilibili videos, scaling across fallback topics if you request a largemaxVideos.
🎯 Use Cases
| Persona / Team | How They Use This Bilibili Scraper |
|---|---|
| KOL & Influencer Marketing Agencies | Discover rising UP主 in gaming, tech, beauty, or food; rank by followers and totalLikes, and reach out directly via businessEmail. |
| Global Brands & Social Listening | Track brand mentions, product launches, and competitor reviews on B站; analyze danmaku at exact video timestamps (videoTimeSec) to see which product features spark excitement. |
| AI, NLP & LLM Data Engineers | Build high-volume, authentic Chinese conversational and time-aligned video reaction corpora from topComments[] and danmaku[]. |
| Gaming & Entertainment Publishers | Monitor trailer reactions, gameplay guides, and community sentiment for titles like Genshin Impact (原神), Black Myth: Wukong (黑神话:悟空), and indie releases. |
| Content Strategists & MCNs | Benchmark video performance across categories (分区), optimal video durations (durationSeconds), tag combinations, and upload times (publishedAt). |
| Market & Academic Researchers | Study digital youth culture, danmaku linguistics, and Chinese creator-economy dynamics with clean CSV/JSON exports. |
📥 Input Configuration
All fields are optional. Fill in any combination of modes — or press Start with the default prefill for a fast 40-video run.
| Field | Key | Type | Default | Description |
|---|---|---|---|---|
| 🔎 Search keywords | searchKeywords | array<string> | ["python tutorial"] | Keywords in English or Chinese (e.g., "python", "美食", "原神", "机器学习"). |
| 🎬 Video URLs or IDs | videoUrls | array<string> | [] | Direct Bilibili video URLs (https://www.bilibili.com/video/BV1...) or bare BV IDs. |
| 👤 Creators (UP主) | userIds | array<string> | [] | Creator space URLs (https://space.bilibili.com/431073645) or numeric mid IDs. |
| 🔥 Include trending videos | scrapePopular | boolean | false | Pull Bilibili's current popular / trending video feed (includes coins and shares). |
| Trending count | popularCount | integer | 30 | Number of trending videos to fetch when scrapePopular is enabled (1–5000). |
| 💬 Include comments | includeComments | boolean | false | Attach top comments (sorted by likes) to each scraped video. |
| Max comments per video | maxCommentsPerVideo | integer | 20 | Maximum comments to collect per video (1–1000). |
| 🌊 Include danmaku | includeDanmaku | boolean | false | Attach on-screen bullet comments (danmaku[]) with video timestamp and text. |
| Max danmaku per video | maxDanmakuPerVideo | integer | 200 | Maximum danmaku bullet comments per video (1–6000). |
| Search pages per keyword | searchPages | integer | 0 (Auto) | Pages to fetch per keyword (~42 videos/page). 0 = automatic scaling governed by maxVideos. |
| Sort search results by | searchOrder | string | "totalrank" | totalrank (Best match), click (Most viewed), pubdate (Newest), dm (Most danmaku), stow (Most favorited). |
| Max videos | maxVideos | integer | 100 (prefill 40) | Total video cap across all keywords and feeds. Set 0 for unlimited (1,000+ supported). |
| Max concurrent requests | maxConcurrency | integer | 8 | Parallel workers for comment/danmaku enrichment (1–20). |
| Proxy configuration | proxyConfiguration | object | { "useApifyProxy": true } | Apify Proxy configuration. Default proxy works out of the box across all modes. |
Example 1 — Bulk Keyword Search (1,000+ Videos Across Topics)
{"searchKeywords": ["人工智能", "机器学习", "深度学习", "大模型"],"searchPages": 0,"searchOrder": "totalrank","maxVideos": 1200,"includeComments": false,"includeDanmaku": false}
Example 2 — Video Search + Top Comments & Danmaku Bullet Comments
{"searchKeywords": ["原神", "黑神话悟空"],"searchOrder": "click","includeComments": true,"maxCommentsPerVideo": 30,"includeDanmaku": true,"maxDanmakuPerVideo": 300,"maxVideos": 100}
Example 3 — UP主 / Creator KOL Lead Generation List
{"userIds": ["https://space.bilibili.com/431073645","https://space.bilibili.com/2267573","946974"]}
Example 4 — Bilibili Trending Feed Sweep (with Coins & Shares)
{"searchKeywords": [],"scrapePopular": true,"popularCount": 200,"maxVideos": 200}
📤 Output Schema & Field Reference
Each dataset item is a clean, flat JSON object representing either a video (recordType: "video") or a creator profile (recordType: "creator").
Sample Video Record (recordType: "video")
{"recordType": "video","bvid": "BV1rpWjevEip","aid": 113006243481679,"cid": 258910421,"url": "https://www.bilibili.com/video/BV1rpWjevEip","title": "【全748集】目前B站最全最细的Python零基础全套教程,2026最新版","description": "本套教程从零开始讲解,手把手教学,包含基础语法、进阶语法、爬虫、自动化办公、数据分析…","cover": "https://i2.hdslb.com/bfs/archive/a979056b1a32012cdd00d48fbc3732d253e30620.jpg","category": "计算机技术","durationSeconds": 143894,"publishedAt": "2024-08-22T14:59:18.000Z","views": 21406006,"danmakuCount": 135253,"likes": 590100,"coins": null,"favorites": 907462,"shares": null,"comments": 367891,"author": "Python官方课程","authorMid": 3546597933714079,"authorUrl": "https://space.bilibili.com/3546597933714079","authorAvatar": "https://i1.hdslb.com/bfs/face/6822e4fdc8f82c69e10accd1ab11a109702bccbf.jpg","tags": "程序员,Python教程,Python入门零基础,计算机,编程语言,数据分析","sourceType": "search","sourceQuery": "python tutorial","scrapedAt": "2026-11-10T05:00:00.000Z"}
Sample Creator / UP主 Record (recordType: "creator")
{"recordType": "creator","mid": "431073645","name": "你的影月月","spaceUrl": "https://space.bilibili.com/431073645","followers": 10138744,"following": 312,"videoCount": 2190,"totalLikes": 88450231,"bio": "攻略在合集观看!商务合作邮箱 jyybiz@qq.com","businessEmail": "jyybiz@qq.com","level": 6,"official": "2025百大UP主、知名游戏UP主","officialType": "personal","avatar": "https://i2.hdslb.com/bfs/face/example.jpg","scrapedAt": "2026-11-10T05:00:00.000Z"}
Emoji-Grouped Field Reference & Coverage
🎬 Video Identity & Content
| Field | Type | Coverage | Description |
|---|---|---|---|
recordType | string | 🟢 High (100%) | Always "video" for video records. |
bvid | string | 🟢 High (100%) | Unique Bilibili alphanumeric BV identifier (e.g., BV1rpWjevEip). |
aid | integer|null | 🟢 High (99%+) | Numeric archive ID (av number) used for comments. |
cid | integer|null | 🟡 Conditional | Stream player ID — populated on trending videos and whenever includeDanmaku: true. |
url | string | 🟢 High (100%) | Canonical video URL (https://www.bilibili.com/video/BV...). |
title | string | 🟢 High (100%) | Video title with HTML tags stripped and HTML entities decoded. |
description | string|null | 🟢 High (~77–95%) | Uploader's video description (present when provided by creator). |
cover | string | 🟢 High (100%) | Full HTTPS URL to the video cover thumbnail. |
category | string|null | 🟢 High (100%) | Bilibili category / partition name (分区, e.g., 计算机技术, 单机游戏, 美食). |
durationSeconds | integer | 🟢 High (100%) | Total video duration converted to seconds. |
publishedAt | string|null | 🟢 High (100%) | Upload timestamp in ISO-8601 UTC format. |
tags | string|null | 🟢 High (98%+ search) | Comma-separated video tags on search results. |
sourceType | string | 🟢 High (100%) | Discovery source: "search", "popular", or "video". |
sourceQuery | string | 🟢 High (100%) | Originating search keyword, "popular", or bvid. |
📊 Engagement Metrics & Creator Attribution
| Field | Type | Coverage | Description |
|---|---|---|---|
views | integer|null | 🟢 High (100%) | Total video play count (播放). |
danmakuCount | integer|null | 🟢 High (100%) | Total bullet comments (弹幕) on the video. |
likes | integer|null | 🟢 High (100%) | Total likes (点赞). |
favorites | integer|null | 🟢 High (100%) | Total favorites / bookmarks (收藏). |
comments | integer|null | 🟢 High (100%) | Total comment replies (评论). |
coins | integer|null | 🟡 Conditional | Coins given (投币) — populated 100% on scrapePopular trending feed; null on keyword search. |
shares | integer|null | 🟡 Conditional | Total shares (分享) — populated 100% on scrapePopular trending feed; null on keyword search. |
author | string|null | 🟢 High (100%) | Creator / UP主 display name. |
authorMid | integer|null | 🟢 High (100%) | Creator numeric member ID (mid). |
authorUrl | string|null | 🟢 High (100%) | Link to the creator's Bilibili Space (https://space.bilibili.com/{mid}). |
authorAvatar | string|null | 🟢 High (100%) | Full HTTPS URL to the creator's avatar image. |
💬 Enrichment Arrays (topComments[] & danmaku[])
| Field | Parent Array | Type | Description |
|---|---|---|---|
text | topComments[] / danmaku[] | string | Decoded comment or bullet-comment text. |
author / authorMid | topComments[] | string | Commenter username and numeric member ID. |
likes / replyCount | topComments[] | integer | Likes and nested replies on the comment. |
time | topComments[] | string | ISO-8601 timestamp when the comment was posted. |
videoTimeSec | danmaku[] | number | Exact playback position (in seconds) where the bullet comment appears on screen. |
sentAt | danmaku[] | string | ISO-8601 timestamp when the viewer sent the danmaku. |
👤 Creator / UP主 Profile Fields (recordType: "creator")
| Field | Type | Coverage | Description |
|---|---|---|---|
mid / name / spaceUrl | string | 🟢 High (100%) | Creator ID, display name, and profile URL. |
followers / following | integer | 🟢 High (100%) | Total fans (粉丝) and accounts followed. |
videoCount / totalLikes | integer | 🟢 High (100%) | Total published videos and lifetime likes. |
bio | string|null | 🟢 High (90%+) | Creator's Space signature (签名). |
businessEmail | string|null | 🟡 Conditional | Business email parsed from bio when listed by the UP主 (ideal for KOL outreach). |
level / official / officialType | mixed | 🟢 High | Account level (0–6) and official Bilibili verification badge (百大UP主, etc.). |
🔁 Pagination & 1,000+ Scale
This Bilibili scraper is built to scale smoothly from a 40-video quick check to 1,000–10,000+ unique videos in a single run:
- Auto-Scaling Keyword Pagination (
searchPages: 0): Each keyword search page returns ~42 videos and supports up to 50 pages (~2,100 videos per keyword). WhensearchPagesis0(default), the scraper automatically continues paginating untilmaxVideosis reached or all pages for that keyword are exhausted. - On-the-Fly Deduplication: Duplicate videos across overlapping keywords or between search and trending feeds are filtered out immediately by
bvidduring discovery, ensuringmaxVideos: 1000delivers 1,000 unique videos. - Deep Trending Feed Pagination: The trending feed (
scrapePopular: true) paginates at 20 videos per page across up to 100 pages. - Parallel Comment & Danmaku Worker Pool: When
includeCommentsorincludeDanmakuis enabled, a bounded worker pool (maxConcurrency, default8) enriches videos concurrently so runs finish in a fraction of sequential time.
⚙️ How to Use
- Open Bilibili Scraper in the Apify Console.
- Enter one or more 🔎 Search keywords (English or Chinese), 🎬 Video URLs, 👤 Creator IDs, or enable 🔥 Include trending videos.
- (Optional) Check 💬 Include comments and/or 🌊 Include danmaku to attach audience conversations and bullet comments.
- Set Max videos (
maxVideos— e.g.,40for a quick test,1000+ for bulk datasets, or0for unlimited) and click Start. - Download your data from the Storage → Dataset tab as JSON, CSV, Excel, HTML, or RSS, or fetch it via the Apify API.
💻 API Usage Examples
Python (apify-client)
from apify_client import ApifyClientclient = ApifyClient("YOUR_APIFY_TOKEN")run = client.actor("haketa/bilibili-scraper").call(run_input={"searchKeywords": ["人工智能", "机器学习"],"searchPages": 0,"searchOrder": "totalrank","includeComments": True,"maxCommentsPerVideo": 20,"maxVideos": 500,})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item["bvid"], item["title"], item["views"], item["danmakuCount"])
Node.js (apify-client)
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('haketa/bilibili-scraper').call({searchKeywords: ['原神', '单机游戏'],includeDanmaku: true,maxDanmakuPerVideo: 200,maxVideos: 200,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(`Collected ${items.length} Bilibili records`);
💡 Tips for Best Results
- Leave
searchPagesat0(Auto): The scraper will automatically paginate as deep as needed for each keyword to reach yourmaxVideostarget. - Search in Chinese for maximum volume: Queries like
美食,编程,数码评测,人工智能, and原神return far larger native catalogs than English translations. - Combine multiple keywords for 2,000+ video datasets: Each keyword provides up to ~2,100 unique results; passing 3–5 related keywords easily scales to 5,000–10,000 unique videos.
- Use
scrapePopular: truewhen you needcoinsandshares: Bilibili's trending endpoint includes the full stat block (coins+shares), whereas keyword search providesviews,danmakuCount,likes,favorites, andcomments. - Two-step KOL workflow: Run a keyword search first, collect unique
authorMidvalues from top-performing videos, then pass those IDs intouserIdsto extract full UP主 profiles andbusinessEmailcontacts.
❓ FAQ
Do I need a Bilibili account, cookies, or API key?
No. The scraper works out of the box without any login, cookies, or developer credentials.
How many videos can I scrape in one run?
You can collect 1,000 to 10,000+ unique videos in a single run. With searchPages: 0 (auto), each keyword paginates up to 50 pages (~2,100 videos per keyword), and multiple keywords combine into one deduplicated dataset.
Why are coins and shares null on keyword search results?
Bilibili's search feed returns views, danmakuCount, likes, favorites, and comments on every video, but omits coins and shares. Enable Include trending videos (scrapePopular: true) when you specifically need coins and shares populated at 100%.
What is danmaku (弹幕)?
Danmaku are time-synced viewer comments that scroll directly across the video player at a specific second (videoTimeSec). Enabling includeDanmaku: true extracts the bullet-comment text, exact video timestamp in seconds, and post time.
How do I extract UP主 business emails for influencer outreach?
Paste creator Space URLs (https://space.bilibili.com/431073645) or numeric mid IDs into Creators (userIds). The scraper fetches each creator's profile and automatically parses any email address in their bio into businessEmail.
🔗 Related Scrapers
Expand your Asian & global social media and video intelligence pipelines with our companion actors:
- Xiaohongshu (RedNote) Scraper — Scrape notes, engagement metrics, and creators from China's RED / 小红书.
- WeChat Official Account Scraper — Extract articles and publishing metrics from WeChat 公众号.
- YouTube Channel Contact Scraper — Pull creator business emails and social links from YouTube channels.
- YouTube Comments Scraper — High-speed YouTube comment thread and reply extractor.
- Patreon Creator Scraper — Extract creator memberships, tiers, and earnings data.
📋 Changelog
v1.2.0 (2026-11)
- Unlocked 1,000+ Auto-Scaling Pagination: Changed
searchPagesdefault to0(auto-scaling governed bymaxVideos) with up to 50 pages (~2,100 videos) per keyword, live discovery deduplication bybvid, and multi-keyword fallback scaling for empty runs. - Expanded Trending Feed Ceiling: Increased
popularCountlimit up to5,000and raised popular feed pagination depth. - Fast Prefill Configuration: Set
maxVideosprefill to40so quick test runs finish in ~10–15 seconds. - Documentation Upgrade: Added
⚡ At a Glancesummary table, emoji-grouped field tables with coverage indicators, and comprehensive API examples.
v1.1.0 (2026-11)
- HTML Entity Decoding: Added automatic decoding for HTML entities (
",&,', numeric/hex entities) across titles, descriptions, tags, comments, danmaku, and creator bios. - Scale Verification: Verified 498 unique videos in ~58s with 0 duplicates and 100% core field coverage.
v1.0.0 (2026-07)
- Initial release of Bilibili Scraper supporting keyword search (
EN+中文), trending feed, direct video URLs, creator (UP主) profiles withbusinessEmailextraction, top comments, and XML danmaku bullet comments.