Bilibili Scraper — Video, Comments, Danmaku & UP主 (B站) avatar

Bilibili Scraper — Video, Comments, Danmaku & UP主 (B站)

Pricing

from $7.00 / 1,000 results

Go to Apify Store
Bilibili Scraper — Video, Comments, Danmaku & UP主 (B站)

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

Haketa

Maintained by Community

Actor stats

0

Bookmarked

7

Total users

1

Monthly active users

a day ago

Last modified

Features

Limited permissions

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.

Works Without Login No API Key Export Formats Danmaku Included Scale Languages

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

FeatureDetails
Target PlatformBilibili.com (哔哩哔哩 / B站)
Extraction ModesKeyword Search (EN + 中文), Trending / Popular Feed, Direct Video URLs (BV / av), Creator Profiles (UP主)
Video Metrics CapturedViews (播放), Danmaku Count (弹幕), Likes (点赞), Favorites (收藏), Comments (评论), Coins (投币), Shares (分享)
Per-Video EnrichmentTop Comments sorted by likes (topComments[]) + On-screen Danmaku bullet comments with timestamps (danmaku[])
Creator / KOL Lead GenFollowers, Following, Video Count, Total Likes, Level, Official Verification, Bio, and auto-extracted Business Email
Pagination & ScaleAuto-scaling pagination (searchPages: 0 = auto) — 1,000+ unique videos per run (~42 videos/page, up to 50 pages/keyword)
DeduplicationAutomatic cross-keyword & cross-mode deduplication by bvid
Engine & CostHigh-speed pure HTTP with parallel enrichment (maxConcurrency) and default Apify Proxy

📑 Table of Contents


🔎 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 your maxVideos target (1,000+ videos supported).
  • ✅ Complete video engagement metrics — captures views (播放), danmakuCount (弹幕), likes (点赞), favorites (收藏), and comments (评论) on every search and trending video, plus coins (投币) and shares (分享) on the trending feed.
  • ✅ Rich video metadata — bvid, aid, cid, canonical url, decoded title and description, HTTPS cover image, category (分区), durationSeconds, ISO-8601 publishedAt, tags, and creator attribution (author, authorMid, authorUrl, authorAvatar).
  • ✅ UP主 / Creator KOL lead generation — extracts followers, following, videoCount, totalLikes, level, official verification 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 with text, exact video timestamp (videoTimeSec), and sentAt date.
  • ✅ 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 large maxVideos.

🎯 Use Cases

Persona / TeamHow They Use This Bilibili Scraper
KOL & Influencer Marketing AgenciesDiscover rising UP主 in gaming, tech, beauty, or food; rank by followers and totalLikes, and reach out directly via businessEmail.
Global Brands & Social ListeningTrack 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 EngineersBuild high-volume, authentic Chinese conversational and time-aligned video reaction corpora from topComments[] and danmaku[].
Gaming & Entertainment PublishersMonitor trailer reactions, gameplay guides, and community sentiment for titles like Genshin Impact (原神), Black Myth: Wukong (黑神话:悟空), and indie releases.
Content Strategists & MCNsBenchmark video performance across categories (分区), optimal video durations (durationSeconds), tag combinations, and upload times (publishedAt).
Market & Academic ResearchersStudy 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.

