Bilibili Scraper B站: Comments, Danmaku 弹幕 & Videos avatar

Bilibili Scraper B站: Comments, Danmaku 弹幕 & Videos

Pricing

from $5.00 / 1,000 comments

Go to Apify Store
Bilibili Scraper B站: Comments, Danmaku 弹幕 & Videos

Bilibili Scraper B站: Comments, Danmaku 弹幕 & Videos

Bilibili (哔哩哔哩, B站) scraper API: comments with full reply threads, danmaku (弹幕 bullet comments) from $1 per 1,000, videos, subtitles, creator profiles, search and trending. AI sentiment analysis. No login. B站爬虫 · 评论/弹幕采集 to JSON, CSV or Excel.

Pricing

from $5.00 / 1,000 comments

Rating

4.0

(1)

Developer

Divya Raj

Divya Raj

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

18 hours ago

Last modified

Share

What is Bilibili Scraper?

Bilibili Scraper is an Apify Actor that extracts public data from Bilibili (哔哩哔哩, B站) without a login: videos, comments and replies, danmaku (弹幕), creator profiles, search results and trending feeds, with optional AI sentiment analysis.

Scrape Bilibili (哔哩哔哩, B站), China's biggest video community for Gen Z, anime, gaming and tech. Get video stats, comments, danmaku (弹幕 bullet comments), creator profiles and uploads, search results and trending feeds as clean JSON, CSV or Excel. AI sentiment analysis that understands Bilibili slang is built in.

No browser and no login needed (only subtitles need one), and fast: 500 videos from a search take about 30 seconds.

Also known as: Bilibili API, B站爬虫, 哔哩哔哩数据采集, Bilibili comments scraper, Bilibili danmaku downloader.

What you can scrape

ModeOne row perLogin needed?
Videosvideo: title, views, likes, coins, favourites, shares, danmaku and comment counts, duration, uploader, category, tagsNo
Commentscomment or reply: text, likes, replies, author level, VIP and verification badges, pinned flag, "liked by uploader"No
Danmakubullet comment: text, playback second, colour, mode, send time, anonymised senderNo
Subtitlessubtitle track (including AI captions) with every cue and the full text; filter by language, all parts of multi-part videosYes
Creator profilescreator: followers, following, video count, total likes, level, verificationNo

Find videos from any mix of:

  • Video URLs or IDs: BV IDs, av IDs, bilibili.com/video/... and b23.tv short links
  • Search keywords: sort by relevance, views, newest, danmaku, favourites or comments, and filter by length and publish date
  • Creators: user IDs or space.bilibili.com links. Lists every upload, 100 per request.
  • Feeds: Popular (热门) and the top-100 Ranking (排行榜), overall or per category

Use cases

  • Brand and product monitoring in China: track what Bilibili users say about your brand, game, anime or gadget in comments and danmaku, with sentiment.
  • Game and anime launch tracking: follow reactions to a trailer or episode second by second through the danmaku timeline.
  • Influencer (UP主) research: compare creators by followers, views, likes and upload frequency before a campaign.
  • Market and trend research: collect the Popular feed, the top-100 Ranking or every video for a keyword, on a schedule.
  • AI and NLP datasets: Chinese comments, danmaku and subtitles as clean JSON for training, RAG or classification.

Why this scraper

  • 💬 More danmaku per video. Bilibili serves anonymous visitors two different danmaku pools: a lifetime sample and the most recent few thousand. They barely overlap. This Actor merges both, which in testing returned 5,416 danmaku where a single source gave 3,600.
  • 🗨️ Every comment and every reply, no login. Full comment pages sorted by hot or newest, and complete reply threads, not just the first 20 replies. From one test video: 200 top comments, or 10 comments with 3,001 replies.
  • 📊 Danmaku profiles at no extra charge. Add a reaction summary to every video row: danmaku count, unique senders, danmaku per minute, the busiest moment, a 20-slice timeline, the most repeated phrases and sample texts.
  • 🤖 Sentiment that reads Bilibili. Labels every comment and danmaku positive, neutral or negative (with a score from -1 to 1), and summarises each video. It knows that 笑死 and 泪目 are positive and that 典 and 急了 are mockery.
  • 🔁 Monitoring mode. "Only new items" skips everything earlier runs already returned, so a scheduled run only pays for what is new.
  • 💸 Cheap to run. Pure API calls at 256 MB of memory. It starts with no proxy and only switches to a proxy if Bilibili starts blocking.
  • 🧾 You never pay for errors. A deleted video or bad URL becomes a free error row and the run keeps going. Runs stop cleanly at your spending limit.

