Bilibili Video Scraper – Search, Video Stats & Comments (哔哩哔哩) avatar

Bilibili Video Scraper – Search, Video Stats & Comments (哔哩哔哩)

Pricing

$1.00 / 1,000 results

Go to Apify Store
Bilibili Video Scraper – Search, Video Stats & Comments (哔哩哔哩)

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 Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a month ago

Last modified

Categories

Security

Limited permissions

Share

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:

ModeInputOne dataset item is
searchkeywords (关键词)one video from the search results, with play, danmaku, like, favorites, duration, tags, author
videovideo URLs, BV ids or av idsone video with full stats: view, like, coin, favorite, share, reply, danmaku, owner, description, publish date
commentsvideo URLs, BV ids or av idsone 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 / wts signature is implemented from the public mixin table and refreshed automatically when keys rotate, so video and search requests do not fail with -403 or HTTP 412 the way unsigned scrapers do.
  • Correct pagination. Search pages use a fixed page size and are deduplicated by bvid, so maxItems: 100 returns 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

FieldExampleDescription
keywordpythonThe keyword that produced this result
bvidBV1rpWjevEipBilibili video id (BV format)
aid113006243481679Numeric video id (av number)
title【全748集】目前B站最全最细的Python零基础全套教程Title with search highlighting removed
description本套教程从零开始讲解...Short description
authorPython官方课程Uploader (UP主) display name
mid3546597933714079Uploader's public user id
play20592822Play count
danmaku132365Bullet comment (弹幕) count
like565892Likes
favorites870433Favorites (收藏)
reply357983Comment count
duration2398:14Duration as shown by Bilibili (mm:ss)
pubdate / pubdateIso1724338758 / 2024-08-22T14:59:18.000ZPublish time as Unix seconds and ISO 8601
typename计算机技术Bilibili category
tags["程序员","Python教程"]Tags as an array
pichttps://i2.hdslb.com/bfs/archive/....jpgCover image
urlhttps://www.bilibili.com/video/BV1rpWjevEipVideo page

video mode: one item per video

FieldExampleDescription
bvid, aid, title, descriptionAs above, with the full description
ownerName / ownerMidPython官方课程 / 3546597933714079Uploader name and public id
view20592871Views
like565906Likes
coin404366Coins (投币)
favorite870441Favorites (收藏)
share102302Shares
reply357983Comments
danmaku132365Bullet comments
duration143894Total duration in seconds
partCount100Number of parts (分P)
copyrightoriginaloriginal (自制) or repost (转载)
pubdate / pubdateIso, typename, pic, urlAs above

comments mode: one item per comment

FieldExampleDescription
bvid / aid / videoTitleThe video the comment belongs to
rpid247714016448Comment id (use to deduplicate between runs)
content孩子们课代表来了...Comment text
like7473Likes on the comment
replyCount1146Number of replies under this comment
ctime / ctimeIso1732197161 / 2024-11-21T13:52:41.000ZPosted time
uname爱劳动的noisePublic username
mid1242205079Commenter's public user id
userLevel4Bilibili account level 0 to 6
urlhttps://www.bilibili.com/video/BV1rpWjevEip#reply247714016448Deep 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

  1. Open Bilibili Video Scraper in Apify Store and click Try for free.
  2. Pick a mode: search, video or comments.
  3. For search, enter keywords such as python, 原神 or 鬼畜. For video or comments, paste video URLs or ids such as https://www.bilibili.com/video/BV1rpWjevEip or av170001.
  4. Set Max items (default 50). In search it is videos per keyword, in comments it is comments per video.
  5. Click Start. Results appear in the Output tab within seconds.
  6. 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/ → BV1rpWjevEip
https://www.bilibili.com/video/av170001 → av170001 (or just 170001)
https://b23.tv/BV1rpWjevEip → BV1rpWjevEip

Input parameters

ParameterTypeDefaultDescription
modestringsearchsearch, video or comments.
keywordsarray["python"]Bilibili search queries, used in search mode. Chinese or English, one video list per keyword.
videoUrlsOrIdsarray["BV1rpWjevEip"]Video URLs, BV ids or av ids, used in video and comments mode.
maxItemsinteger50search: videos per keyword (1 to 5000). comments: comments per video. video: total videos.
proxyConfigurationobjectno proxyBilibili'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.

ItemsPrice
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 daily search run and chart the movement.
  • UP主 and competitor monitoring: Pass your own and competitor video ids in video mode 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 ApifyClient
client = 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 than python 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.
  • search mode already includes play, like, favorites and danmaku counts. Use video mode 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 rpid when you run on a schedule.
  • Keep maxItems small 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.
  • comments mode returns top-level comments. Replies under a comment are counted in replyCount but 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.

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.


哔哩哔哩视频采集器 / 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)으로 매일 자동 수집도 가능합니다.