Bilibili Scraper: Videos, Search, Uploaders & Comments avatar

Bilibili Scraper: Videos, Search, Uploaders & Comments

Pricing

$2.00 / 1,000 item returneds

Go to Apify Store
Bilibili Scraper: Videos, Search, Uploaders & Comments

Bilibili Scraper: Videos, Search, Uploaders & Comments

Search Bilibili by keyword, or export video stats, an uploader's videos and profile, or a video's top comments: views, likes, favorites, danmaku, tags and cover. $2 per 1,000 rows; no Bilibili login, failed inputs free.

Pricing

$2.00 / 1,000 item returneds

Rating

0.0

(0)

Developer

Changefeeds Tools

Changefeeds Tools

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

2 days ago

Last modified

Share

  • What you get: Bilibili videos with title, uploader, publish date, duration, views, likes, favorites, danmaku, reply count, tags and cover, from a keyword search, a list of videos, or an uploader's channel; plus uploader profiles and a video's top comments.
  • No Bilibili account: it calls the same public api.bilibili.com web API a logged-out browser uses, with WBI signing and risk-control handling built in.
  • Price: $2 per 1,000 rows (videos, profiles or comments). Failed and risk-controlled inputs are free.

Sample output

The prefilled input (search minecraft, 20 videos), run on 2026-10-23, returned 20 video rows. The first five:

bvidtitleowner_nameviewslikesduration_secondspublished_at
BV1jRnN6YExw"我的世界下架"了?!PCL被家长举报!从此禁止下载MC天才依山尽62,2001,9325062026-10-21
BV1NMnC6JEZE【MCYT/Dream/4K中字】速通者VS 6猎人 终赛【自剪辑版】苏维埃冰棺中的伊利亚67,0955,5712,7352026-10-22
BV1afnW6kEfXRust重写的Minecraft 26.3 还支持光影?Horizon试玩NyaCube2,136619222026-10-22
BV1xJn665EJv我是如何在这个 Minecraft 服务器里偷偷使用创造模式的ZplusGamerX1,034209182026-10-21
BV1PqnG6FE3V这MC模组应该要被永久封禁才对!我不该下载的...【Minecraft 我的世界】阿浪哥ahlangge54,9843,3531,1662026-10-20

The third row in full:

{
"type": "video",
"bvid": "BV1afnW6kEfX",
"aid": 117485844044682,
"url": "https://www.bilibili.com/video/BV1afnW6kEfX",
"title": "Rust重写的Minecraft 26.3 还支持光影?Horizon试玩",
"description": "外国佬做的rust重写mc java版 26.3,完成度挺高,估计烧了不少Token()\n支持mod和光影,但是和java版不通用,需要手动移植\n官网:https://playhorizon.dev\n视频配音:AI Hazel",
"owner_name": "NyaCube",
"owner_mid": 4111699,
"published_at": "2026-10-22T18:01:02.000Z",
"duration_seconds": 922,
"views": 2136,
"likes": 61,
"coins": null,
"favorites": 59,
"shares": null,
"danmaku": 4,
"reply_count": 16,
"tags": [],
"cover_url": "https://i2.hdslb.com/bfs/archive/75a2e7ac7e9dedf05c76094e8b9a6e5b4a933456.jpg",
"category": "单机游戏",
"scraped_at": "2026-10-23T03:49:50.756Z"
}

coins and shares come only from videos mode (the full /view endpoint); search and uploader results do not carry them, so they are null there.

How to run in 30 seconds

  1. Click Try for free. The input already holds the search keyword minecraft and 20 videos.
  2. Click Start. Our test run of that input took 15 seconds and cost $0.04 (20 videos).
  3. Open the Output tab, or export the dataset as CSV, JSON or Excel.

