Bilibili 哔哩哔哩 B站 Scraper — Videos, Search & Trends avatar

Bilibili 哔哩哔哩 B站 Scraper — Videos, Search & Trends

Pricing

from $3.48 / 1,000 results

Go to Apify Store
Bilibili 哔哩哔哩 B站 Scraper — Videos, Search & Trends

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

lijinyu

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

an hour ago

Last modified

Categories

Features

Limited permissions

Share

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:

FieldExample
bvidBV1rpWjevEip
aidnumeric video id (the av number)
cidnumeric chapter id — populated in video, popular and ranking modes; null in search mode
titlevideo title, highlight tags stripped
descriptionfull description text
urlcanonical watch URL
cover_urlhttps cover image
categorye.g. 计算机技术
tagscomma separated tag list
duration / duration_seconds03:17:23 / 11843
published_atISO 8601, UTC
author.mid / author.name / author.avataruploader profile
stats.viewsplay count
stats.likes / stats.coins / stats.favorites / stats.sharesengagement
stats.danmakubullet-comment count
stats.commentsreply count
source / keywordhow this row was found
scraped_atISO 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:

FieldExample
comment_id3760801399 (string — Bilibili ids exceed the JS safe integer range)
video_aid / video_bvid / video_title / video_urlthe video the comment belongs to
parent_id0 for a top-level comment, the parent comment id for a nested reply
is_sub_replytrue when the comment is a reply under another comment
textcomment body, Chinese kept as-is
like_count / reply_countlikes on the comment, replies under it
author.mid / author.name / author.avatar / author.levelcommenter profile
is_vipwhether the commenter is a Bilibili VIP
published_atISO 8601, UTC
sourcealways comments
scraped_atISO 8601, UTC

Modes

ModeWhat it doesTypical use
searchKeyword search across many keywords and pagesTrend and content research, competitor mapping
videoFull details for a list of BVIDsEnriching a known video list
popularThe current trending feed, paginatedDaily trend monitoring, content ideation
rankingCategory ranking (rid)Niche leaderboards
commentsComments 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:

EventCharged forPrice (FREE tier)
resultone video record (search / video / popular / ranking)$0.004
commentone 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 pages values may hit platform rate limits; the actor retries with backoff.
  • Duration for multi-part collections reports the collection total, as Bilibili does.
  • cid is null in search mode only: the search endpoint does not return the chapter id. video, popular and ranking all populate it (verified on real runs: popular 20/20, ranking 20/20, search 0/15).
  • comments mode uses the cursor endpoint /x/v2/reply/main (20 comments per page, hot or newest order). Comments are de-duplicated by comment_id across pages and across videos, and the old /x/v2/reply endpoint is only a fallback — in anonymous runs it returns ~3 records.
  • includeReplies: false skips the replies nested under top-level comments; parent_id tells you which comment a reply belongs to.
  • comments mode without bvids reads the current trending feed — this is the default input (the schema defaults bvids to []) 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 pin bvids if you need a reproducible dataset.
  • bvids in comments mode may hit Bilibili's risk control (HTTP 412) on datacenter IPs. Bilibili throttles the /x/web-interface/view lookup 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 feed and 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_bvid will 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 the BILI_API_BASE environment 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.