Bilibili Scraper API - B站 哔哩哔哩 Videos, 弹幕 Danmaku & UP主 avatar

Bilibili Scraper API - B站 哔哩哔哩 Videos, 弹幕 Danmaku & UP主

Pricing

from $2.03 / 1,000 results

Go to Apify Store
Bilibili Scraper API - B站 哔哩哔哩 Videos, 弹幕 Danmaku & UP主

Bilibili Scraper API - B站 哔哩哔哩 Videos, 弹幕 Danmaku & UP主

📺 Scrape Bilibili (哔哩哔哩, B站) without login: keyword search with date, duration and category filters, full video stats, tags, UP主 profiles and uploads, comments and danmaku (弹幕). Deep search breaks the 1,000-result cap. B站数据采集,支持中英文关键词。Pay per result.

Pricing

from $2.03 / 1,000 results

Rating

5.0

(1)

Developer

Scrapifier

Scrapifier

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

3 days ago

Last modified

Share

English | 中文

Scrape Bilibili (哔哩哔哩, B站) by keyword, video URL, creator space URL or trending board, and export videos, UP主 profiles, comments and danmaku as JSON, CSV or Excel — or pull them straight from the API.

⚡ Up to 50 fields per video: title, description, tags, category 分区, length, publish date, the full engagement set — views 播放, danmaku 弹幕, comments 评论, likes 点赞, coins 投币, favourites 收藏, shares 分享 — plus ready-made engagement rates, the creator and their follower count, joint-upload collaborators 联合投稿, reuse rights, Bilibili's own content notices (e.g. 含AI生成内容) and how many people are watching right now. Search in Chinese or English, filter by date, length and category, and let deep search split a keyword by category, then publication date, then length, then sort order to go far past Bilibili's ~1,000-result ceiling: 12,000 unique videos from a single keyword in our test run, spanning 2017 to today. Also returns UP主 profiles (followers, uploads, verification, average views), comment threads and danmaku with the exact second each bullet comment appears — every part of a multi-part video included. No login, no cookies, no proxy, no browser, and you pay per result.

Apify Actor

🎯 Why scrape Bilibili?

  • China market research without an account: Bilibili has no public API and no open export. This Actor turns any keyword into a dated, structured dataset of what Chinese audiences actually watch and say.
  • Influencer marketing and UP主 discovery: find creators by keyword, rank them by followers and uploads, check verification, then pull their full upload history with views to size real reach before you pay for a placement.
  • Brand, game and product monitoring: track every new video mentioning your brand, game or product, with views, likes and comment counts, and re-run daily on a schedule.
  • Audience reaction analysis: danmaku (弹幕) carries the second of the video it belongs to. No other platform exposes where in a video the audience reacted — build retention and reaction curves from it.
  • Cross-border e-commerce and product research: watch 开箱 (unboxing) and review videos for a product category, read the comments, and see which features the Chinese audience actually discusses.
  • Competitive benchmarking: compare coins 投币 and favourites 收藏 — Bilibili's quality signals — not just raw view counts, across your channel and your competitors'.
  • AI and research datasets: build Chinese-language video, comment and danmaku corpora with dates, categories and engagement metadata attached.

📊 What data does the Bilibili Scraper extract?

Videos — one row per video