For your own data, change the keyword, or switch Mode to videos (paste BV ids, av ids, video URLs or b23.tv links), user (an uploader's mid or space.bilibili.com URL) or comments.

Pricing

  • $0.002 per row returned ($2 per 1,000 video, uploader or comment rows).
  • Free: failed inputs (not_found, invalid, risk_control, error).
  • If you set a maximum total charge, the actor stops cleanly once it is reached and says so in OUTPUT.stopped_reason ("max_total_charge_reached").

FAQ

Do I need a Bilibili account or cookie? No. Only the public, logged-out api.bilibili.com endpoints.

Can it download videos? No. Only metadata (title, stats, tags, cover URL).

Why did I get a risk_control status instead of data? Bilibili's anti-scraping layer rejected that request from this run's IP. Retry later or lower the volume; the row is free.

Can I search in English? Yes. Keywords are passed straight to Bilibili's own search; results follow what it returns for the term.

How is this a "bilibili api" client? Every mode is a thin export of a few Bilibili web-API endpoints (search, view, space listing, comments), so you do not have to implement WBI request signing yourself.

Limits

  • Public data only, no login. No private messages, no member-only content, no video or audio downloads.
  • Bilibili's risk control is real and IP-dependent. The uploader video list (/x/space/wbi/arc/search) and profile (/x/space/wbi/acc/info) endpoints can reject some IPs with HTTP 412 or code -352, even with correct WBI signing. The actor then reports a free risk_control row instead of crashing, and in user mode still emits what it could get (for example the follower count from /x/relation/stat, which is far more reliable).
  • Comments are capped by Bilibili, not by this actor. The logged-out /x/v2/reply/main endpoint returns only its small "hot comments" set (a handful of rows) and reports is_end: true at once; full threads need a logged-in session, which this actor does not use.
  • Counts are a snapshot. Views, likes and coins change between runs, as on the site.
  • It stays polite: at most 2 requests in flight, about 300 ms between requests, HTTP 429/5xx retried with backoff (Retry-After honoured up to 60 s, up to 3 retries), a desktop Chrome User-Agent and Referer https://www.bilibili.com, which is what the public API expects of a browser client.

Modes

search: videos matching a keyword

{ "mode": "search", "keywords": ["minecraft"], "maxItems": 20, "order": "totalrank" }

Each keyword is searched separately and paged until maxItems videos are collected or results run out. order is totalrank (comprehensive ranking, default), click (most viewed), pubdate (newest), dm (most danmaku) or stow (most favorited).

videos: details for specific videos

{ "mode": "videos", "urls": ["BV1m5aY69E8D", "av117342986110880", "https://b23.tv/BV1m5aY69E8D"], "includeTags": true }

Accepts BV ids (BV1xxxxxxxxx), av ids (av123456 or a bare number), full bilibili.com/video/... URLs and b23.tv short links (the redirect is followed).

user: an uploader's videos, profile and follower count

{ "mode": "user", "urls": ["686127", "https://space.bilibili.com/686127"], "maxItems": 50 }

Accepts a numeric mid, a space.bilibili.com/<mid> URL or a b23.tv short link. Emits the uploader's recent videos plus one profile row.

comments: a video's comments

{ "mode": "comments", "urls": ["BV1m5aY69E8D"], "maxComments": 100 }

Same video formats as videos mode. In practice this returns Bilibili's small "hot comments" preview (see Limits).

Output reference

A user row (live run, 2026-09-30):

{
"type": "user",
"mid": 686127,
"name": "籽岷",
"sign": "十四年的等待...",
"level": 6,
"followers": 5454479,
"following": 855,
"videos_count": 30,
"face_url": "https://i0.hdslb.com/bfs/face/7efb679569b2faeff38fa08f6f992fa1ada5e948.webp",
"scraped_at": "2026-09-30T04:28:08.401Z"
}

A comment row (live run, 2026-09-30):

{
"type": "comment",
"video": "BV1m5aY69E8D",
"rpid": 318812679792,
"author_name": "空悟明理",
"author_mid": 1759281120,
"text": "岷叔这种新内容介绍真不用写这么公式的稿子...",
"likes": 521,
"reply_count": 7,
"created_at": "2026-09-27T12:36:39.000Z"
}

A failed input gets a free status row instead:

{ "type": "status", "input": "686127", "mode": "user", "status": "risk_control", "error": "HTTP 412: request was banned (risk control)", "checked_at": "2026-09-30T04:28:08.401Z" }
  • not_found: the keyword or id resolved to nothing.
  • invalid: not a recognised BV id, av id, mid or URL.
  • risk_control: Bilibili's anti-scraping check rejected the request (HTTP 412, or a JSON code of -352/-412).
  • error: any other HTTP or network failure.

The key-value store record OUTPUT holds a run summary (counts, HTTP stats, stopped_reason, charged_events). Every run leaves at least one dataset row, even one where every input fails.

Troubleshooting: Bilibili v_voucher / -352 / 412 risk control

If you call Bilibili's logged-out web endpoints from a server and get a response with code: 0 but no real payload, just a v_voucher field where your data should be, you have hit Bilibili's risk control system (风控), not a bug. The same family of errors shows up as HTTP 412 or a -352 error code.

Why it happens

Bilibili publishes no official third-party API; community libraries reverse-engineer the endpoints the website and apps use. The risk-control layer looks at request volume, IP reputation and whether the client presents the cookies a real browser session would have. When suspicious, it answers 200 OK with code: 0 and a v_voucher token meant for a captcha flow a scraper cannot complete.

Free fixes

  • Get visitor cookies before calling data endpoints. Bilibili's frontend sets buvid3, buvid4 and b_nut via /x/frontend/finger/spi:
import requests
session = requests.Session()
resp = session.get("https://api.bilibili.com/x/frontend/finger/spi")
data = resp.json()["data"]
session.cookies.set("buvid3", data["b_3"])
session.cookies.set("buvid4", data["b_4"])
  • Send a real Referer and a browser-like User-Agent.
  • Throttle and add jitter between calls; velocity weighs heavily.
  • Spread volume across proxy IPs.

Bilibili tightens its rules periodically, so what works today may need adjusting.

What this actor does about it

Visitor-token handshake, residential proxy with IP rotation, and retries. Failed or risk-controlled inputs are not charged.