Bilibili Scraper: Videos, Danmaku & Comments (B站) avatar

Bilibili Scraper: Videos, Danmaku & Comments (B站)

Pricing

from $2.00 / 1,000 videos

Go to Apify Store
Bilibili Scraper: Videos, Danmaku & Comments (B站)

Bilibili Scraper: Videos, Danmaku & Comments (B站)

Search Bilibili (B站) videos by keyword or fetch by URL: titles, stats, tags, uploader, danmaku bullet comments and hot comment threads. No login or cookies. From $2 per 1,000 videos.

Pricing

from $2.00 / 1,000 videos

Rating

0.0

(0)

Developer

xiao liang

xiao liang

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

19 days ago

Last modified

Security

Limited permissions

Share

Search Bilibili (哔哩哔哩, B站) videos by keyword or fetch them by URL and get clean JSON: title, description, tags, uploader, publish time, duration and full stats (views, likes, coins, favorites, shares, danmaku and comment counts). Optionally add the danmaku (弹幕) bullet comments with their position in the video, and the hot comment threads.

  • No login, no cookies. Only public data. Your account is never involved.
  • Cheap. $2 per 1,000 videos, danmaku $3 per 1,000 videos (all danmaku of a video for one price).
  • Fast. Runs without proxies by default; results start in seconds.

Input

FieldDescription
searchKeywordsKeywords to search, Chinese or English, e.g. ["机器学习", "EV review"]
videoUrlsVideo URLs, BV1... ids or av... ids
maxResultsPerKeywordResults per keyword (default 20, up to 1,000)
sorttotalrank (relevance), click (views), pubdate (newest), dm (most danmaku), stow (most favorited)
includeDanmaku, maxDanmakuAdd danmaku for each video
maxComments, includeRepliesAdd hot comment threads (see limits)
{
"searchKeywords": ["机器学习"],
"maxResultsPerKeyword": 50,
"sort": "click",
"includeDanmaku": true
}

Output

Every dataset item has a type: video, danmaku, comment or error.

{
"type": "video",
"bvid": "BV1owrpYKEtP",
"url": "https://www.bilibili.com/video/BV1owrpYKEtP",
"title": "【官方中英】2025年公认最好的【吴恩达机器学习课程】...",
"author": {"mid": 3493134768016008, "name": "吴恩达AI_AndrewNg"},
"published_at": "2025-01-04T08:38:47+00:00",
"duration_sec": 83096,
"tags": ["pytorch", "人工智能", "机器学习"],
"category": "计算机技术",
"stats": {"views": 4601796, "likes": 34463, "favorites": 93668, "danmaku": 8104, "comments": 2498}
}
{"type": "danmaku", "bvid": "BV1owrpYKEtP", "text": "跟不上,根本跟不上", "video_time_sec": 295.68, "color": "#ffffff", "sent_at": "2025-10-11T14:20:54+00:00"}

Videos fetched by URL also include coins, shares, cid and the list of pages (parts).

Use cases

  • Market and brand research in China: what is being said about a product, brand or topic on Bilibili, with view and engagement numbers.
  • Danmaku analysis: viewer reactions at the exact second they happen, for sentiment analysis, highlight detection or LLM summaries.
  • Creator and content discovery: find the most viewed or newest videos for a keyword.

Use it from code, n8n or an AI agent

from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("xiaoliang527/bilibili-video-danmaku").call(
run_input={"searchKeywords": ["机器学习"], "maxResultsPerKeyword": 20, "includeDanmaku": True})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
if item["type"] == "video":
print(item["title"], item["stats"]["views"])

MCP (Claude, Cursor): https://mcp.apify.com?tools=xiaoliang527/bilibili-video-danmaku with your Apify token as Bearer header.

Pricing

EventPrice
Video$0.002 ($2 / 1,000)
Danmaku for one video (up to maxDanmaku)$0.003
Comment$0.0005

Errors (invalid URL, deleted video) are reported with type: "error" and not charged. Set a maximum cost per run in the run options and the Actor stops cleanly when it is reached.

Limits

  • Without login Bilibili only shows the top hot comment threads of a video (about 3 root comments plus their replies). Full comment sections are not available.
  • The danmaku endpoint returns the most recent part of the danmaku pool (usually up to a few thousand per video), not the full history.
  • Search returns at most 1,000 results (50 pages) per keyword, like the Bilibili website.
  • Only public data is collected. No private, members-only or deleted content.