FieldDescription
bvid, aid, urlBV id, av id and the direct bilibili.com link
title, description, coverUrlTitle, description and cover image
duration, durationSecondsLength as displayed (6:47) and in seconds
publishedAt, publishedDate, uploadedAtPublication timestamp (UTC ISO 8601), date, and upload time
category, categoryIdBilibili zone 分区, e.g. 美食记录 (211)
views, danmakuCount, commentsPlay count 播放, danmaku count 弹幕, comment count 评论
likes, coins, favourites, shares点赞, 投币, 收藏, 分享
tags[]Video tags as set by the creator
creatorMid, creatorName, creatorUrl, creatorAvatarUP主 identity and space link
copyrightoriginal (自制) or repost (转载)
partCount, parts[]Multi-part videos: every P with its own id, title and length
widthPx, heightPxResolution
dynamicText, shortLink, publishLocationThe post text published with the video, the b23.tv link, the IP region shown
honours[]Badges such as 每周必看 or a ranking placement
likeRate, engagementRate, danmakuPerMinuteReady-made ratios: likes/views, (likes+coins+favourites+shares+comments)/views, danmaku per minute
staff[]Joint uploads 联合投稿: every collaborator with mid, name, role, space URL and followers
noticeMessageThe notice Bilibili displays on the video, e.g. 含AI生成内容 (AI-generated content) or 个人观点,仅供参考
allowsDownload, noReprint, noShare, isPaid, isCollaboration, isInteractive, is360Reuse rights and video kind
watchingNow, watchingNowWebPeople watching right now, when Add live viewer counts is on
creatorFollowers, creatorFollowing, creatorVideoCountCreator stats, when Add creator stats is on
trendingSource, trendingPosition, recommendedReasonBoard name, position and the reason shown, on trending rows
searchKeyword, matchedInputThe keyword, URL or board the row came from

cid, the full description, tags, copyright, parts, resolution, publishLocation and honours need Fetch each video's page (one extra request per video). Any field is null when Bilibili does not display it.

Creators (UP主) — one row per creator

FieldDescription
mid, name, url, avatarCreator id, name, space URL, avatar
signatureBio 签名
followers, following粉丝数 and 关注数
videoCount, articleCount, audioCount, albumCount, seasonCountUploads 投稿, 专栏, 音频, 相册, 合集
level, isSeniorMemberAccount level and 硬核会员 status
verifiedType, verifiedNotepersonal / organisation verification and its text
isLive, liveRoomId, liveRoomUrlLive status and room
latestVideos[]Recent uploads with title, URL, views, length and date
latestVideosAvgViews, lastUploadDateAverage views over those uploads, and when the creator last posted

Comments — one row per comment

commentId, parentCommentId, text, likes, replyCount, publishedAt, timeLabel, location (IP region), isTop (pinned), authorMid, authorName, authorUrl, authorAvatar, authorLevel, authorIsVip, authorSignature, likedByCreator, repliedByCreator, images[], plus the video context: videoId, videoUrl, videoTitle, videoViews, videoPublishedDate, creatorName.

Danmaku 弹幕 — one row per bullet comment

danmakuId, text, atSeconds and atTime (where it appears in the video), mode (scroll 滚动 / top 顶部 / bottom 底部 / reverse 逆向), fontSize, color, senderHash, sentAt, sentDate, pool, weight, action, plus the same video context block — and partPage / partTitle on multi-part videos, because every part's track is read, not just the first.

rank, keyword, displayName, iconUrl, searchUrl.

