Bilibili Video Scraper – Search, Video Stats & Comments (哔哩哔哩)
Pricing
$1.00 / 1,000 results
Bilibili Video Scraper – Search, Video Stats & Comments (哔哩哔哩)
Scrape Bilibili (哔哩哔哩, B站) videos by keyword, video stats (views, likes, coins, favorites, shares, danmaku) by BV/av id or URL, and top comments. Public web API with WBI signing, no login, no API key, no browser. $1 per 1,000 items.
Pricing
$1.00 / 1,000 results
Rating
0.0
(0)
Developer
정무 최
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
a month ago
Last modified
Categories
Security
Limited permissionsShare
Bilibili Video Scraper extracts public data from Bilibili (哔哩哔哩, B站), China's largest video community with more than 300 million monthly users. Search any keyword and get a list of videos with play counts, likes and tags; paste BV or av ids and get full statistics (views, likes, coins, favorites, shares, danmaku, replies); or pull the top comments under any video. Results land in your dataset as clean JSON, CSV or Excel.
No Bilibili account. No API key. No headless browser. Pay only for the items you receive.
What does Bilibili Video Scraper do?
Bilibili has no official data API for third parties. This Bilibili scraper calls the same public JSON endpoints that the bilibili.com website itself uses, including the WBI request signature that Bilibili added in 2023 and that breaks most older Bilibili scrapers. Three modes cover the three things people actually need from Bilibili:
| Mode | Input | One dataset item is |
|---|---|---|
search | keywords (关键词) | one video from the search results, with play, danmaku, like, favorites, duration, tags, author |
video | video URLs, BV ids or av ids | one video with full stats: view, like, coin, favorite, share, reply, danmaku, owner, description, publish date |
comments | video URLs, BV ids or av ids | one top-level comment: text, likes, reply count, time, public username |
That covers Bilibili keyword research, UP主 (creator) monitoring, trend tracking, competitor analysis and Chinese-language sentiment datasets with a single Actor.
Why use this Bilibili scraper?
- WBI signing built in. Bilibili's
w_rid/wtssignature is implemented from the public mixin table and refreshed automatically when keys rotate, sovideoandsearchrequests do not fail with-403or HTTP 412 the way unsigned scrapers do. - Correct pagination. Search pages use a fixed page size and are deduplicated by
bvid, somaxItems: 100returns 100 distinct videos, not 60 with repeats. - Pure HTTP, no browser. A run finishes in seconds and uses 512 MB of memory, so platform cost is minimal.
- Loud failures. If Bilibili changes its response shape, Bilibili Video Scraper fails with an explicit error instead of returning an empty, billed-looking success.
- Pay per item. $1.00 per 1,000 videos or comments, billed only for results that reach your dataset.
- Ready for AI agents. Every Apify Actor is also an API endpoint and an MCP server, so Claude, ChatGPT, LangChain, n8n or Make can call Bilibili Video Scraper directly.
Output: what data can you extract from Bilibili?
search mode: one item per video
| Field | Example | Description |
|---|---|---|
keyword | python | The keyword that produced this result |
bvid | BV1rpWjevEip | Bilibili video id (BV format) |
aid | 113006243481679 | Numeric video id (av number) |
title | 【全748集】目前B站最全最细的Python零基础全套教程 | Title with search highlighting removed |
description | 本套教程从零开始讲解... | Short description |
author | Python官方课程 | Uploader (UP主) display name |
mid | 3546597933714079 | Uploader's public user id |
play | 20592822 | Play count |
danmaku | 132365 | Bullet comment (弹幕) count |
like | 565892 | Likes |
favorites | 870433 | Favorites (收藏) |
reply | 357983 | Comment count |
duration | 2398:14 | Duration as shown by Bilibili (mm:ss) |
pubdate / pubdateIso | 1724338758 / 2024-08-22T14:59:18.000Z | Publish time as Unix seconds and ISO 8601 |
typename | 计算机技术 | Bilibili category |
tags | ["程序员","Python教程"] | Tags as an array |
pic | https://i2.hdslb.com/bfs/archive/....jpg | Cover image |
url | https://www.bilibili.com/video/BV1rpWjevEip | Video page |
video mode: one item per video
| Field | Example | Description |
|---|---|---|
bvid, aid, title, description | As above, with the full description | |
ownerName / ownerMid | Python官方课程 / 3546597933714079 | Uploader name and public id |
view | 20592871 | Views |
like | 565906 | Likes |
coin | 404366 | Coins (投币) |
favorite | 870441 | Favorites (收藏) |
share | 102302 | Shares |
reply | 357983 | Comments |
danmaku | 132365 | Bullet comments |
duration | 143894 | Total duration in seconds |
partCount | 100 | Number of parts (分P) |
copyright | original | original (自制) or repost (转载) |
pubdate / pubdateIso, typename, pic, url | As above |
comments mode: one item per comment
| Field | Example | Description |
|---|---|---|
bvid / aid / videoTitle | The video the comment belongs to | |
rpid | 247714016448 | Comment id (use to deduplicate between runs) |
content | 孩子们课代表来了... | Comment text |
like | 7473 | Likes on the comment |
replyCount | 1146 | Number of replies under this comment |
ctime / ctimeIso | 1732197161 / 2024-11-21T13:52:41.000Z | Posted time |
uname | 爱劳动的noise | Public username |
mid | 1242205079 | Commenter's public user id |
userLevel | 4 | Bilibili account level 0 to 6 |
url | https://www.bilibili.com/video/BV1rpWjevEip#reply247714016448 | Deep link to the comment |
Example output (video mode, JSON):
{"bvid": "BV1rpWjevEip","aid": 113006243481679,"title": "【全748集】目前B站最全最细的Python零基础全套教程,2026最新版","description": "本套教程从零开始讲解,手把手教学,包含基础语法、进阶语法、爬虫、自动化办公、数据分析","ownerName": "Python官方课程","ownerMid": 3546597933714079,"view": 20592871,"danmaku": 132365,"reply": 357983,"favorite": 870441,"coin": 404366,"share": 102302,"like": 565906,"duration": 143894,"pubdate": 1724338758,"pubdateIso": "2024-08-22T14:59:18.000Z","typename": null,"partCount": 100,"copyright": "original","pic": "https://i2.hdslb.com/bfs/archive/a979056b1a32012cdd00d48fbc3732d253e30620.jpg","url": "https://www.bilibili.com/video/BV1rpWjevEip"}
Download the dataset as JSON, CSV, Excel, XML or RSS from the Apify Console, or fetch it through the API.
How to scrape Bilibili videos and comments
- Open Bilibili Video Scraper in Apify Store and click Try for free.
- Pick a mode:
search,videoorcomments. - For
search, enter keywords such aspython,原神or鬼畜. Forvideoorcomments, paste video URLs or ids such ashttps://www.bilibili.com/video/BV1rpWjevEiporav170001. - Set Max items (default 50). In
searchit is videos per keyword, incommentsit is comments per video. - Click Start. Results appear in the Output tab within seconds.
- Export, or schedule the run to repeat daily for monitoring.
Where do I find a Bilibili video id?
Every Bilibili video URL contains a BV id. Older links and the mobile app also show an av number. Both work:
https://www.bilibili.com/video/BV1rpWjevEip/ → BV1rpWjevEiphttps://www.bilibili.com/video/av170001 → av170001 (or just 170001)https://b23.tv/BV1rpWjevEip → BV1rpWjevEip
Input parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
mode | string | search | search, video or comments. |
keywords | array | ["python"] | Bilibili search queries, used in search mode. Chinese or English, one video list per keyword. |
videoUrlsOrIds | array | ["BV1rpWjevEip"] | Video URLs, BV ids or av ids, used in video and comments mode. |
maxItems | integer | 50 | search: videos per keyword (1 to 5000). comments: comments per video. video: total videos. |
proxyConfiguration | object | no proxy | Bilibili's public API answers Apify's datacenter IPs directly. Add a proxy only if the log shows HTTP 412. |
Example input:
{"mode": "search","keywords": ["python 教程", "机器学习"],"maxItems": 100,"proxyConfiguration": { "useApifyProxy": false }}
{"mode": "comments","videoUrlsOrIds": ["https://www.bilibili.com/video/BV1rpWjevEip", "av170001"],"maxItems": 200}
How much does it cost to scrape Bilibili?
Bilibili Video Scraper uses Apify's pay-per-event pricing: $0.001 per item ($1.00 per 1,000 videos or comments). You are charged only for items that land in your dataset. A run that returns nothing costs nothing beyond Apify platform usage.
| Items | Price |
|---|---|
| 1,000 | $1.00 |
| 10,000 | $10.00 |
| 100,000 | $100.00 |
Apify's free plan includes $5 of monthly usage, enough for several thousand items to evaluate the Actor. Because the Actor downloads only small JSON payloads and needs no proxy by default, platform compute per item is negligible.
Use cases for Bilibili data
- Keyword and trend research: Which videos rank for
AI 绘画or露营this week, and how many plays do they have? Schedule a dailysearchrun and chart the movement. - UP主 and competitor monitoring: Pass your own and competitor video ids in
videomode to track views, likes, coins and favorites over time. - Sponsorship and influencer vetting: Compare like-to-view and coin-to-view ratios across a creator's catalog before signing a 商单.
- Chinese NLP and LLM datasets: Thousands of authentic, informal Chinese comments with like counts for sentiment analysis, slang research or fine-tuning.
- Market research for China: See how Chinese consumers talk about a product, game or anime in Bilibili comments.
- AI agents: Let an agent answer "what are the most-played Bilibili videos about X?" by calling the Actor through MCP.
Use Bilibili Video Scraper from code
Python
from apify_client import ApifyClientclient = ApifyClient("<YOUR_API_TOKEN>")run = client.actor("romantic_boysenberry/bilibili-video-scraper").call(run_input={"mode": "search","keywords": ["python"],"maxItems": 100,})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item["bvid"], item["play"], item["title"][:50])
JavaScript
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });const run = await client.actor('romantic_boysenberry/bilibili-video-scraper').call({mode: 'comments',videoUrlsOrIds: ['BV1rpWjevEip'],maxItems: 200,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items.length, 'comments');
cURL
curl -X POST "https://api.apify.com/v2/acts/romantic_boysenberry~bilibili-video-scraper/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>" \-H "Content-Type: application/json" \-d '{"mode":"video","videoUrlsOrIds":["BV1rpWjevEip","av170001"]}'
The Actor also works as an MCP server for Claude Desktop, Cursor and other agents, and plugs into n8n, Make, Zapier and LangChain through the standard Apify integrations.
Tips for best results
- Chinese keywords match Bilibili's audience better than English ones, but both work.
python 教程returns more tutorial videos thanpython tutorial. - Search returns at most 1,000 results per keyword (Bilibili's own cap, 20 pages of 50). Use several narrower keywords to go deeper.
searchmode already includes play, like, favorites and danmaku counts. Usevideomode only when you need coins, shares, the full description or part count.- Comments are returned in Bilibili's "hot" order, which is what visitors see first. Deduplicate on
rpidwhen you run on a schedule. - Keep
maxItemssmall for daily deltas; it is the only thing that drives cost.
Limitations
- Only data visible to logged-out visitors is collected. Videos restricted to members, age-gated content and comments hidden by the uploader are not available.
commentsmode returns top-level comments. Replies under a comment are counted inreplyCountbut not expanded.- Some videos only expose "selected comments" (精选评论) to visitors; for those the Actor returns the handful Bilibili shows, not the full count.
- Bilibili applies risk control (HTTP 412) to IP ranges it dislikes. The Actor fetches a device cookie and signs every request, which is enough for Apify's IPs today; if you see 412 in the log, enable a residential proxy.
- Bilibili changes its web API occasionally. If a run suddenly returns zero items, the Actor fails loudly instead of silently succeeding; check the run log and open an issue.
Legal and ethical use
Bilibili Video Scraper collects only publicly visible video metadata, statistics and comment text with the public username shown on the comment. It does not log in, does not bypass access controls, does not download video files and does not collect private contact details. Video titles, descriptions and comments may be protected by copyright and personal data rules in your jurisdiction; use the data for analysis, research and monitoring in line with Bilibili's terms and applicable law, including China's Personal Information Protection Law. You are responsible for how you use the output.
FAQ
Does Bilibili have an official API? Not for third parties. The endpoints used here are the public web endpoints that bilibili.com itself calls, signed with the public WBI scheme. This Actor does not use any private or leaked key.
Why do other Bilibili scrapers return empty results or errors?
Since 2023 most Bilibili endpoints require a buvid3 device cookie and a w_rid WBI signature. Scrapers written before that get HTTP 412 or code -403. Bilibili Video Scraper implements both.
Can I scrape a whole UP主 channel?
Not yet. Search for the creator's name in search mode, or pass their video ids to video mode. A creator-videos mode is planned.
Can it download the video or subtitles? No. This Actor returns metadata, statistics and comments only.
How fresh is the data? Every run fetches live from Bilibili. Nothing is cached.
Can I run it on a schedule? Yes. Use Apify Schedules to run hourly, daily or weekly, and connect a webhook or integration to receive new items automatically.
Is there a free trial? Apify's free plan gives you $5 of usage every month, so you can test Bilibili Video Scraper without a credit card.
Related Actors
- Bilibili Scraper for a browser-based alternative
- Bilibili Video Downloader if you need the media file itself
- Douyin Scraper for Chinese short video data
- Naver Place Reviews Scraper from this developer, for Korean local reviews
哔哩哔哩视频采集器 / Bilibili 비디오 수집기 (한국어 안내)
Bilibili Video Scraper는 중국 최대 동영상 커뮤니티 **빌리빌리(哔哩哔哩, B站)**의 공개 데이터를 키워드 검색, 영상 ID, 댓글 세 가지 모드로 수집해 JSON, CSV, Excel로 내려받는 Apify 액터입니다.
- 로그인, API 키, 브라우저 설치 모두 불필요. 빌리빌리 웹사이트가 쓰는 공개 JSON API를 WBI 서명과 함께 호출
- 1건당 $0.001 (1,000건에 $1), 받은 만큼만 과금
search: 키워드 → 영상 목록(재생수, 좋아요, 즐겨찾기, 탄막, 태그, 업로더) /video: BV·av ID → 조회수, 좋아요, 코인, 즐겨찾기, 공유, 댓글수, 설명 /comments: 영상 ID → 인기 댓글(본문, 좋아요, 답글 수, 작성 시각, 공개 닉네임)- 활용: 중국 시장 트렌드 조사, UP주(크리에이터)·경쟁사 모니터링, 인플루언서 검증, 중국어 감성 분석 데이터셋
- 공개된 정보와 공개 닉네임만 수집하며 개인정보는 수집하지 않습니다. 수집 데이터는 관련 법령과 빌리빌리 약관을 지켜 사용하세요
사용법: 액터 페이지에서 Try for free → 모드 선택 → 키워드(예: python) 또는 영상 URL 입력 → Start → Output 탭에서 다운로드. 예약 실행(Schedules)으로 매일 자동 수집도 가능합니다.