FieldKeyTypeDefaultDescription
🔎 Search keywordssearchKeywordsarray<string>["python tutorial"]Keywords in English or Chinese (e.g., "python", "美食", "原神", "机器学习").
🎬 Video URLs or IDsvideoUrlsarray<string>[]Direct Bilibili video URLs (https://www.bilibili.com/video/BV1...) or bare BV IDs.
👤 Creators (UP主)userIdsarray<string>[]Creator space URLs (https://space.bilibili.com/431073645) or numeric mid IDs.
🔥 Include trending videosscrapePopularbooleanfalsePull Bilibili's current popular / trending video feed (includes coins and shares).
Trending countpopularCountinteger30Number of trending videos to fetch when scrapePopular is enabled (1–5000).
💬 Include commentsincludeCommentsbooleanfalseAttach top comments (sorted by likes) to each scraped video.
Max comments per videomaxCommentsPerVideointeger20Maximum comments to collect per video (1–1000).
🌊 Include danmakuincludeDanmakubooleanfalseAttach on-screen bullet comments (danmaku[]) with video timestamp and text.
Max danmaku per videomaxDanmakuPerVideointeger200Maximum danmaku bullet comments per video (1–6000).
Search pages per keywordsearchPagesinteger0 (Auto)Pages to fetch per keyword (~42 videos/page). 0 = automatic scaling governed by maxVideos.
Sort search results bysearchOrderstring"totalrank"totalrank (Best match), click (Most viewed), pubdate (Newest), dm (Most danmaku), stow (Most favorited).
Max videosmaxVideosinteger100 (prefill 40)Total video cap across all keywords and feeds. Set 0 for unlimited (1,000+ supported).
Max concurrent requestsmaxConcurrencyinteger8Parallel workers for comment/danmaku enrichment (1–20).
Proxy configurationproxyConfigurationobject{ "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"
]
}
{
"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
FieldTypeCoverageDescription
recordTypestring🟢 High (100%)Always "video" for video records.
bvidstring🟢 High (100%)Unique Bilibili alphanumeric BV identifier (e.g., BV1rpWjevEip).
aidinteger|null🟢 High (99%+)Numeric archive ID (av number) used for comments.
cidinteger|null🟡 ConditionalStream player ID — populated on trending videos and whenever includeDanmaku: true.
urlstring🟢 High (100%)Canonical video URL (https://www.bilibili.com/video/BV...).
titlestring🟢 High (100%)Video title with HTML tags stripped and HTML entities decoded.
descriptionstring|null🟢 High (~77–95%)Uploader's video description (present when provided by creator).
coverstring🟢 High (100%)Full HTTPS URL to the video cover thumbnail.
categorystring|null🟢 High (100%)Bilibili category / partition name (分区, e.g., 计算机技术, 单机游戏, 美食).
durationSecondsinteger🟢 High (100%)Total video duration converted to seconds.
publishedAtstring|null🟢 High (100%)Upload timestamp in ISO-8601 UTC format.
tagsstring|null🟢 High (98%+ search)Comma-separated video tags on search results.
sourceTypestring🟢 High (100%)Discovery source: "search", "popular", or "video".
sourceQuerystring🟢 High (100%)Originating search keyword, "popular", or bvid.
📊 Engagement Metrics & Creator Attribution
FieldTypeCoverageDescription
viewsinteger|null🟢 High (100%)Total video play count (播放).
danmakuCountinteger|null🟢 High (100%)Total bullet comments (弹幕) on the video.
likesinteger|null🟢 High (100%)Total likes (点赞).
favoritesinteger|null🟢 High (100%)Total favorites / bookmarks (收藏).
commentsinteger|null🟢 High (100%)Total comment replies (评论).
coinsinteger|null🟡 ConditionalCoins given (投币) — populated 100% on scrapePopular trending feed; null on keyword search.
sharesinteger|null🟡 ConditionalTotal shares (分享) — populated 100% on scrapePopular trending feed; null on keyword search.
authorstring|null🟢 High (100%)Creator / UP主 display name.
authorMidinteger|null🟢 High (100%)Creator numeric member ID (mid).
authorUrlstring|null🟢 High (100%)Link to the creator's Bilibili Space (https://space.bilibili.com/{mid}).
authorAvatarstring|null🟢 High (100%)Full HTTPS URL to the creator's avatar image.
💬 Enrichment Arrays (topComments[] & danmaku[])
FieldParent ArrayTypeDescription
texttopComments[] / danmaku[]stringDecoded comment or bullet-comment text.
author / authorMidtopComments[]stringCommenter username and numeric member ID.
likes / replyCounttopComments[]integerLikes and nested replies on the comment.
timetopComments[]stringISO-8601 timestamp when the comment was posted.
videoTimeSecdanmaku[]numberExact playback position (in seconds) where the bullet comment appears on screen.
sentAtdanmaku[]stringISO-8601 timestamp when the viewer sent the danmaku.
👤 Creator / UP主 Profile Fields (recordType: "creator")
FieldTypeCoverageDescription
mid / name / spaceUrlstring🟢 High (100%)Creator ID, display name, and profile URL.
followers / followinginteger🟢 High (100%)Total fans (粉丝) and accounts followed.
videoCount / totalLikesinteger🟢 High (100%)Total published videos and lifetime likes.
biostring|null🟢 High (90%+)Creator's Space signature (签名).
businessEmailstring|null🟡 ConditionalBusiness email parsed from bio when listed by the UP主 (ideal for KOL outreach).
level / official / officialTypemixed🟢 HighAccount 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). When searchPages is 0 (default), the scraper automatically continues paginating until maxVideos is 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 bvid during discovery, ensuring maxVideos: 1000 delivers 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 includeComments or includeDanmaku is enabled, a bounded worker pool (maxConcurrency, default 8) enriches videos concurrently so runs finish in a fraction of sequential time.

⚙️ How to Use

  1. Open Bilibili Scraper in the Apify Console.
  2. Enter one or more 🔎 Search keywords (English or Chinese), 🎬 Video URLs, 👤 Creator IDs, or enable 🔥 Include trending videos.
  3. (Optional) Check 💬 Include comments and/or 🌊 Include danmaku to attach audience conversations and bullet comments.
  4. Set Max videos (maxVideos — e.g., 40 for a quick test, 1000+ for bulk datasets, or 0 for unlimited) and click Start.
  5. 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 ApifyClient
client = 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 searchPages at 0 (Auto): The scraper will automatically paginate as deep as needed for each keyword to reach your maxVideos target.
  • 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: true when you need coins and shares: Bilibili's trending endpoint includes the full stat block (coins + shares), whereas keyword search provides views, danmakuCount, likes, favorites, and comments.
  • Two-step KOL workflow: Run a keyword search first, collect unique authorMid values from top-performing videos, then pass those IDs into userIds to extract full UP主 profiles and businessEmail contacts.

❓ 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.


Expand your Asian & global social media and video intelligence pipelines with our companion actors:


📋 Changelog

v1.2.0 (2026-11)

  • Unlocked 1,000+ Auto-Scaling Pagination: Changed searchPages default to 0 (auto-scaling governed by maxVideos) with up to 50 pages (~2,100 videos) per keyword, live discovery deduplication by bvid, and multi-keyword fallback scaling for empty runs.
  • Expanded Trending Feed Ceiling: Increased popularCount limit up to 5,000 and raised popular feed pagination depth.
  • Fast Prefill Configuration: Set maxVideos prefill to 40 so quick test runs finish in ~10–15 seconds.
  • Documentation Upgrade: Added ⚡ At a Glance summary 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 (&quot;, &amp;, &#x27;, 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 with businessEmail extraction, top comments, and XML danmaku bullet comments.
⌂ 换网址