🚀 How to scrape Bilibili

  1. Open the Actor and type one or more Search keywords — Chinese or English both work (美食, genshin impact, 开箱).
  2. Pick the Data type: videos, creators, comments or danmaku. Videos is the default.
  3. Narrow with the filters: sort (relevance, newest, most played, most danmaku, most favourited, most commented), length, category 分区, published after / before.
  4. Optionally add Video URLs (a BV id, an av id, a bilibili.com link or a b23.tv share link) and Creator space URLs (https://space.bilibili.com/504799975 or just the id), or pick a Trending board (popular 综合热门, ranking 排行榜, newest in category 最新投稿, hot searches 热搜).
  5. Set Max rows (100 prefilled, 0 = no limit) — you pay per row, so keep a cap on your first run.
  6. Click Start. Each keyword is searched, split by publication date when it fills up, deduplicated by video id, and saved in batches of 100.
  7. Open the Storage tab to preview and export as JSON, CSV, Excel or XML, or read the dataset from the API.

The same run can be started from the Apify API, the Python or JavaScript client, the MCP server, or put on a schedule for daily monitoring.

📥 Input parameters

FieldKeyTypeDefaultDescription
Search keywordskeywordsarray of strings["genshin impact"]What to search. Chinese and English both work. One search per keyword.
Video URLs or IDsvideoUrlsarray of stringsnonehttps://www.bilibili.com/video/BV1p5p26fEWB, a BV id, an av id or a b23.tv link. Each one always gets its full page.
Creator space URLs or IDscreatorUrlsarray of stringsnonehttps://space.bilibili.com/504799975 or 504799975.
Data typedataTypeselectvideosvideos, creators, comments, danmaku.
Trending boardtrendingselectnonepopular, ranking, newest_in_category, hot_searches.
Sort search results bysortByselectrelevancerelevance 综合排序, newest 最新发布, most_played 最多播放, most_danmaku 最多弹幕, most_favourited 最多收藏, most_commented 最多评论.
Video lengthdurationselectanyunder_10min, 10_30min, 30_60min, over_60min.
Categories 分区categoriesselect (multiple)noneEach selected category is searched separately, so none is dropped. douga 动画, guochuang 国创, cartoon 动漫, music 音乐, dance 舞蹈, game 游戏, knowledge 知识, tech 科技数码, life 生活, food 美食, animal 动物圈, kichiku 鬼畜, fashion 时尚, ent 娱乐, cinephile 影视, documentary 纪录片, movie 电影, teleplay 电视剧, news 资讯, car 汽车, sports 运动.
Published after / beforepublishedAfter, publishedBeforedatenoneYYYY-MM-DD window, applied by Bilibili itself.
Deep searchdeepSearchbooleantrueSplits a full search by category, then publication date, then video length, then sort order, until the whole range is covered.
Fetch each video's pageincludeVideoDetailsbooleanfalseAdds description, tags, coins, favourites, shares, parts, resolution, publish location, honours.
Add creator statsincludeCreatorStatsbooleanfalseAdds creatorFollowers, creatorFollowing, creatorVideoCount to video rows.
Add live viewer countsincludeOnlineViewersbooleanfalseAdds watchingNow / watchingNowWeb (在线人数) to video rows.
Uploads per creatorcreatorVideosinteger0In Videos mode, uploads collected per creator URL. 0 = all of them.
Comments per videomaxCommentsPerVideointeger100Comments mode. 0 = as many as the feed serves.
Include reply threadsincludeCommentRepliesbooleanfalseAlso collects replies, linked by parentCommentId.
Comment ordercommentSortselecttoptop 热门 or newest 最新.
Danmaku per videomaxDanmakuPerVideointeger500Danmaku mode. 0 = every bullet comment served for the video.
Your Bilibili SESSDATAsessionCookiestring (secret)noneOptional, comments only — see the FAQ.
Max videos per searchmaxVideosPerSearchinteger0Per-keyword / per-board cap. 0 = none.
Max rows for the runmaxItemsinteger100Hard stop across every input. 0 = no limit.
Flatten nested fieldsflattenbooleanfalseOne text column per field, for clean CSV / Excel.
Report what each input returnedemitInputStatusbooleantrueAdds input_status to the run's OUTPUT record.
ProxyproxyConfigurationobjectoffNot needed. Only switch it on if you require a specific exit country.

📤 Output example

{
"type": "video",
"bvid": "BV1p5p26fEWB",
"aid": 117438364589696,
"url": "https://www.bilibili.com/video/BV1p5p26fEWB",
"title": "在黄山脚下小村庄吃只有3张桌子的农家菜,红烧仔鸡 臭鳜鱼 笋片烧肉",
"coverUrl": "https://i0.hdslb.com/bfs/archive/6f2ccf2fa6da4de1f1dd78a779e1ef4d87b3ec87.jpg",
"duration": "6:47",
"durationSeconds": 407,
"publishedAt": "2026-10-14T08:44:54Z",
"publishedDate": "2026-10-14",
"category": "美食记录",
"categoryId": 211,
"views": 161509,
"danmakuCount": 507,
"comments": 399,
"likes": 12170,
"coins": 443,
"favourites": 972,
"shares": 285,
"tags": ["种草", "农家菜", "臭鳜鱼", "美食推荐", "探店", "安徽美食", "黄山美食"],
"creatorMid": 504799975,
"creatorName": "达哥在上海",
"creatorUrl": "https://space.bilibili.com/504799975",
"creatorFollowers": 1298842,
"likeRate": 0.07535,
"engagementRate": 0.08749,
"danmakuPerMinute": 74.8,
"allowsDownload": true,
"noReprint": true,
"watchingNow": "179",
"searchKeyword": "美食",
"matchedInput": "美食"
}

A danmaku row:

{
"type": "danmaku",
"danmakuId": "2221957516483857664",
"text": "省流:我下去洗个澡",
"atSeconds": 0.0,
"atTime": "0:00",
"mode": "scroll",
"fontSize": 25,
"color": "#ffffff",
"sentAt": "2026-10-14T09:12:56Z",
"videoId": "BV1p5p26fEWB",
"videoTitle": "在黄山脚下小村庄吃只有3张桌子的农家菜…"
}

💡 Ready-to-run examples

Every example below was run before publishing and returns data as-is.

1. What is being published about a game, newest first

{
"keywords": ["genshin impact", "原神"],
"dataType": "videos",
"sortBy": "newest",
"includeVideoDetails": true,
"maxItems": 200
}

2. A whole keyword, past the 1,000-result ceiling

{ "keywords": ["原神"], "dataType": "videos", "deepSearch": true, "maxItems": 12000 }

Returned 12,000 unique videos spanning 2017 → today, across 88 sub-categories, in 19 searches, 321 requests and 3 min 21 s — and it stopped only because maxItems said so. A single search on that keyword returns ~725. input_status reports every slice and what it returned.

3. Find food UP主 to work with

{ "keywords": ["美食"], "dataType": "creators", "maxItems": 100 }

4. Everything one creator has uploaded

{
"creatorUrls": ["https://space.bilibili.com/504799975"],
"dataType": "videos",
"creatorVideos": 0,
"includeVideoDetails": true
}

5. Audience reaction, second by second

{
"videoUrls": ["https://www.bilibili.com/video/BV1p5p26fEWB"],
"dataType": "danmaku",
"maxDanmakuPerVideo": 1000
}

6. Comments on the videos a keyword returns

{
"keywords": ["扫地机器人"],
"dataType": "comments",
"maxVideosPerSearch": 20,
"maxCommentsPerVideo": 100,
"includeCommentReplies": true
}

7. Today's trending board, and the hot searches

{ "trending": "popular", "maxVideosPerSearch": 100 }
{ "trending": "hot_searches" }

8. New tech unboxings, 10–30 minutes, most played

{
"keywords": ["开箱"],
"categories": ["tech"],
"duration": "10_30min",
"publishedAfter": "2026-09-01",
"sortBy": "most_played"
}

💰 Pricing: how much does it cost to scrape Bilibili?

Pay per result, no subscription and no platform usage added on top:

Apify planPrice per 1,000 rows
Free / Starter$2.99
Bronze$2.63
Silver$2.39
Gold and above$2.03

A row is one video, one creator, one comment or one danmaku. Starting a run costs $0.00005. So 1,000 videos cost $2.99, 10,000 danmaku $29.90, and the 2,000-video deep search in example 2 costs $5.98. Set Max rows on your first runs to keep every run predictable.

⚙️ Performance, limits and reliability

  • No browser, no proxy, no login. Measured on the platform: 1,500 plain video rows in 27 seconds for $0.0022 of platform usage, and 1,000 fully enriched rows (video page + tags + creator stats) in 3 min 40 s for $0.021 — no proxy traffic at all.
  • Past the search ceiling. Bilibili serves roughly 1,000 results per search however you paginate it. Deep search cuts the keyword into disjoint slices — categories first (the highest-yield cut), then publication-date windows, then length bands, then the remaining sort orders — and deduplicates by video id: 12,000 unique videos from a single keyword in our test, spanning 2017 to today and 88 sub-categories, in 19 searches and 321 requests — against ~725 for a single search.
  • Nothing silently dropped. Select five categories and all five are searched, not just the first. Ask for a creator's uploads and the pagination runs to the last one. Ask for danmaku on a multi-part video and every part's track is read, merged and deduplicated.
  • Honest reporting. The input_status report in OUTPUT lists, per keyword, URL or board: rows collected, the number of results Bilibili announced, how many date windows the search was split into, and why anything came back empty. No silent empty run.
  • Long runs stay safe. The Actor watches the run timeout and finishes cleanly with the data already collected instead of being cut off, and it respects your max-cost-per-run setting.
  • Rate limits are handled with automatic back-off and retries; transient refusals are retried before anything is reported as an error.

🔌 Integrations and API

Export to JSON, CSV, Excel, XML or HTML, or call the Actor directly:

curl -X POST "https://api.apify.com/v2/acts/scrapifier~bilibili-scraper/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"keywords":["美食"],"dataType":"videos","maxItems":100}'

Works with the Apify Python and JavaScript clients, scheduling, webhooks, the MCP server for AI agents, and with Make, Zapier, n8n, LangChain, Google Sheets and Airtable.

❓ FAQ

Do I need a Bilibili account or cookies? No. Videos, creators, danmaku, trending boards and search all work with nothing. One exception: the public comment feed serves the top replies of each video. If you need entire comment threads, paste your own SESSDATA value, copied from a browser where you are logged in, into the optional SESSDATA field. The run tells you in OUTPUT when a video's comments were served partially.

Do I need a proxy? No. Leave the proxy off unless your own workflow requires a specific exit country.

How many results can one keyword return? Bilibili itself stops at about 1,000 per search. With deep search on, the only real limit is your maxItems: our test keyword returned 12,000 unique videos covering 2017 to today, and stopped only because maxItems said so.

Does it work with English keywords? Yes. genshin impact, minecraft or python tutorial all return results, and so does any Chinese keyword. Titles, tags and comments come back in their original language, unescaped and with the search highlighting removed.

Why is danmakuCount higher than the number of danmaku rows? danmakuCount is the lifetime counter displayed on the video. The player serves the danmaku currently in rotation for each segment of the timeline, and those are the rows you get.

Can I monitor a keyword or a creator every day? Yes — put the Actor on an Apify schedule, keep publishedAfter at yesterday's date, and send new rows to your warehouse or to Slack with a webhook.

Is this legal? The Actor reads only publicly displayed pages and data, the same a visitor sees, and it never signs in on your behalf. You are responsible for using the output in compliance with applicable laws and Bilibili's terms.

Trustpilot · Capterra · Quora · Airbnb · Vinted · StockX · GOAT · Glassdoor · Indeed


🇨🇳 Bilibili Scraper API — B站 哔哩哔哩数据采集API (中文)

English | 中文

B站(哔哩哔哩)数据采集工具:按关键词、视频链接、UP主空间链接或热门榜单采集 视频数据、UP主资料、评论和弹幕,一键导出 JSON、CSV、Excel,也可直接通过 API 调用。

⚡ 每条视频最多 50 个字段:标题、简介、标签、分区、时长、发布时间,完整互动数据——播放量、弹幕数、评论数、点赞、投币、收藏、分享,并直接给出互动率,还有 UP主及其粉丝数、联合投稿成员、转载/下载权限、B站标注的内容提示(如 含AI生成内容)以及当前在线观看人数。支持中英文关键词,可按发布时间、视频时长、分区筛选。开启深度搜索后,系统会按分区 → 发布时间 → 时长 → 排序方式自动拆分,突破 B站约 1,000 条的搜索上限:单个关键词实测取得 12,000 条去重视频,覆盖 2017 年至今。另外还可采集 UP主资料(粉丝数、投稿数、认证、平均播放)、评论楼层,以及带精确出现秒数的弹幕——多 P 视频的每一个分 P 都会采集。无需登录、无需 Cookie、无需代理、无需浏览器,按条计费。

🎯 为什么要采集 B站数据?

  • 中国市场调研:B站没有公开 API,也没有导出功能。本工具把任意关键词变成带时间、带结构的数据集,直接看到中国用户在看什么、说什么。
  • UP主筛选与达人营销:按关键词找 UP主,按粉丝数和投稿量排序,查看认证状态,再拉取其全部投稿和播放量,投放前先评估真实影响力。
  • 品牌 / 游戏 / 产品舆情监控:追踪每一条提及你品牌、游戏或产品的新视频,附带播放、点赞、评论数,可配合定时任务每天自动运行。
  • 观众反应分析:弹幕带有在视频中出现的秒数。这是 YouTube 和抖音都没有的信号,可用来绘制观众反应曲线和留存曲线。
  • 跨境电商与选品research:追踪某一品类的开箱和测评视频,读取评论,看清中国用户真正关心哪些卖点。
  • 竞品对标:对比投币和收藏这两个 B站特有的内容质量信号,而不只是播放量。
  • AI 语料与学术研究:构建带日期、分区和互动数据的中文视频、评论、弹幕语料库。

📊 能采集到哪些字段?

视频 — 每条视频一行

字段说明
bvid、aid、urlBV号、av号和视频直链
title、description、coverUrl标题、简介、封面图
duration、durationSeconds显示时长(6:47)与秒数
publishedAt、publishedDate、uploadedAt发布时间(UTC ISO 8601)、日期、投稿时间
category、categoryId分区名称与分区 id,例如 美食记录(211)
views、danmakuCount、comments播放量、弹幕数、评论数
likes、coins、favourites、shares点赞、投币、收藏、分享
tags[]视频标签
creatorMid、creatorName、creatorUrl、creatorAvatarUP主 mid、昵称、空间链接、头像
copyrightoriginal 自制 / repost 转载
partCount、parts[]多 P 视频:每个分 P 的 cid、标题、时长
widthPx、heightPx分辨率
dynamicText、shortLink、publishLocation投稿动态文案、b23.tv 短链、IP 属地
honours[]每周必看、排行榜等荣誉标识
likeRate、engagementRate、danmakuPerMinute现成的比率:点赞率、互动率(点赞+投币+收藏+分享+评论)/播放、每分钟弹幕数
staff[]联合投稿成员:mid、昵称、身份、空间链接、头像、粉丝数
noticeMessageB站在视频上展示的提示,如 含AI生成内容、个人观点,仅供参考
allowsDownload、noReprint、noShare、isPaid、isCollaboration、isInteractive、is360下载 / 转载 / 分享权限与视频类型
watchingNow、watchingNowWeb开启「在线观看人数」后附带
creatorFollowers、creatorFollowing、creatorVideoCount开启「补充 UP主数据」后附带
trendingSource、trendingPosition、recommendedReason榜单来源、榜上位置、推荐理由
searchKeyword、matchedInput该行来自哪个关键词 / 链接 / 榜单

其中 cid、完整简介、tags、copyright、分 P、分辨率、IP 属地和荣誉需开启「抓取视频详情页」(每条视频多一次请求)。B站未展示的字段返回 null。

UP主 — 每位 UP主一行

mid、name、url、avatar、signature 签名、followers 粉丝数、following 关注数、videoCount 投稿数、articleCount 专栏、audioCount 音频、albumCount 相册、seasonCount 合集、level 等级、isSeniorMember 硬核会员、verifiedType 认证类型(个人 / 机构)、verifiedNote 认证说明、isLive 是否直播中、liveRoomId、liveRoomUrl、latestVideos[] 最新投稿(标题、链接、播放量、时长、日期)、latestVideosAvgViews 近期平均播放、lastUploadDate 最近更新日期。

评论 — 每条评论一行

commentId、parentCommentId 父评论、text 内容、likes 点赞、replyCount 回复数、publishedAt 时间、timeLabel、location IP 属地、isTop 是否置顶、authorMid、authorName、authorUrl、authorAvatar、authorLevel 等级、authorIsVip 大会员、authorSignature 个性签名、likedByCreator UP主点赞、repliedByCreator UP主回复、images[] 评论图片,并附带视频上下文(videoId、videoUrl、videoTitle、videoViews、creatorName)。

弹幕 — 每条弹幕一行

danmakuId、text 内容、atSeconds / atTime 出现位置、mode 弹幕类型(滚动 / 顶部 / 底部 / 逆向)、fontSize 字号、color 颜色、senderHash 发送者哈希、sentAt 发送时间、pool 弹幕池、weight 权重、action,同样附带视频上下文;多 P 视频还带 partPage / partTitle,因为每个分 P 的弹幕都会采集,而不只是第一个。

热搜 — 每个热词一行

rank 排名、keyword 关键词、displayName、iconUrl、searchUrl。

🚀 使用步骤

  1. 在 Search keywords 中填入一个或多个关键词,中英文均可(美食、genshin impact、开箱)。
  2. 选择 Data type:videos 视频、creators UP主、comments 评论、danmaku 弹幕,默认 videos。
  3. 按需筛选:排序(综合、最新发布、最多播放、最多弹幕、最多收藏、最多评论)、时长、分区、发布时间区间。
  4. 也可填入 Video URLs(BV号、av号、视频链接或 b23.tv 短链)和 Creator space URLs(https://space.bilibili.com/504799975 或直接填 mid),或选择一个 Trending board(综合热门、排行榜、最新投稿、热搜)。
  5. 设置 Max rows(默认 100,0 表示不限)。按条计费,首次运行建议设置上限。
  6. 点击 Start。每个关键词会被搜索、在触顶时按发布日期自动拆分、按视频 id 去重,并每 100 条写入一次。
  7. 在 Storage 标签页预览并导出 JSON、CSV、Excel、XML,或通过 API 读取数据集。

同样的任务可通过 Apify API、Python / JavaScript 客户端、MCP Server 调用,或设置为每日定时运行。

💡 可直接运行的示例

1. 某游戏的最新相关视频

{ "keywords": ["原神", "genshin impact"], "dataType": "videos", "sortBy": "newest", "includeVideoDetails": true, "maxItems": 200 }

2. 突破 1,000 条上限,采集一整个关键词

{ "keywords": ["原神"], "dataType": "videos", "deepSearch": true, "maxItems": 12000 }

实测返回 12,000 条去重视频,覆盖 2017 年至今、88 个子分区,共 19 次搜索、321 次请求,用时 3 分 21 秒,且只是因为达到 maxItems 才停止——同一关键词单次搜索仅约 725 条。input_status 会报告每个切片的采集结果。

3. 寻找美食区 UP主

{ "keywords": ["美食"], "dataType": "creators", "maxItems": 100 }

4. 某位 UP主的全部投稿

{ "creatorUrls": ["https://space.bilibili.com/504799975"], "dataType": "videos", "creatorVideos": 0, "includeVideoDetails": true }

5. 逐秒观众反应(弹幕)

{ "videoUrls": ["https://www.bilibili.com/video/BV1p5p26fEWB"], "dataType": "danmaku", "maxDanmakuPerVideo": 1000 }

6. 关键词相关视频的评论

{ "keywords": ["扫地机器人"], "dataType": "comments", "maxVideosPerSearch": 20, "maxCommentsPerVideo": 100, "includeCommentReplies": true }

7. 今日热门与热搜

{ "trending": "popular", "maxVideosPerSearch": 100 }
{ "trending": "hot_searches" }

8. 科技区 10–30 分钟开箱视频,按播放量排序

{ "keywords": ["开箱"], "categories": ["tech"], "duration": "10_30min", "publishedAfter": "2026-09-01", "sortBy": "most_played" }

💰 价格:采集 B站数据要多少钱?

按条计费,无订阅,不额外收取平台用量费用:

Apify 套餐每 1,000 条
Free / Starter$2.99
Bronze$2.63
Silver$2.39
Gold 及以上$2.03

一条 = 一个视频 / 一位 UP主 / 一条评论 / 一条弹幕。启动一次任务 $0.00005。即:1,000 条视频 $2.99,10,000 条弹幕 $29.90,示例 2 中 2,000 条视频的深度搜索 $5.98。首次运行建议设置 Max rows。

⚙️ 性能与稳定性

  • 无浏览器、无代理、无需登录:平台实测 1,500 条基础视频数据 / 27 秒,平台用量 $0.0022;1,000 条完整字段数据(含详情页、标签、UP主数据)/ 3 分 40 秒,平台用量 $0.021,代理流量为 0。
  • 突破搜索上限:B站单次搜索约 1,000 条封顶。深度搜索按分区 → 发布时间 → 时长 → 排序方式递归拆分为互不重叠的切片,并按视频 id 全局去重,实测单关键词取得 12,000 条去重视频,覆盖 2017 年至今、88 个子分区,仅用 19 次搜索、321 次请求(单次搜索仅约 725 条)。
  • 不会悄悄丢数据:选 5 个分区就搜 5 个分区,而不是只搜第一个;采集 UP主投稿会翻到最后一页;多 P 视频的弹幕会逐 P 采集、合并并去重。
  • 结果透明:OUTPUT 中的 input_status 会列出每个关键词、链接或榜单采集了多少条、B站声明的结果总数、搜索被拆分成了几个时间窗口,以及为空的原因,不会出现「成功但没有数据」。
  • 长任务安全:任务接近超时时会先保存已采集数据再正常结束,同时遵守你设置的单次运行费用上限。
  • 限流处理:自动退避重试,临时失败会先重试再上报。

🔌 API 与集成

支持导出 JSON、CSV、Excel、XML、HTML,也可直接调用:

curl -X POST "https://api.apify.com/v2/acts/scrapifier~bilibili-scraper/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"keywords":["美食"],"dataType":"videos","maxItems":100}'

兼容 Apify 的 Python / JavaScript 客户端、定时任务、Webhook、面向 AI Agent 的 MCP Server,以及 Make、Zapier、n8n、LangChain、Google Sheets、Airtable。

❓ 常见问题

需要 B站账号或 Cookie 吗? 不需要。视频、UP主、弹幕、榜单和搜索都无需任何凭证。唯一的例外是评论:公开评论接口只提供每个视频的热门楼层。如果需要完整评论楼层,可在可选的 SESSDATA 字段中填入你自己浏览器登录后的 SESSDATA 值。若某条视频的评论只取到部分,OUTPUT 会明确说明。

需要代理吗? 不需要。除非你的流程要求特定出口国家,否则保持关闭即可。

一个关键词最多能采集多少条? B站本身约 1,000 条封顶。开启深度搜索后,真正的上限只有你设置的 maxItems:测试关键词已取得 12,000 条去重视频(2017 年至今),仅因达到 maxItems 而停止。

支持英文关键词吗? 支持。genshin impact、minecraft、python tutorial 均可,中文关键词同样可用。标题、标签和评论按原文返回,已去除搜索高亮标记。

为什么 danmakuCount 比弹幕行数多? danmakuCount 是视频页显示的累计弹幕数,而弹幕行来自播放器当前为各时间段提供的弹幕。

可以每天监控一个关键词或一位 UP主吗? 可以。设置 Apify 定时任务,把 publishedAfter 设为前一天,再用 Webhook 把新数据推送到数据仓库或 Slack。

合规吗? 本工具只读取公开展示的页面和数据,与普通访客所见一致,不会代替你登录。请自行确保数据用途符合相关法律与 B站条款。

🔗 其他采集工具

Trustpilot · Capterra · Quora · Airbnb · Vinted · StockX · GOAT

💬 Support

Found a bug, a missing field or a keyword that returns nothing? Open an issue on the Actor's Issues tab with your input and the run id — 有问题请在 Issues 标签页反馈,附上输入参数和 run id。