Bilibili Video Scraper
Pricing
from $3.00 / 1,000 results
Bilibili Video Scraper
Scrape Bilibili (bilibili.com) - China's largest video platform. Search videos (title, author, view counts, duration, cover), fetch single video details by bvid/aid/URL, popular feed, and partition rankings - all through public api.bilibili.com endpoints, no login required.
Pricing
from $3.00 / 1,000 results
Rating
0.0
(0)
Developer
Crawler Bros
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
5 days ago
Last modified
Categories
Share
Scrape Bilibili — China's largest video platform — via its public api.bilibili.com endpoints (no login). Search videos by keyword, fetch single video details by bvid / aid / URL, get the popular feed, or partition rankings. Output includes title, author, view counts, duration, cover image, publish time and tags.
What this actor does
- Four modes:
search(default),byVideoUrl,popular,ranking - Search ordering (
order): total rank / most viewed / newest / most danmaku / rating score - 15 ranking partitions as a dropdown (rid): all, anime, music, game, entertainment, knowledge, guichu, dance, fashion, life, movie, digital, food, animal, car — every option verified against the live ranking API
- Search partition filter (
tids) and search duration filter (duration: <10 / 10-30 / 30-60 / >60 min), both verified against the live search API - buvid bootstrap: visits bilibili.com once to obtain the
buvid3cookie the search API requires - Web-search HTML fallback (search.bilibili.com SSR cards, with full title/author/views/duration/cover parsing) if the search API rate-limits
- Filters: min view count, title/description/author keyword
- Auto-escalation: lazy-engages Apify AUTO datacenter proxy on 403/429/5xx; retries with backoff (bilibili is latency-flaky)
- Empty fields are omitted; every record carries
sourceUrl,scrapedAt,recordType
Output per video
bvid,aidtitle(HTML<em>keywords stripped),descriptionauthor,authorMidviewCount,danmaku,replyCount,favorites,likeCount,coinCount,shareCountduration(seconds),durationText(3:17:23)coverUrl(hdslb CDN, https-normalized),publishTime(UTC ISO)typeName(partition label),uploadRegion(upload location, when published),pageCount(multi-part videos),resolution(1920x1080)tags[](search mode)publishDate(YYYY-MM-DD, HTML-fallback records only; relative SSR labels like "5小时前" are dropped — only real dates are emitted)videoUrl,recordType: "video" | "error",scrapedAt
Input
| Field | Type | Default | Description |
|---|---|---|---|
mode | select | search | search / byVideoUrl / popular / ranking |
searchQuery | string | python | Keyword (mode=search) |
videoUrls | array | – | Video URLs (mode=byVideoUrl) |
bvids | array | – | BV IDs (mode=byVideoUrl) |
aids | array | – | Numeric video IDs (mode=byVideoUrl) |
rid | select | 0 | Ranking partition (15 options) |
order | select | totalrank | Search sort |
tids | select | 0 | Search partition filter |
duration | select | 0 | Search duration range |
minViewCount | int | – | View-count floor |
containsKeyword | string | – | Title/description/author substring filter |
maxItems | int | 20 | Hard cap (1–500) |
Example: most-viewed Python tutorials
{"mode": "search","searchQuery": "python","order": "click","minViewCount": 100000,"maxItems": 15}
Example: 30-60 minute food videos from the food partition
{"mode": "search","searchQuery": "美食","tids": "211","duration": "3","maxItems": 10}
Example: single video
{"mode": "byVideoUrl","videoUrls": ["https://www.bilibili.com/video/BV1wD4y1o7AS/"]}
Example: music ranking
{"mode": "ranking","rid": "3","maxItems": 20}
Cover images
Cover URLs point at i*.hdslb.com — verified HTTP 200 image/jpeg from a clean shell (no Referer/cookies); protocol-relative and http:// URLs are normalized to https://.
Anti-bot notes
api.bilibili.comsearch endpoints require abuvid3cookie — the actor bootstraps it by visiting bilibili.com first.- The platform rate-limits aggressively (
-799/-1200codes, intermittent timeouts) — retries with backoff are built in; web-search HTML is the fallback.
Data source
Public api.bilibili.com endpoints: x/web-interface/search/type, x/web-interface/view, x/web-interface/popular, x/web-interface/ranking/v2. No login required.
Limitations
- User-space video lists (
x/space/wbi/arc/search) require WBI request signing — not supported in v1. - The
资讯(news) and运动(sports) partitions and the invalid tid153were removed from the rid/tids dropdowns because the ranking/search APIs reject them (-400). - Search-mode
tidsanddurationfilters apply to the API path; if the search API rate-limits or times out mid-run (common — the platform is latency-flaky), the HTML fallback returns unfiltered results, so the filter may not hold on every run. Retrying the run usually returns the filtered set. - Garbage search queries: the platform returns real recommended videos instead of an empty result set, so an "impossible" query still yields real records (platform behavior, not a filter leak).
- Invalid bvids/URLs produce typed
recordType: "error"records (no silent drops).