Bilibili 哔哩哔哩 Scraper
Pricing
from $7.49 / 1,000 videos
Bilibili 哔哩哔哩 Scraper
Scrape Bilibili (哔哩哔哩, B站) videos by keyword, video details, comments, danmaku (弹幕), UP主 profiles and catalogues, plus 热门 trending and 热搜. Views, likes, coins, favourites. Export JSON, CSV, Excel.
Pricing
from $7.49 / 1,000 videos
Rating
0.0
(0)
Developer
ParseBird
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
a day ago
Last modified
Categories
Share
Bilibili 哔哩哔哩 Scraper
Bilibili 哔哩哔哩 Scraper extracts public data from Bilibili (哔哩哔哩, B站, 哔站), one of China's largest video platforms. Search videos by keyword, pull full video stats, comments, danmaku (弹幕) bullet comments, UP主 creator profiles and complete UP主 video lists, or track the 热门 trending feed and 热搜 hot-search terms. No Bilibili account, cookie or API key needed.
| Seven modes in one Actor: keyword search with free sort, length and date filters, video details with tags, parts and cid, comments with reply threads, second-by-second danmaku, UP主 profiles with fans and verification, full UP主 catalogues, and the 热门 / 热搜 trending lists, all with plays, likes, coins (投币), favourites (收藏), shares and danmaku counts. |
Copy to your AI assistant
Copy this block into ChatGPT, Claude, Cursor, or any LLM to start using this actor.
Apify Actor: parsebird/bilibili-scraper. Scrapes public Bilibili (哔哩哔哩, B站) data without login. Call via ApifyClient: client.actor("parsebird/bilibili-scraper").call(run_input={"searchType": "search", "keywords": ["编程"], "sortOrder": "click", "maxItems": 50}). Inputs: searchType (string, default "search": one of search, video-detail, comments, danmaku, profile, user-videos, trend), keywords (string[], used by search), videoUrls (string[]: bilibili.com/video URLs, BV ids, av ids or b23.tv links; add ?p=N for a part; used by video-detail, comments, danmaku), userUrls (string[]: space.bilibili.com URLs or numeric UIDs; used by profile and user-videos), maxItems (integer, default 20, max 5000: results per keyword, video or UP主 for search, comments, user-videos, trend), sortOrder (totalrank | click | pubdate | dm | stow, default totalrank), durationFilter (any | short | medium | long | verylong), publishedAfter / publishedBefore (YYYY-MM-DD, China time), trendType (videos | keywords), includeReplies (boolean, default false). Output: one row per result with searchType. Videos: bvid, aid, title, desc, url, cover, duration (s), category, category_id, tags, pubdate, published_at, part_count, view_count, like_count, coin_count, favorite_count, share_count, danmaku_count, reply_count, owner {mid, name, avatar}; video-detail adds cid, parts, dimension, copyright, dynamic, owner_fans; trend adds rcmd_reason, pub_location. Comments: rpid, content, like_count, reply_count, ctime, root, is_pinned, up_liked, up_replied, user_level, user_vip, user_verified, user, replies. Danmaku: dmid, text, progress (seconds), mode, fontsize, color, ctime, sender_hash. Profiles: mid, name, avatar, sign, sex, level, fans, following, verified, verify_desc, vip, video_count, likes. Hot search: rank, keyword, show_name, heat_score. Pricing: pay per event (video, video detail, comment, profile, danmaku per video, trending row). Full API spec: https://apify.com/parsebird/bilibili-scraper/api. Get your token: https://console.apify.com/settings/integrations.
What is Bilibili 哔哩哔哩 Scraper?
Bilibili 哔哩哔哩 Scraper turns Bilibili into structured data. Type a keyword, paste video links or add UP主 (creator) UIDs, pick a mode and click Start. You get clean rows with play counts, likes, coins, favourites, danmaku counts, comments and creator stats, ready to download as JSON, CSV or Excel or to read through the API.
It works as a Bilibili API alternative: no Bilibili developer account, login, cookie or API key needed. Every row is tagged with the mode that produced it, so you can mix results in one dataset and still sort them.
What can Bilibili Scraper do?
- 🔎 Search Bilibili videos by keyword. Sort by best match (综合排序), most played, newest, most danmaku or most favourited. Filter by video length and publish date. Filters are applied by Bilibili, so a narrow search returns, and bills, fewer videos.
- 🎬 Get full video details. Stats including coins and shares, tags, every part (分P) with its cid, resolution, original vs. reprint, the UP主's post text and the UP主's follower count.
- 💬 Scrape Bilibili comments. Pinned comment, top comments, likes, reply counts, whether the UP主 liked or replied, commenter level, VIP and verification, and the reply threads.
- 📺 Download danmaku (弹幕). Every bullet comment Bilibili serves for the video, each with the exact second it appears on screen, display mode, color and send time.
- 👤 Scrape UP主 profiles. Fans, following, level, verification, VIP status, number of videos and total likes.
- 📚 List an UP主's whole catalogue. Every public video from a creator, newest first, with full stats.
- 📈 Track what's trending. The 热门 popular feed with each video's recommendation reason and upload location, or the 热搜 hot-search terms with rank and heat score.
- 📅 Schedule and monitor. Run daily or hourly with Apify Schedules to track trends, creators or keyword rankings over time.
- 🔌 API and integrations. Use the Apify API, or send results to Google Sheets, Zapier, Make, Slack or webhooks with Apify integrations. Export as JSON, CSV, Excel, XML or HTML.
What data can you extract from Bilibili?
Every row carries searchType, plus what produced it (keyword, video, uid or trendType).
| Group | Fields |
|---|---|
| Video (search, video-detail, user-videos, trend) | bvid · aid · title · desc · url · cover · duration (seconds) · category (分区) · category_id · tags · pubdate · published_at · part_count · rank |
| Video stats | view_count · like_count · coin_count (投币) · favorite_count (收藏) · share_count · danmaku_count · reply_count |
| Owner (every video) | owner.mid · owner.name · owner.avatar |
| Video detail only | cid · parts[] (cid, page, title, duration of each 分P) · dimension (width, height, rotate) · copyright (1 original, 2 reprint) · dynamic (the UP主's post text) · owner_fans |
| Trending videos only | rcmd_reason (why it is trending) · pub_location (发布地) · cid |
| Comment | rpid · content · pictures · like_count · reply_count · ctime · created_at · root · parent · oid · is_pinned · up_liked · up_replied · user_level · user_vip · user_verified · user (mid, name, avatar) · replies[] |
| Danmaku (弹幕) | dmid · text · progress (seconds into the video) · mode (1–3 scrolling, 4 bottom, 5 top) · fontsize · color (decimal RGB) · ctime · pool · sender_hash · cid · page |
| UP主 profile | mid · name · avatar · sign · sex · level · fans · following · friends · verified · verify_type · verify_desc · vip · vip_type · video_count · article_count · likes · is_senior_member · url |
| Hot-search term (热搜) | rank · keyword · show_name · heat_score · icon · search_url |
Fields Bilibili doesn't send for a given mode are null. Search results have no coin or share counts, UP主 catalogue rows have no tags or category name (only category_id), and trending rows have no tags. Use video-detail on those videos to fill them in.
How to scrape Bilibili
- Open Bilibili 哔哩哔哩 Scraper on Apify Store and click Try for free.
- Choose a Mode: search, video details, comments, danmaku, UP主 profile, UP主 videos or trending.
- Fill in the field that mode uses: Search keywords, Video URLs or BV ids, or UP主 space URLs or UIDs. Trending needs no input.
- Set Max results per keyword or target. The default of 20 keeps the first run cheap.
- Optionally narrow a search with the sort, length and date filters.
- Click Start. When the run finishes, open the Output tab and download the data as JSON, CSV, Excel, XML or HTML, or read it with the API.
Search a keyword, most-played first
{"searchType": "search","keywords": ["编程", "机械键盘"],"sortOrder": "click","maxItems": 50}
One row per video, with plays, likes, favourites, danmaku and comment counts. sortOrder accepts totalrank (best match), click (most played), pubdate (newest), dm (most danmaku) and stow (most favourited).
Narrow a search by date and length
{"searchType": "search","keywords": ["AI"],"publishedAfter": "2026-01-01","publishedBefore": "2026-06-30","durationFilter": "medium","maxItems": 100}
publishedAfter, publishedBefore and durationFilter are sent to Bilibili as part of the search, so a narrow search returns and bills fewer videos than a broad one. Dates are in China Standard Time.
Full details for specific videos
{"searchType": "video-detail","videoUrls": ["https://www.bilibili.com/video/BV1rpWjevEip", "BV1Mbx163Exi"]}
Audience reaction, second by second (danmaku / 弹幕)
{"searchType": "danmaku","videoUrls": ["https://www.bilibili.com/video/BV1rpWjevEip"]}
One row per bullet comment, each with progress, the second it appears on screen, so you can line reactions up against the moments that caused them. Billed once per video, not per bullet. For a multi-part video, add ?p=3 to the URL to get part 3; without it you get part 1.
Comments with reply threads
{"searchType": "comments","videoUrls": ["BV1rpWjevEip"],"maxItems": 200,"includeReplies": true}
Each comment carries the commenter's level, VIP and verification status, and whether the UP主 liked or replied to it. With includeReplies off, each comment still includes Bilibili's reply previews at no extra cost. With it on, the replies in each thread are saved and billed as comments. See the FAQ for how many comments Bilibili shows.
A creator (UP主) and their whole catalogue
{"searchType": "user-videos","userUrls": ["https://space.bilibili.com/546195", "178360345"],"maxItems": 500}
Switch searchType to profile on the same input to get the creator card instead: fans, following, level, verification and VIP.
What is trending right now
{ "searchType": "trend", "trendType": "videos", "maxItems": 50 }
trendType: "videos" returns the 热门 feed with each video's recommendation reason. "keywords" returns the 热搜 terms with their rank and heat score.
Input parameters
Pick a mode in searchType. Every other field belongs to one or more modes and is ignored by the rest. See the Input tab for the full form.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
searchType | string | Yes | search | The mode: search, video-detail, comments, danmaku, profile, user-videos, trend |
keywords | string[] | For search | — | Search terms. Used by search |
videoUrls | string[] | For video modes | — | Video URLs, BV ids, av ids or b23.tv short links. Used by video-detail, comments, danmaku |
userUrls | string[] | For UP主 modes | — | UP主 space URLs or numeric UIDs. Used by profile and user-videos |
maxItems | integer | No | 20 | Results per keyword, video or UP主, up to 5,000. Applies to search, comments, user-videos and trend |
sortOrder | string | No | totalrank | totalrank, click, pubdate, dm, stow. Search only |
durationFilter | string | No | any | short (under 10 min), medium (10–30), long (30–60), verylong (over 60). Search only |
publishedAfter | string | No | — | YYYY-MM-DD. Search only |
publishedBefore | string | No | — | YYYY-MM-DD. Search only |
trendType | string | No | videos | videos (热门) or keywords (热搜). Trend only |
includeReplies | boolean | No | false | Fetch reply threads. Each reply is billed as one comment and counts against maxItems. Comments only |
proxyConfiguration | object | No | none | Not needed for normal use |
⚠️ Accepted video and creator references. A video is a full URL (https://www.bilibili.com/video/BV1rpWjevEip), a bare BV id (BV1rpWjevEip), an av id (av113006243481679) or a b23.tv short link. A creator is a space URL (https://space.bilibili.com/546195) or a bare numeric UID (546195). Anything else is skipped with a warning and not charged. Duplicate keywords, videos or UIDs in the same input are collapsed before the run starts, so pasting the same target twice never charges twice.
Output example
Each result is one row. These are real rows, with long text shortened.
Search result
{"searchType": "search","keyword": "编程","rank": 1,"bvid": "BV1rpWjevEip","aid": "113006243481679","title": "【全748集】目前B站最全最细的Python零基础全套教程,2026最新版…","url": "https://www.bilibili.com/video/BV1rpWjevEip","cover": "https://i2.hdslb.com/bfs/archive/a979056b1a32012cdd00d48fbc3732d253e30620.jpg","duration": 143894,"category": "计算机技术","category_id": 231,"tags": ["程序员", "Python教程", "Python入门零基础", "计算机", "编程语言"],"pubdate": 1724338758,"published_at": "2024-08-22T14:59:18Z","view_count": 21428872,"like_count": 590710,"coin_count": null,"favorite_count": 908362,"share_count": null,"danmaku_count": 135330,"reply_count": 368115,"owner": { "mid": "3546597933714079", "name": "Python官方课程", "avatar": "https://i1.hdslb.com/bfs/face/6822e4fdc8f82c69e10accd1ab11a109702bccbf.jpg" }}
Danmaku (弹幕)
{"searchType": "danmaku","video": "BV1Mbx163Exi","page": 1,"cid": "43210768827","dmid": "2234373449811002368","text": "刚刚!","progress": 0,"mode": 5,"fontsize": 25,"color": 16777215,"ctime": 1793449271,"pool": 0,"sender_hash": "5cc3a9ff"}
UP主 profile
{"searchType": "profile","uid": "546195","name": "老番茄","sign": "新浪微博:_老番茄_","sex": "男","level": 6,"fans": 20866651,"following": 7,"verified": true,"verify_type": "personal","verify_desc": "2025百大UP主、2025年度商业影响力奖UP主、2022年度联合创作奖UP主","vip": true,"video_count": 683,"likes": 196641782,"url": "https://space.bilibili.com/546195"}
Hot-search term (热搜)
{"searchType": "trend","trendType": "keywords","rank": 1,"keyword": "北京JDG 重庆狼队","show_name": "北京JDG vs 重庆狼队 KPL","heat_score": 18717327,"search_url": "https://search.bilibili.com/all?keyword=%E5%8C%97%E4%BA%ACJDG%20%E9%87%8D%E5%BA%86%E7%8B%BC%E9%98%9F"}
How much does it cost to scrape Bilibili?
Bilibili 哔哩哔哩 Scraper uses pay-per-event pricing. You pay only for results saved to your dataset. Compute and proxy costs are included in the event prices, and lookups that return nothing (a deleted video, an unknown UID, a video with no danmaku) are free.
| Event | What it counts | Free | Bronze | Silver | Gold |
|---|---|---|---|---|---|
| Video | Each video from keyword search or an UP主's catalogue | $9.99 | $8.99 | $7.99 | $7.49 |
| Video detail | Each full video detail (stats, owner, parts, cid) | $19.99 | $17.99 | $16.99 | $15.99 |
| Comment | Each comment or reply saved | $7.99 | $6.99 | $5.99 | $5.49 |
| UP主 profile | Each creator profile | $11.99 | $10.99 | $9.99 | $8.99 |
| Danmaku 弹幕 | Each video whose danmaku is returned, however many bullets | $10.99 | $9.99 | $8.99 | $7.99 |
| Trending | Each trending video or hot-search term | $7.99 | $6.99 | $5.99 | $5.49 |
Prices are per 1,000 events. On the Free plan, 500 search results cost about $5.00, details for 100 videos cost $2.00, and danmaku for 10 videos costs $0.11 even if those videos return 10,000 bullets.
maxItems is the main cost lever for the list modes, because they bill per result: a run costs roughly price × results × targets. video-detail and profile return one row per target. You can also set a maximum cost per run in Apify Console, and the Actor stops when it's reached.
Use the Bilibili API from Python or JavaScript
Get your API token from Apify Console, then call the Actor with the Apify API client.
Python
from apify_client import ApifyClientclient = ApifyClient("<YOUR_APIFY_TOKEN>")run = client.actor("parsebird/bilibili-scraper").call(run_input={"searchType": "search","keywords": ["机械键盘"],"sortOrder": "click","maxItems": 100,})for video in client.dataset(run["defaultDatasetId"]).iterate_items():print(video["title"], video["view_count"], video["owner"]["name"])
JavaScript
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });const run = await client.actor('parsebird/bilibili-scraper').call({searchType: 'danmaku',videoUrls: ['https://www.bilibili.com/video/BV1rpWjevEip'],});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(`${items.length} danmaku`, items[0]);
The full endpoint reference, including synchronous runs that return the dataset in one call, is on the API tab.
Use cases
- Market and trend research. Follow what Chinese audiences watch in a category through keyword searches sorted by plays or favourites, the 热门 feed and the 热搜 terms.
- Influencer and KOL discovery. Find UP主 in a niche from search results, then pull their profiles and full catalogues to compare fans, likes and engagement.
- Brand and product monitoring. Schedule keyword searches sorted by newest to catch new videos about your brand, product or competitors.
- Audience reaction analysis. Line danmaku up against the video timeline to find the exact moments viewers react to, and read the top comments.
- Content strategy. Compare engagement ratios (coins, favourites and likes per view) across an UP主's videos to see which formats work.
- Datasets for research and NLP. Collect Chinese-language comments, danmaku and video metadata for sentiment analysis or language research.
How it works
- The Actor reads your mode and turns each keyword, video link or UID into a target. Invalid inputs are skipped and duplicates are merged.
- It queries Bilibili's public web endpoints, the same ones bilibili.com uses for logged-out visitors, and paginates until it reaches
maxItemsor the end of the list. - Each result is normalised into a flat row with consistent field names, string IDs (some Bilibili IDs exceed JavaScript's safe integer range) and ISO dates next to the Unix timestamps.
- Rows are saved to the dataset and charged as they come in. The run stops cleanly at your spending limit, and resumes without duplicates if Apify moves it to another server.
FAQ
Do I need a Bilibili account, cookie or API key? No. The Actor reads public data the way a logged-out visitor sees it.
How many comments can I get per video?
Bilibili shows only a handful of comments to logged-out visitors, so that is what this Actor returns. It merges Bilibili's hot, newest and featured views, which usually gives 5–10 top-level comments per video plus the pinned comment. With includeReplies on, it also returns up to 20 replies per thread. The run log shows how many comments the video has in total. For videos with thousands of comments this is a sample of the most visible ones, not the full thread.
How many danmaku does a video return? The video's current danmaku pool, as Bilibili serves it to viewers. Its size depends on the video's length and popularity: in testing, a 2-minute clip returned all 390 of its danmaku, while a long tutorial part returned 3,600. The run log shows the pool size for each video. For very popular videos this is the most recent pool, not every bullet ever sent.
Why does a search stop before maxItems?
Bilibili's search returns at most about 1,000 results per query, and its pages overlap, so one search typically yields 700–1,000 unique videos. To collect more, split the search with publishedAfter and publishedBefore, for example one run per month.
Why is category empty on video-detail rows?
Bilibili's video detail endpoint no longer sends the category name, only its numeric ID (category_id). Search and trending rows do include the name.
Can I get video transcripts or subtitles? No. Bilibili hides subtitle files from logged-out visitors, so this Actor doesn't offer them.
Does it download the videos? No. It extracts metadata, statistics, comments and danmaku. Cover image URLs are included.
Can I scrape a specific part of a multi-part video?
Yes, for danmaku. Add ?p=N to the video URL. video-detail returns every part with its cid and title.
Can I schedule recurring runs? Yes. Use Apify Schedules to run hourly, daily or weekly, for example to track the 热搜 list or an UP主's new uploads.
Can I use it with Make, Zapier, Google Sheets or an AI agent? Yes, through Apify integrations and the Apify API. The Actor is also available to AI agents through the Apify MCP server.
Something doesn't work. What should I do? Open an issue on the Issues tab with your run link. We read every report.
Is it legal to scrape Bilibili?
This Actor only collects publicly available data that any logged-out visitor can see on bilibili.com. It doesn't log in, bypass paywalls or access private content. Comments, danmaku and profiles can still include personal data, which is protected by laws such as the GDPR and China's PIPL. Don't scrape personal data unless you have a legitimate reason, and check Bilibili's terms of service before you use the data. If you're unsure, consult a lawyer. Read more in Apify's guide: Is web scraping legal?
Related Actors
| Actor | What it does |
|---|---|
| YouTube Search Scraper & API | YouTube search results: videos, channels, playlists and Shorts with views and channel info |
| YouTube Trending Videos Scraper | YouTube's trending pages (Gaming, Music, News and more) for any country |
| YouTube Live Chat Scraper | Live chat messages, Super Chats and membership events from live or replayed streams |
| YouTube Transcript Scraper | Transcripts and subtitles from YouTube videos, with timestamps |
| TikTok Trends Scraper | Trending hashtags, sounds, creators and videos on TikTok |
| Twitch Scraper | Twitch channels, live streams, clips, games and VODs |
| NetEase Cloud Music Scraper | Toplists and playlists from NetEase Cloud Music (网易云音乐) |
| Sogou WeChat Article Search Scraper | WeChat Official Account articles from Sogou WeChat (搜狗微信) search |
| Taobao & Tmall Scraper | Taobao and Tmall (淘宝 天猫) products by keyword, category, URL or shop |
| che168 二手车 Autohome Scraper | Used car listings from che168.com (二手车之家) |