What it does
Bilibili (哔哩哔哩, B站) is where much of China's gaming, anime, tech and youth culture lives, but its interface is Chinese-only and its web API needs request signing and passes anti-bot checks. This actor handles that for you and needs no login, no cookies and nothing to configure.
Give it keywords in Chinese or English, specific video URLs, BV ids or av ids, or switch on the popular feed (热门). Each video row includes views, likes, coins (投币), favorites, shares, danmaku (弹幕) count and comment count, plus tags, category, duration, publish time, cover image, the uploader's channel and their follower count. Optionally, includeComments attaches a sample of top and newest comments, anonymised to text, time and likes.
It is used for China influencer and KOL discovery, brand and campaign monitoring, competitor content research and gaming or anime trend analysis. Videos cost $4 per 1,000 and anonymised comments $0.50 per 1,000. Text comes back in its original language, mostly Simplified Chinese, and is not translated.
How it works
- Keyword searches run against Bilibili's own search with your chosen
sortByorder, up tomaxVideosper term (Bilibili caps search at 1,000 results per term). - Each search hit is enriched with a per-video detail lookup to add coins, shares, tags and the uploader's follower count.
- Video URLs, BV ids and av ids in
videoUrlsare fetched directly; deleted, private or region-locked videos are skipped and never charged. - With
includePopularon, the current popular feed is added, again up tomaxVideos. - With
includeCommentson, about 60 top and newest comments per video (including replies) are attached, with commenter names, IDs and avatars removed.
Input example
A typical run input (JSON). Every field is also available as a form in the Apify console.
{
"searchTerms": [
"原神",
"iPhone 17 review"
],
"maxVideos": 50,
"sortBy": "click",
"includePopular": true,
"includeComments": false
}All input fields
| Field | Type | Required | Default | What it does |
|---|---|---|---|---|
searchTerms | array | no | Keyword video search, Chinese or English (e.g. '原神', 'iPhone 17 review'). Each term returns up to Max videos. | |
videoUrls | array | no | Specific videos: bilibili.com/video/BV… URLs, BV ids or av ids. Unavailable or deleted videos are skipped and never charged. | |
includePopular | boolean | no | false | Also fetch Bilibili's current popular/trending videos (热门), up to Max videos. |
maxVideos | integer | no | 20 | Stop after this many videos per term (and for the popular feed). You pay per video: 100 videos = $0.40. |
sortBy | string | no | "totalrank" | How search results are ordered. |
includeComments | boolean | no | false | Attach a sample of top and newest comments with replies (about 60 per video): text, time and likes only. Commenter names and IDs are never returned. $0.50 per 1,000 comments. |
Output example
Every video becomes one row with Bilibili's full engagement stats, tags and the uploader's follower count, as in this sample:
| bvid | title | views | likes | coins | danmakuCount | uploaderName | uploaderFollowers | tags |
|---|---|---|---|---|---|---|---|---|
| BV17x411w7KC | 【MV】保加利亚妖王AZIS视频合辑 | 45826694 | 943353 | 295002 | 915679 | 冰封.虾子 | 62936 | 保加利亚妖王, azis, mv … |
| BV1MHJB63Emv | 不是 AI 特效!这才是《中国功夫》的魅力! | 1638241 | 180301 | 75203 | 1987 | 含亮老师 | 1647453 | 武术, 功夫, 传统武术 … |
| BV1j5nj68E48 | 【英雄联盟】K/DA官方MV - “FIRESTARTER(燃)”正式上线 | 578582 | 38951 | 32581 | 2308 | 英雄联盟 | 3020945 | 英雄联盟, LOL, 英雄联盟音乐赛季 … |
Pricing
Pay per event: you are charged only for the results you receive, with no subscription. Set a maximum total charge on any run and it stops cleanly at the cap.
| Charged for | When | Price | Per 1,000 | Worked example |
|---|---|---|---|---|
| Video result | Charged per video delivered (full stats, tags and uploader followers included) | $0.004 | $4 | 100 videos = $0.40; 1,000 videos = $4.00 |
| Comment result | Charged per anonymised comment (only when Include top comments is on) | $0.0005 | $0.50 | 100 videos with ~60 comments each ≈ 6,000 comments = $3.00 (+ $0.40 for the videos) |
| Actor Start (platform start fee) | Charged when the Actor starts running. Number of events charged depends on Actor memory (one event per GB, minimum one event). | $0.00005 | — | One run at up to 1 GB = $0.00005 (charged as one event) |
Prices are read from the live Apify Store listing when this page is built. The listing is always authoritative.
Try Bilibili Video & Comment Scraper on Apify. Pay only for the results you get.
Run on Apify →Use cases
KOL and influencer discovery in China
Search a product category or game title and sort by most viewed to find the uploaders who dominate it. The uploader follower count on every row lets you size creators without opening each channel.
Campaign and brand monitoring
Track videos mentioning your brand or a competitor and compare coins, favorites and danmaku, which on Bilibili signal stronger engagement than views alone.
Trend research from the popular feed
Turn on includePopular and run on a schedule to record what is currently 热门, with tags and categories that show which topics are rising.
Audience reaction samples
Switch on includeComments for a set of videos to get a sample of top and newest comments for qualitative or sentiment work, with no commenter identities in the data.
How it compares
| ActorForge Bilibili Scraper | Browsing bilibili.com | Building your own client | |
|---|---|---|---|
| Login or cookies needed | No | No for browsing | Depends |
| Request signing and anti-bot checks | Handled | Not applicable | You maintain it |
| Coins, favorites, danmaku per video | Yes | Visible, by hand | Yes, if you build it |
| Uploader follower count on every row | Yes | Separate page | Extra calls |
| Full comment threads | No, about 60 per video sample | Logged-in users see more | Needs login |
| Subtitles and 排行榜 ranking chart | No (need login) | Yes, logged in | Needs login |
| Cost | $4 per 1,000 videos | Free, slow | Free, but engineering time |
If you need full comment threads, subtitles or the 排行榜 ranking chart, a logged-in Bilibili account is the only route and this actor will not provide them. For public video stats at scale without an account, it saves you maintaining signing and anti-bot code.
Limits and honest notes
- Public data only, no login: videos, stats and channel info that any visitor can see.
- Comments are a SAMPLE, not the full thread. Without a login Bilibili shows guests only a few top and newest comment threads, about 60 comments per video including replies. Commenter names, user IDs and avatars are never returned, only text, time and likes.
- Subtitles/CC tracks and the ranking chart (排行榜) need a logged-in account on Bilibili, so they are not included. Use the popular feed for trending videos.
- Keyword search returns up to 1,000 results per term (Bilibili's own cap: 50 pages × 20).
- Search rows are enriched with a per-video detail lookup. If that lookup fails, the video is still delivered with search-level stats (coins, shares and uploader followers are null).
- Deleted, private or region-locked video URLs/BV ids are skipped and never charged.
- Text is returned in its original language (mostly Simplified Chinese) and is not translated.
- Respects your run budget: set a maximum total charge and the actor stops cleanly at the cap.
FAQ
Can I scrape Bilibili without logging in?
Yes. The actor uses only public data any visitor can see: videos, stats and channel info. It needs no account, no cookies and no configuration.
How many Bilibili search results can I get per keyword?
Up to 1,000 per term, which is Bilibili's own cap (50 pages of 20). Set maxVideos to control how many you take; it ranges from 1 to 1,000.
Does it return all comments on a Bilibili video?
No. Without a login Bilibili shows guests only a few top and newest threads, so you get a sample of about 60 comments per video including replies. Only text, time and likes are returned; commenter names, user IDs and avatars never are.
What are coins and danmaku in the output?
Coins (投币) are a Bilibili-specific way viewers reward a video, and danmaku (弹幕) are the comments that scroll over the video while it plays. Both are returned per video alongside views, likes, favorites and shares.
Are titles translated into English?
No. Titles, tags and comments are returned in their original language, mostly Simplified Chinese. Pass them to your own translator or LLM if you need English.
Use it from code
Run the actor through the Apify API with the input above.
cURL
curl -X POST "https://api.apify.com/v2/acts/actor-forge~bilibili-scraper/run-sync-get-dataset-items" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"searchTerms": ["原神", "iPhone 17 review"], "maxVideos": 50, "sortBy": "click", "includePopular": true, "includeComments": false}'JavaScript (Node.js)
// Node.js 18+ (built-in fetch). Set APIFY_TOKEN in your environment.
const input = {
"searchTerms": [
"原神",
"iPhone 17 review"
],
"maxVideos": 50,
"sortBy": "click",
"includePopular": true,
"includeComments": false
};
const res = await fetch(
"https://api.apify.com/v2/acts/actor-forge~bilibili-scraper/run-sync-get-dataset-items",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.APIFY_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify(input),
}
);
const items = await res.json();
console.log(items.length, items[0]);Python
# pip install apify-client (set APIFY_TOKEN in your environment)
import os
from apify_client import ApifyClient
client = ApifyClient(os.environ["APIFY_TOKEN"])
run_input = {
"searchTerms": [
"原神",
"iPhone 17 review"
],
"maxVideos": 50,
"sortBy": "click",
"includePopular": True,
"includeComments": False
}
run = client.actor("actor-forge/bilibili-scraper").call(run_input=run_input)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)The run-sync-get-dataset-items endpoint waits for the run (up to 5 minutes) and returns the dataset rows directly. For longer runs, start the run asynchronously and read the dataset when it finishes, as the Python example does. Replace APIFY_TOKEN with your own token from the Apify console.
Related actors
China Trending Topics — Weibo, Douyin, Baidu Hot Search
Real-time trending topics from China's top five platforms in one dataset: Weibo hot search (微博热搜), Douyin hot list (抖音热榜), Baidu hot search (百度热搜)…
$2 per 1,000 · topic resultDouyin Trending & Hot Search — 抖音热榜 Real-Time List
Real-time Douyin hot list (抖音热榜): rank, topic, heat value, label, topic ID, cover image and search link for every trending topic on Chinese TikTok.…
$2 per 1,000 · topic resultWeibo Hot Search — 微博热搜 Real-Time Trending List
Real-time Weibo hot search list (微博热搜榜): rank, topic, heat count, badge (新/热/沸/爆) and search link for every trending topic. Ads removed. No login or…
$2 per 1,000 · topic resultYouTube Search Scraper (Official API) — Videos by Keyword
Bring your own free YouTube API key. YouTube search by keyword with sort, date, region, language and length filters — every result enriched with…
$0.30 per 1,000 · video resultTry Bilibili Video & Comment Scraper on Apify. Pay only for the results you get.
Run on Apify →