Disclosure: I built the Actor used in this tutorial, Bilibili Scraper on Apify.
Bilibili (哔哩哔哩, "B站") is where a big part of China's gaming, anime, tech and creator conversation happens. If you track a brand, a game launch or a topic in the Chinese market, you want three things from it: which videos match your keywords, what people say in the comments, and what's on the trending boards. Doing that by hand means a Chinese UI, login walls and pagination quirks.
This tutorial shows how to pull all three as clean JSON with one Actor, no Bilibili account needed.
What you get
Every row has the same shape, whatever mode you run:
{
"platform": "bilibili",
"type": "video",
"id": "BV1Wenc6aExW",
"url": "https://www.bilibili.com/video/BV1Wenc6aExW",
"text": "【原神】判测胜券本征,原魔战队表现排行 ...",
"authorName": "并非云某人",
"authorUrl": "https://space.bilibili.com/130929912",
"createdAt": "2026-10-20T18:01:45+08:00",
"views": 21338,
"likes": 810,
"comments": 239,
"favorites": 89,
"platformMetrics": { "danmaku": 273, "duration": 384, "tags": "原神UP主激励计划,搞笑,..." },
"keyword": "原神"
}
That's a real row from a search run for 原神 (Genshin Impact) on Oct 20, 2026. Comments come back as type: "comment" with a parentId pointing at the video, and trending items as type: "trend".
1. Search videos by keyword
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("s3nafps/bilibili-scraper").call(run_input={
"mode": "search",
"keywords": ["原神"],
"maxItems": 100,
"sort": "relevance",
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item["views"], item["likes"], item["text"][:60])
In my test run this returned 88 videos in about 31 seconds.
2. Pull comments (and replies) for a video
Pass a BV id or a video URL:
run = client.actor("s3nafps/bilibili-scraper").call(run_input={
"mode": "comments",
"urls": ["BV12ez4BHEDM"],
"maxItems": 20,
"includeReplies": True,
"commentSort": "hot",
})
You can also run mode: "details" with includeComments: true to get video stats and the top comments in one go.
3. Read a trending board
run = client.actor("s3nafps/bilibili-scraper").call(run_input={
"mode": "trending",
"trendingCategory": "game",
"maxItems": 10,
})
The game board run took about 14 seconds for 10 items.
4. Daily brand monitoring with only-new mode
Set onlyNew: true and give the job a monitorName. The Actor remembers what it already returned for that monitor, so a daily schedule on Apify only hands you videos you haven't seen yet. Pipe that into Slack, a sheet, or your agent.
run_input = {
"mode": "search",
"keywords": ["你的品牌名"],
"onlyNew": True,
"monitorName": "my-brand-daily",
"maxItems": 100,
}
Creator profiles
mode: "profiles" takes space.bilibili.com links or plain UIDs and returns one profile row each.
What it costs
It's pay per result, with no subscription. On Apify's free plan it's $2.50 per 1,000 videos or trending items, $1 per 1,000 comments, and $3 per 1,000 profiles, and it gets cheaper on higher Apify plans. So the 88-video search above works out to about $0.22.
Use it from an AI agent
Like any Apify Actor, it's callable over Apify's MCP server, so Claude, Cursor or your own agent can search Bilibili and read comments as a tool call.
Try it here: Bilibili Scraper on Apify. If a field you need is missing, tell me in the comments.














