Bilibili 哔哩哔哩 B站 Scraper — Videos, Search & Trends
Pricing
from $3.48 / 1,000 results
Bilibili 哔哩哔哩 B站 Scraper — Videos, Search & Trends
Scrape Bilibili (bilibili.com), China's largest video platform. Keyword search, video details, trending list and rankings. Returns 17 normalized fields per video: title, description, author, follower-facing engagement stats (views, likes, coins, favorites, shares, danmaku), duration, category, ta...
Pricing
from $3.48 / 1,000 results
Rating
0.0
(0)
Developer
lijinyu
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
an hour ago
Last modified
Categories
Features
Share
Bilibili Scraper — Videos, Search, Trends & Comments (China)
Scrape Bilibili (bilibili.com), China's largest video platform with 300M+ monthly users — the Chinese answer to YouTube. Get keyword search results, single video details, the trending feed, category rankings and video comments as clean JSON.
No cookies. No login. No proxy. No API key.
Why Bilibili data
Bilibili is where Chinese Gen-Z discovers products, learns skills and forms opinions. If you research the Chinese market, run influencer campaigns, or build a Chinese-language AI corpus, Bilibili is not optional — it is the primary source.
What you get
Video records
Every video is returned as one flat record with 17 normalized fields:
| Field | Example |
|---|---|
bvid | BV1rpWjevEip |
aid | numeric video id (the av number) |
cid | numeric chapter id — populated in video, popular and ranking modes; null in search mode |
title | video title, highlight tags stripped |
description | full description text |
url | canonical watch URL |
cover_url | https cover image |
category | e.g. 计算机技术 |
tags | comma separated tag list |
duration / duration_seconds | 03:17:23 / 11843 |
published_at | ISO 8601, UTC |
author.mid / author.name / author.avatar | uploader profile |
stats.views | play count |
stats.likes / stats.coins / stats.favorites / stats.shares | engagement |
stats.danmaku | bullet-comment count |
stats.comments | reply count |
source / keyword | how this row was found |
scraped_at | ISO 8601, UTC |
Comment records (comments mode)
Each comment is one flat record; nested replies are flagged, not nested into arrays, so the dataset stays tabular:
| Field | Example |
|---|---|
comment_id | 3760801399 (string — Bilibili ids exceed the JS safe integer range) |
video_aid / video_bvid / video_title / video_url | the video the comment belongs to |
parent_id | 0 for a top-level comment, the parent comment id for a nested reply |
is_sub_reply | true when the comment is a reply under another comment |
text | comment body, Chinese kept as-is |
like_count / reply_count | likes on the comment, replies under it |
author.mid / author.name / author.avatar / author.level | commenter profile |
is_vip | whether the commenter is a Bilibili VIP |
published_at | ISO 8601, UTC |
source | always comments |
scraped_at | ISO 8601, UTC |
Modes
| Mode | What it does | Typical use |
|---|---|---|
search | Keyword search across many keywords and pages | Trend and content research, competitor mapping |
video | Full details for a list of BVIDs | Enriching a known video list |
popular | The current trending feed, paginated | Daily trend monitoring, content ideation |
ranking | Category ranking (rid) | Niche leaderboards |
comments | Comments of the given bvids — or of the trending videos when no BVID is passed (the default input) | Sentiment, audience language, AI corpora |
Pricing
Pay per event — you are charged for what the run actually produced:
| Event | Charged for | Price (FREE tier) |
|---|---|---|
result | one video record (search / video / popular / ranking) | $0.004 |
comment | one comment record (comments mode) | $0.0016 |
Volume tiers discount the same events: SILVER 95%, GOLD 87%, PLATINUM and DIAMOND 80%. A run also incurs the one-time apify-actor-start event. Nothing is charged for a record that was not written to the dataset, and the detail data of comments mode is charged as comments only — comments runs never emit result charges.
Input example
Video search:
{"mode": "search","keywords": ["python 教程", "机械键盘"],"pages": 2,"maxItems": 100}
Comments of two specific videos:
{"mode": "comments","bvids": ["BV1GJ411x7h7"],"pages": 2,"includeReplies": true,"sort": "hot","maxItems": 200}
Pinning bvids asks Bilibili for one lookup per video. From a cloud/datacenter IP that lookup can be answered with HTTP 412 — in that case the actor logs the block and falls back to the trending feed instead of failing the run (see Notes). The default comments input below never hits that lookup.
Comments of the current trending videos (no BVID needed — the default path):
{"mode": "comments","videosLimit": 5,"pages": 1,"maxItems": 100}
Output example
Real record from a search run:
{"source": "search","keyword": "python 教程","bvid": "BV1rpWjevEip","aid": 113006243481679,"title": "【全748集】目前B站最全最细的Python零基础全套教程","description": "...","url": "https://www.bilibili.com/video/BV1rpWjevEip","cover_url": "https://i2.hdslb.com/bfs/archive/a979056b1a32012c.jpg","category": "计算机技术","tags": "程序员,Python教程,Python入门零基础","duration": "39:58:14","duration_seconds": 143894,"published_at": "2024-08-22T14:59:18+00:00","author": { "mid": 3546597933714079, "name": "Python官方课程", "avatar": "https://i1.hdslb.com/..." },"stats": { "views": 22116348, "danmaku": 31200, "likes": 980000, "coins": 210000, "favorites": 640000, "shares": 41000, "comments": 28000 },"scraped_at": "2026-11-29T01:20:00+00:00"}
Real records from a comments run on BV1GJ411x7h7 (a top-level comment and one nested reply):
[{"comment_id": "3760801399","video_aid": "80433022","video_bvid": "BV1GJ411x7h7","video_title": "【官方 MV】Never Gonna Give You Up - Rick Astley","video_url": "https://www.bilibili.com/video/BV1GJ411x7h7","parent_id": "0","is_sub_reply": false,"text": "坏消息:被骗了\n好消息:真好听","like_count": 781358,"reply_count": 2802,"author": {"mid": "320773657","name": "老咸鱼A","avatar": "https://i1.hdslb.com/bfs/face/10fbeb658285067378c049b290988ab49c32aee5.jpg","level": 6},"is_vip": false,"published_at": "2020-11-29T12:26:45+00:00","source": "comments","scraped_at": "2026-11-29T04:28:32.921871+00:00"},{"comment_id": "4065967309","video_aid": "80433022","video_bvid": "BV1GJ411x7h7","video_title": "【官方 MV】Never Gonna Give You Up - Rick Astley","video_url": "https://www.bilibili.com/video/BV1GJ411x7h7","parent_id": "3760801399","is_sub_reply": true,"text": "坏消息:好消息\n好消息:坏消息","like_count": 43209,"reply_count": 0,"author": {"mid": "495970426","name": "-Megumin_","avatar": "https://i1.hdslb.com/bfs/face/57f64faa9a0c50bba4e88c38b04200e0fde543e2.jpg","level": 6},"is_vip": false,"published_at": "2021-02-05T17:40:23+00:00","source": "comments","scraped_at": "2026-11-29T04:28:32.921871+00:00"}]
Notes and limits
- Data is read from Bilibili's public web endpoints. Only publicly visible videos and comments are returned.
- Very large
pagesvalues may hit platform rate limits; the actor retries with backoff. - Duration for multi-part collections reports the collection total, as Bilibili does.
cidis null insearchmode only: the search endpoint does not return the chapter id.video,popularandrankingall populate it (verified on real runs: popular 20/20, ranking 20/20, search 0/15).commentsmode uses the cursor endpoint/x/v2/reply/main(20 comments per page, hot or newest order). Comments are de-duplicated bycomment_idacross pages and across videos, and the old/x/v2/replyendpoint is only a fallback — in anonymous runs it returns ~3 records.includeReplies: falseskips the replies nested under top-level comments;parent_idtells you which comment a reply belongs to.commentsmode withoutbvidsreads the current trending feed — this is the default input (the schema defaultsbvidsto[]) and it is the reliable path from a cloud IP, because it only calls/x/web-interface/popular, which is not rate-limited the way the per-video lookup is. Its output changes hour to hour, so pinbvidsif you need a reproducible dataset.bvidsincommentsmode may hit Bilibili's risk control (HTTP 412) on datacenter IPs. Bilibili throttles the/x/web-interface/viewlookup per IP; the same request from a home connection returns 200 while a cloud runner gets 412 on every attempt. The actor retries with backoff, and when the block persists it does not fail the run: it logs[comments] view API blocked (HTTP 412), falling back to popular feedand reads comments from the trending feed instead, so the run still returns data (charged per comment, exactly like the normal path).- What the fallback means for your dataset: the returned rows come from the trending videos, so
video_bvidwill not be the BVIDs you passed in — check the[comments] view API blocked (HTTP 412)line in the run log to tell the two paths apart. If you need comments of specific videos from a cloud IP, run the actor behind a residential/backbone proxy or run it locally: the API host is overridable with theBILI_API_BASEenvironment variable (e.g.BILI_API_BASE=https://your-proxy.example.com), which is the supported way to route around the block. - Export results as JSON, CSV or Excel from the dataset tab, or pull them with the Apify API.
Rate limiting and fallback
video mode resolves each BVID through three layers: the public view API,
then the signed wbi/view API, then a search/type lookup. On a cloud IP,
Bilibili frequently answers view with HTTP 412 — the actor logs
[video] view API blocked for BVxxx, trying fallback and moves to the next layer.
If all three fail for a given BVID it is skipped, not fatal:
[video] skipped N bvids due to rate limiting. The run still succeeds and returns
whatever resolved. For guaranteed coverage of specific videos, run locally or
through your own proxy.