Do I need to log in?

Only for subtitles. Everything else, including every comment and reply, works without an account.

Without a loginWith a SESSDATA cookie
Videos, search, creators, feeds, danmaku, profiles, sentiment✅ everything✅
Comments and full reply threads✅ everything✅
Subtitles❌ (you get a free error row)✅

Bilibili hides subtitles from visitors who aren't logged in. A cookie also adds the commenter's IP region (location).

Getting the cookie for subtitles (desktop browser, 1 minute):

  1. Log in at bilibili.com.
  2. Press F12 to open DevTools, then open Application (Chrome or Edge) or Storage (Firefox), then Cookies → https://www.bilibili.com.
  3. Copy the value of the SESSDATA row. It is about 200 characters long.
  4. Paste it into the SESSDATA cookie input. Apify stores it encrypted.

Treat it like a password. We recommend a secondary account. Logging out of that browser session cancels the cookie.

How to use it

  1. Pick a mode (what each row should be).
  2. Add sources: video URLs, keywords, creator IDs or a feed.
  3. Click Start, then download the results as JSON, CSV, Excel or HTML, or read them through the API.

Example inputs

Comments with sentiment for the top 20 search results:

{
"mode": "comments",
"searchQueries": ["原神"],
"maxVideosPerSource": 20,
"includeReplies": true,
"sentimentAnalysis": true
}

The newest uploads of two creators, with a danmaku profile for each video:

{
"mode": "videos",
"startUrls": [{ "url": "https://space.bilibili.com/946974" }],
"userIds": ["2"],
"danmakuProfile": true,
"publishedAfter": "30 days"
}

A daily monitor of a keyword that only returns new videos:

{
"mode": "videos",
"searchQueries": ["AI 教程"],
"searchOrder": "pubdate",
"searchDuration": "short",
"onlyNewItems": true
}

Output example

A video row with a danmaku profile (shortened):

{
"type": "video",
"bvid": "BV1dfJk6hEjX",
"title": "无视风险 继续访问女coser的家",
"duration": 613,
"owner_name": "野生鱼白",
"views": 1776330,
"likes": 64938,
"coins": 8659,
"favorites": 18642,
"shares": 1557,
"danmaku": 2536,
"replies": 1821,
"url": "https://www.bilibili.com/video/BV1dfJk6hEjX",
"danmaku_profile": {
"count": 1800,
"unique_senders": 1351,
"per_minute": 176.18,
"first_sent_at": "2026-10-15T06:01:35Z",
"last_sent_at": "2026-10-18T09:56:01Z",
"peak_time": 337,
"density": [144, 119, 72, 84, 55, 102, 63, 37, 107, 85, 56, 201, 136, 87, 87, 82, 69, 82, 60, 72],
"top_phrases": [{ "text": "?", "count": 47 }, { "text": "???", "count": 26 }],
"samples": ["这么大的事", "我还没上车!"]
},
"sentiment": { "labeled": 25, "positive": 0.28, "neutral": 0.44, "negative": 0.28, "mean_score": 0.068 }
}

A comment row (illustrative values):

{
"type": "comment",
"bvid": "BV1pAJy6mESA",
"video_title": "《 官 宣 》",
"rpid": 320961302816,
"content": "笑死,这也太好看了",
"likes": 1532,
"reply_count": 48,
"uname": "某用户",
"level": 6,
"vip": true,
"verified": "bilibili 知名UP主",
"is_pinned": false,
"liked_by_uploader": true,
"created_at": "2026-10-16T11:59:20Z",
"sentiment": "positive",
"sentiment_score": 0.9
}

Danmaku rows have content, time (seconds into the video), mode, color, fontsize, ctime and an anonymised mid_hash.

Pricing

Pay per result: $5 per 1,000, and just $1 per 1,000 danmaku. Platform usage is included, so you only pay for what you get.

ResultPricePer 1,000
Comment or reply$0.005$5
Danmaku$0.001$1
Sentiment label$0.005$5
Video$0.005$5
Creator profile$0.005$5
Subtitle track (all its cues)$0.005$5
Actor start$0.001per run

Danmaku profiles and embedded top comments come with the video row at no extra charge, so if you only need each video's danmaku summary, scrape Videos with danmaku profile on instead of every danmaku. Error rows are free. Set Maximum cost per run in Run options (or Max danmaku per video) and the Actor stops cleanly when it reaches it.

Typical costs: 500 videos from a search cost about $2.50. 100 comments with sentiment cost about $1. All danmaku of a busy video (about 5,000) cost about $5.

Sentiment analysis

Turn on Sentiment analysis. Comment and danmaku rows get sentiment and sentiment_score. Video rows get a summary over their danmaku samples and embedded top comments (turn on danmaku profile or embed top comments).

It uses an AI model through Groq. Paste your own free API key from console.groq.com (takes a minute, no card needed) into Your own API key. Any OpenAI-compatible provider works too: set the Provider API URL and Model.

If the AI service is unavailable or out of quota, the run still finishes. Unlabelled rows get sentiment: null and are not charged for sentiment.

Tips

  • Monitoring: schedule the Actor (for example daily) with Only new items on. Combine it with Published after (for example 7 days) so pagination stops early.
  • Bigger jobs: the default 4 requests per second is safe. Leave the proxy on Auto: it starts without one and only switches to Apify proxies after repeated blocks.
  • Integrations: send results to Google Sheets, Slack, a webhook or your database with Apify integrations, or call the Actor from Python or JavaScript via the API.
  • Run statistics: the RUN_STATS record in the run's key-value store lists requests, megabytes, blocks and sentiment usage.

Limits

  • Bilibili caps search at 1,000 results per keyword. Use several keywords or the date filters for more.
  • Anonymous danmaku are a large sample, not every danmaku ever sent. Bilibili only serves the full history to logged-in users through a different API.
  • Some videos are region-locked outside China and come back as an error row.
  • The location (IP region) of commenters is only sent to logged-in users.

FAQ

How do I scrape Bilibili comments? Pick the Comments mode, paste video URLs (or a search keyword), and click Start. You get every comment with likes, reply counts, author level and date, plus full reply threads if you turn on Include nested replies. No Bilibili account is needed.

What is danmaku (弹幕)? Danmaku, or bullet comments, are the comments that fly across a Bilibili video at a specific second of playback. This Actor exports each one with its text, playback time, colour, mode and send time, or summarises them per video in a danmaku profile.

Does Bilibili have an official public API? Not for this kind of data. Bilibili's web endpoints are undocumented, signed (WBI) and rate-limited. This Actor handles the signing, cookies, retries and proxies for you and returns clean JSON.

How much does it cost to scrape Bilibili? $5 per 1,000 videos, comments or profiles, and $1 per 1,000 danmaku. For example, 500 search results cost about $2.50.

Is scraping Bilibili legal? This Actor only collects publicly visible data. You are responsible for how you use it: respect Bilibili's terms and local privacy law (for example GDPR and China's PIPL), and don't republish personal data.

Do I need a Bilibili account for comments? No. Comments and full reply threads work without a login. Bilibili caps logged-out visitors at 3 comments per video once they carry a tracking cookie; this Actor fetches comments without one. In testing it returned 200 top comments, or 10 comments with 3,001 replies, from one video with no login.

Can I scrape live streams, articles or dynamics (动态)? Not yet. Tell us in the Issues tab if you need them.

How do I download Bilibili danmaku? Pick Danmaku under What to scrape, paste the video URL or BV ID, and click Start. You get one row per bullet comment with its text, playback second, colour and send time, for $1 per 1,000.

Can I export Bilibili comments to Excel or CSV? Yes. Every run's results download as Excel, CSV, JSON, XML or HTML from the Output tab, or go straight to Google Sheets with an integration.

How do I monitor a Bilibili keyword or creator every day? Save your input as a task, add a daily schedule and turn on Only new items. Each run then returns, and charges for, only what is new since the last run.

Can I use it from Python, n8n, Make or an AI agent? Yes. Call it through the Apify API or client libraries for Python and JavaScript, from Make, n8n or Zapier, or from AI assistants such as Claude and ChatGPT through the Apify MCP server.

Something broke? Bilibili changes its API often. Open an issue in the Issues tab with a link to the run.

中文简介

哔哩哔哩(B站)数据采集工具,无需登录:视频详情与数据(播放、点赞、投币、收藏、分享)、评论及全部楼中楼回复、弹幕(每千条 1 美元)、UP主资料与投稿列表、关键词搜索、热门与排行榜。字幕需要 SESSDATA Cookie。支持 AI 情感分析(理解“笑死”“泪目”“典”等B站用语)、弹幕热度时间线和定时监控(只返回新内容)。结果可导出为 JSON、CSV、Excel。

This Actor is not affiliated with, endorsed by or sponsored by Bilibili Inc. "Bilibili" is used only to describe the website the data comes from.