# Bilibili Scraper — Videos, Comments, Danmaku & Creator Uploads (`insights_data/bilibili-scraper-videos-comments-danmaku-creator-uploads`) Actor

Scrape Bilibili videos, comments with replies, danmaku (bullet comments), creator uploads, profiles, rankings and trending searches. Search in Chinese or English, get danmaku analytics and creator engagement stats as clean JSON. No account or cookie needed.

- **URL**: https://apify.com/insights_data/bilibili-scraper-videos-comments-danmaku-creator-uploads.md
- **Developed by:** [Insights Data](https://apify.com/insights_data) (community)
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What is Bilibili Scraper?

**Bilibili Scraper — Videos, Comments, Danmaku & Creator Uploads** collects public data from [Bilibili](https://www.bilibili.com) (哔哩哔哩, B站) for market researchers, brand and influencer marketers, and data scientists: video stats, comments and replies, danmaku, creator uploads and profiles, creator posts, charts and trending searches. Paste Bilibili links in bulk or type keywords in Chinese or English, click **Start**, and get clean rows you can export to Excel or CSV, with no coding and no login (a login cookie is needed only for subtitles and commenter IP location). On the Apify Free plan, each run returns up to **10 results**, paid from your monthly free credit, so you can test it on a few videos first.

**Danmaku** (弹幕, "bullet comments") are comments that viewers post at a specific second of a video, and they scroll across the video at that moment. Because each one is tied to a scene, they show exactly where viewers reacted.

It is a no-code bilibili video scraper, bilibili comment scraper and bilibili creator scraper in one tool, with a JSON API for developers.

- 🎯 **Audience and brand research:** see how games, anime, tech and consumer brands perform with Chinese Gen-Z viewers, using real view, like, coin and favorite counts.
- 👤 **Bilibili influencer vetting:** find UP主 / KOL creators by keyword and compare their followers, average and median views, engagement rate and upload frequency.
- 📈 **Launch and brand monitoring:** schedule runs that return only new videos and show how views and likes grew since the last run.
- 🌊 **Reaction analysis:** use danmaku timelines to see the exact minute where viewers reacted most.
- 📝 **NLP and sentiment datasets:** build a Chinese comment and danmaku corpus for sentiment models.
- 🏆 **Chart tracking:** follow what climbs the popular, weekly, must-watch and ranking boards.

**Bilibili offers no official public API for this data (its open platform is partner-only), so this Actor gives you a ready-made way to get it without writing and maintaining your own scripts.**

#### What can Bilibili Scraper do?

- 🔗 **Take everything in one box:** video links, BV or av IDs, b23.tv short links, creator space links or `UID:<n>`, search pages, chart pages, chart names and plain keywords.
- 🔍 **Search videos by keyword** with sort order, video length, category and publish-date filters. Deep search goes past Bilibili's limit of about 1,000 results per search.
- 👤 **Find creators by keyword** (KOL discovery), then collect their uploads, profile and recent-upload averages.
- 💬 **Collect comments and nested replies**, hot or newest first.
- 🌊 **Profile the danmaku** of each video, or return every danmaku as its own row.
- 📜 **Add subtitles** (creator CC first, AI subtitles otherwise) when you add your own login cookie.
- 📡 **Monitor over time:** only-new-videos mode, growth since the last run, and new comments under videos you already collected.
- 📦 **Export and automate** with JSON, CSV, Excel, XML or HTML downloads, the Apify API, schedules, webhooks and integrations.

#### Bilibili terms used on this page

| Term | Meaning |
|---|---|
| UP主 | A Bilibili uploader or creator (KOL = key opinion leader, an influential creator) |
| Coins | Coins viewers give to a video to support it (`coinCount`) |
| BV ID / av ID | Bilibili's two video IDs, for example `BV1rgap62Ez5` (`bvid`) or the av number (`aid`) |
| b23.tv | Bilibili's short-link domain |
| UID / `mid` | A creator's user ID (`mid` on creator rows, `authorMid` on video and comment rows) |
| `cid` | The ID of one part of a video (multi-part videos have several) |

***

### What data can Bilibili Scraper extract?

Every row has a `type`, so one run can return bilibili data of seven kinds: `video`, `comment`, `reply`, `danmaku`, `creator`, `post` and `trending`. Field names below match the dataset schema.

#### 🎬 Video rows: Bilibili statistics and details

| | |
|---|---|
| 🔗 `bvid`, `aid`, `cid`, `url` | 📝 `title`, `description`, `thumbnailUrl` |
| 🔖 `category`, `categoryV2`, `tags`, `topic` | ⌛ `duration`, `durationFormatted`, `partCount`, `parts` |
| 📅 `publishDate`, `publishTimestamp`, `publishLocation`, `isReprint` | 👤 `authorMid`, `authorName`, `authorFace`, `authorFollowers` |
| 👁️ `viewCount`, `likeCount`, `coinCount`, `favoriteCount` | 🔁 `shareCount`, `replyCount`, `danmakuCount` |
| ⭐ `engagementRate`, `likeToViewRatio` | 🏆 `highestRank`, `honors`, `collection`, `rank` |
| 🧩 `relatedVideos` | 📜 `subtitleLanguage`, `subtitleIsAI`, `subtitles` |
| 📈 `changes` (growth since the last run) | 🌐 `source`, `scrapedAt` |

These bilibili statistics come straight from each video page. `engagementRate` = (likes + coins + favorites + shares + comments + danmaku) / views, written as a fraction: `0.177` means 17.7%.

#### 💬 Bilibili comments and replies

`commentId`, `videoBvid`, `rootId`, `parentId`, `text`, `likeCount`, `replyCount`, `createdAt`, `authorMid`, `authorName`, `authorLevel`, `authorIsVip`, `authorOfficialTitle`, `ipLocation`, `upLiked`, `upReplied`, `isPinned`, `pictures`, `mentions` and `isFollowUp`. Replies use `type: reply` and link to their comment through `rootId`.

#### 🌊 Bilibili danmaku (bullet comments)

With `danmakuMode: stats`, the video row gets a danmaku profile: `danmakuFetched`, `danmakuUniqueSenders`, `danmakuPerMinute`, `danmakuPeakMinute`, `danmakuPeakMinuteCount`, `danmakuFirstAt`, `danmakuLastAt`, `danmakuTimeline` (count per minute), `danmakuTopPhrases` (top 10 repeated phrases), `danmakuSample` and `danmakuPoolCapped`. With `danmakuMode: full`, you also get one row per danmaku: `videoTime`, `text`, `mode`, `fontSize`, `color`, `senderHash`, `sentAt` and `pool`.

How the three danmaku numbers relate:

- `danmakuCount` is the total Bilibili reports for the video.
- `danmakuFetched` is how many danmaku were collected for the profiled part.
- `danmakuPoolCapped` is `true` when fewer danmaku were collected than Bilibili reports (single-part videos only: below 95% of the count, or none collected while a count is reported). Usually Bilibili does not keep every danmaku available; a partly failed load can also set it. The profile then describes the danmaku that were collected.

#### 👤 Creator, post and trending rows

- **Creator rows:** `mid`, `name`, `followers`, `following`, `videoCount`, `totalLikes`, `level`, `officialTitle`, `verification`, live-room fields (`liveRoomId`, `liveStatus`, `liveTitle`), and recent-upload KPIs: `avgViews`, `medianViews`, `avgLikes`, `avgComments`, `avgDanmaku`, `avgEngagementRate`, `uploadsPerWeek` and `lastUploadAt`.
- **Post rows:** `postId`, `postType`, `text`, `title`, `imageUrls`, `linkedVideoBvid`, `likeCount`, `commentCount`, `repostCount` and `publishDate`.
- **Trending rows:** `rank`, `keyword`, `showName`, `heatScore`, `isHot` and `searchUrl`.

> **Note:** some fields are filled only in certain cases. `ipLocation` and `subtitles` need your login cookie. `changes` is `null` the first time a video is seen and filled from the second run on. `relatedVideos` is filled when `includeRelated` is on and full details were loaded. The creator KPIs (`avgViews`, `uploadsPerWeek` and the others) are filled for creator links and creator-search results, not for the extra author rows added by `includeCreatorProfile`. Search and chart rows without full details have no `engagementRate`.

#### What data can't Bilibili Scraper extract?

- Video or audio files. This is a data tool: no MP4 or MP3 downloads.
- Live-stream danmaku (only danmaku on uploaded videos).
- Anime and bangumi episode pages, private or deleted content.
- Subtitles and commenter IP location without your login cookie.

***

### How to scrape Bilibili videos, comments and danmaku

Here is how to scrape Bilibili step by step. It is designed for an easy start, even if you have never extracted data from the web before.

1. [Create a free Apify account](https://console.apify.com/sign-up) using your email.
2. Open [Bilibili Scraper — Videos, Comments, Danmaku & Creator Uploads](https://apify.com/insights_data/bilibili-scraper-videos-comments-danmaku-creator-uploads).
3. Paste Bilibili links into **🔗 Bilibili links & IDs**, or add **🔍 Search keywords** or **🏆 Charts & trending boards**.
4. Choose what to add to each video. Danmaku is **off** by default: set **🌊 Danmaku (bullet comments)** to `stats` to see the danmaku profile on each video row, which adds no extra charged rows. Turn on **💬 Include comments** for comment rows. **📜 Include subtitles** needs your login cookie (see [Login cookie](#login-cookie-cookie)). Then click **Start**.
5. When the run finishes, open the **Output** tab, click **Export** and download your data in JSON, CSV, Excel, XML or HTML.

Rows appear in the Output tab while the run is still going, so you can check the first results right away.

***

### How much does it cost to scrape Bilibili?

Bilibili Scraper uses **pay-per-event** pricing. Your bill has three parts:

| Part | Price | When it is charged |
|---|---|---|
| 💲 Results | **$15.00 per 1,000 results** ($0.015 each) on the Free plan (lower on paid plans, see below) | For every saved row of any type: video, comment, reply, danmaku, creator, post or trending |
| 🚀 Actor start | $0.00005 per GB of memory | Once per run. At the default 1 GB that is **$0.00005 per run** |
| ⚙️ Platform usage | Apify platform rates | Compute and, if used, proxy traffic. You pay this on top of the two events above |

| Apify plan | Price per result | Price per 1,000 results |
|---|---|---|
| Free | $0.015 | $15.00 |
| Starter | $0.0135 | $13.50 |
| Scale | $0.012 | $12.00 |
| Business and higher | $0.01 | $10.00 |

Paid Apify plans get a lower result price. The plan discount applies to that price only. The start fee is the same on every plan, and platform usage is billed at your Apify plan's own rates.

Example costs for the result and start events at the Free plan price (platform usage comes on top):

| Results | Results cost | + start (1 GB) | Total before platform usage |
|---|---|---|---|
| 10 | $0.15 | $0.00005 | about $0.15 |
| 100 | $1.50 | $0.00005 | about $1.50 |
| 1,000 | $15.00 | $0.00005 | about $15.00 |

#### How many results does one video create?

Every comment, reply and danmaku row is a result of its own. With **💬 Include comments** on, **📊 Max comments per video** = 5, **🧵 Include replies** on and **💭 Max replies per comment** = 2, one video can create up to 1 video row + 5 comments + 10 replies = **16 results**, which is 16 × $0.015 = **$0.24** at the Free plan price (plus the start fee and platform usage). Danmaku in `stats` mode adds no rows. In `full` mode, every danmaku is one more result.

#### What about platform usage?

To learn your platform usage cost, do a small test run (for example the default input), open the run page, read the usage cost there, and scale it up to the size you plan. It depends on how many videos you load and whether a proxy is used. The run starts without a proxy. If Bilibili blocks requests, it switches to Apify Proxy automatically (when available on your account), and that proxy traffic is added to your platform usage.

#### How do I cap my spend?

Set a **maximum charge limit** when you start a run. When that amount is reached, the run stops cleanly and keeps what it already saved. Rows that are not saved are not charged. See the [Pricing tab](https://apify.com/insights_data/bilibili-scraper-videos-comments-danmaku-creator-uploads/pricing) for the current event list.

#### Is scraping Bilibili free?

You can start for free. The [Apify Free plan](https://apify.com/pricing) includes $5 of platform credit every month. Result charges, the start fee and platform usage are all paid from that credit, so small test runs cost you nothing out of pocket. A 10-result run costs about $0.15 plus platform usage.

On the Free plan, each run returns **at most 10 results in total**, across all row types (not 10 per source). Comments, replies and danmaku rows use up the same 10, so a run with comments on returns fewer videos. There is no limit on how many runs you start, as long as your credit lasts. Free-plan runs also cap **🔢 Max results per source**, **📼 Max uploads per creator**, **🧾 Max posts per creator**, **🎯 Max follow-up videos**, **📊 Max comments per video** and **💭 Max replies per comment** at 10. When a run reaches 10 results, it stops and the status message says so. To get more than 10 results per run, switch to a paid Apify plan. Paid plans have no per-run row cap, so your inputs set the limits.

***

### ⬇️ Input

You need **at least one source**: a link, a keyword or a chart. Everything else is optional and has a sensible default. Set the input in the form, or send it as JSON through the API.

Here is the default (prefilled) input. It reads one Genshin Impact cutscene video by link and searches the keyword 原神 for up to 10 videos:

```json
{
    "urls": ["https://www.bilibili.com/video/BV1rgap62Ez5"],
    "searchQueries": ["原神"],
    "maxResults": 10,
    "proxyConfiguration": { "useApifyProxy": false }
}
```

This can find up to 11 videos. On the Free plan the run stops at 10 results. See the [input tab](https://apify.com/insights_data/bilibili-scraper-videos-comments-danmaku-creator-uploads/input-schema) for every field.

#### Settings most people change

| Form label (field) | What it does | Default |
|---|---|---|
| 🔗 Bilibili links & IDs (`urls`) | Bulk list of links, IDs, chart names and plain keywords | prefill: one video |
| 🔍 Search keywords (`searchQueries`) | Keywords in Chinese or English | prefill: 原神 |
| 🧭 Search for (`searchType`) | Videos or Creators | Videos |
| 🏆 Charts & trending boards (`charts`) | `popular`, `weekly`, `weekly:<issue>`, `precious`, `ranking`, `ranking:<category>`, `trending` | none |
| 🔢 Max results per source (`maxResults`) | Videos per keyword and per chart, creators per creator search | 10 |
| 💬 Include comments / 📊 Max comments per video (`includeComments`, `maxComments`) | Comment rows per video (0 = no per-video cap) | off / 5 |
| 🧵 Include replies / 💭 Max replies per comment (`includeReplies`, `maxRepliesPerComment`) | Reply rows per comment (turning replies on also turns comments on) | off / 2 |
| 🌊 Danmaku (bullet comments) (`danmakuMode`) | `off`, `stats` (profile on the video row) or `full` (profile + one row per danmaku) | `off` |
| 📼 Max uploads per creator (`maxVideosPerCreator`) | Uploads per creator link or found creator | 10 |

#### Advanced settings

| Form label (field) | What it does | Default |
|---|---|---|
| 🔃 Sort search results by, ⌛ Video length, 🔖 Category ID, 📅 Published after, 📆 Published before (`sortOrder`, `durationFilter`, `categoryId`, `publishedAfter`, `publishedBefore`) | Filters for keyword video search only | relevance, any length, all categories |
| 🔬 Deep search (`deepSearch`) | Go past Bilibili's ~1,000 results per search, newest first | on |
| 🔎 Max results examined per source (`maxScanned`) | Stop a filtered search after examining this many results (0 = no limit) | 5,000 |
| 📶 Creator uploads order (`creatorVideosSort`) | Newest, most views or most favorites | newest |
| 🪪 Add a profile row for every video author (`includeCreatorProfile`) | One creator row for the author of each video | off |
| 📝 Include creator posts / 🧾 Max posts per creator (`includeCreatorPosts`, `maxPostsPerCreator`) | Creator posts as rows | off / 50 |
| 📺 Fetch full video details (`fetchVideoDetails`) | Full stats, tags, parts, honors and author followers on search and chart rows | on |
| 🧩 Include related videos (`includeRelated`) | Related video IDs on each video row | off |
| 📜 Include subtitles / 🔤 Subtitle format / 🍪 Bilibili login cookie (`includeSubtitles`, `subtitleFormat`, `cookie`) | Subtitles as text or timed segments (needs your cookie) | off / text / empty |
| 🔥 Sort comments by (`commentSort`) | Hot or newest comments first | hot |
| 🧪 Danmaku sample size, 🎼 Every part of multi-part videos, 🕒 Danmaku time limit (`danmakuSampleSize`, `danmakuAllParts`, `danmakuMaxSegments`) | Sample size, every part of multi-part videos, and how deeply long videos are read in 6-minute blocks | 10 / off / 10 |
| 📈 Track changes since the last run, 🆕 Only new videos, 🔔 Follow-up comments on earlier videos, 📆 Follow-up window (days), 🎯 Max follow-up videos, 🔑 Monitoring key (`trackChanges`, `deltaMode`, `followUpComments`, `followUpDays`, `followUpMaxVideos`, `stateKey`) | Monitoring between runs | on / off / off / 7 / 10 / `default` |
| ⚡ Videos in parallel, 🐢 Delay between requests, 🔄 Retries per request (`concurrency`, `requestDelay`, `maxRetries`) | Speed and reliability | 3 / 0.35 s / 3 |
| 🌐 Proxy (`proxyConfiguration`) | No proxy by default. If Bilibili blocks requests, the run switches to Apify Proxy automatically (when available on your account), which adds platform usage | no proxy |

#### Bilibili links & IDs (`urls`)

One box takes videos, creators, search pages, charts and keywords. Plain text that is not a link is searched as a keyword. Duplicates are removed, and a link the Actor does not recognize is skipped with a warning in the log. Use `?p=N` to pick one part of a multi-part video. A creator's bilibili user id (UID) works as `UID:401742377` or as a space link.

- ✅ Good: `https://www.bilibili.com/video/BV1rgap62Ez5`, `https://space.bilibili.com/401742377`, `UID:401742377`, `ranking:game`, `原神`
- ❌ Bad: `https://www.bilibili.com/bangumi/play/ep123` (anime episode pages are not supported and are skipped)

> ⚠️ Every row counts as a result: videos, comments, replies, danmaku, creators, posts and trending keywords.

#### Danmaku (bullet comments) (`danmakuMode`)

`stats` adds the danmaku profile to the video row and adds no extra charged rows. `full` adds one row per danmaku, and each row is a charged result. **🕒 Danmaku time limit** (`danmakuMaxSegments`) controls how deeply long videos are read, in 6-minute blocks: the default 10 blocks = 60 minutes, and more blocks give more complete danmaku for long videos. Raise it for videos longer than an hour.

- ✅ Good: `"danmakuMode": "stats"` on many videos, or `"full"` on a few
- ❌ Bad: `"full"` on many popular videos with no budget in mind

> ⚠️ A busy video can have thousands of danmaku. Each one costs $0.015 in `full` mode at the Free plan price.

#### Comments and replies (`maxComments`, `maxRepliesPerComment`)

**📊 Max comments per video** limits top-level comments per video. Replies are counted separately with **💭 Max replies per comment**. `0` means no per-video or per-comment cap (on the Free plan, 0 becomes 10). Pinned comments on the first page are included and flagged `isPinned`.

- ✅ Good: `"maxComments": 5, "maxRepliesPerComment": 2`
- ❌ Bad: `"maxComments": 0` with `"maxRepliesPerComment": 0` on popular videos

#### Follow-up comments (`followUpComments`)

**🔔 Follow-up comments on earlier videos** re-reads the comments of videos delivered in the last **📆 Follow-up window (days)** and returns only comments newer than the last check (`isFollowUp: true`). It needs both **🆕 Only new videos** (`deltaMode`) and **💬 Include comments**. Without Only new videos, it is turned off with a warning. Without Include comments, it does not run.

- ✅ Good: Only new videos + Include comments + Follow-up comments, on a schedule
- ❌ Bad: Follow-up comments alone

#### Category ID (`categoryId`)

Use classic Bilibili category ids, for example `172` (mobile games), `17` (single-player games) or `36` (knowledge). `0` means all categories. Ids of 1000 or more are not supported: the log warns and the search returns nothing.

#### Login cookie (`cookie`)

You need it only for subtitles and commenter IP location. Everything else works without it. To get it:

1. Log in at bilibili.com in your browser, with your own account.
2. Open the browser's developer tools (F12), go to the cookies list for `https://www.bilibili.com` (Application tab in Chrome and Edge, Storage tab in Firefox), and copy the value of `SESSDATA`.
3. Paste it into **🍪 Bilibili login cookie (optional)**. You can also paste the full cookie string.

> ⚠️ **Privacy:** your cookie gives access to your Bilibili session, so use your own account and never share the value. The field is stored as a secret input and masked in the run log. With a cookie, comments are read with your logged-in session.

***

### ⬆️ Output

Results are saved live while the run is going. Open the **Output** tab to see them as a table or JSON. Each row type also has its own view: **Videos**, **Comments & replies**, **Danmaku**, **Creators**, **Creator posts** and **Trending searches**, plus **All results**. Click **Export** in the Output tab to download JSON, CSV, Excel, XML or HTML, and pick only the fields you need.

Each run also saves a **Run summary** record (`run-summary`) in its key-value store: rows per type, the stop reason, whether the Free plan applied, requests made, the connection used and the duration. `stopReason` is `freePlanLimit` when the free cap was reached and `spendLimit` when your maximum charge limit was reached. `completed` means the run ended for another reason: usually every source was processed, but it is also used when Bilibili could not be reached, so check the log and the row counts too.

#### JSON example

A video row from the input example above (real output, shortened). The `source` field, not shown here, records which input found the video, for example `url` or `search:原神`:

```json
{
    "type": "video",
    "bvid": "BV1rgap62Ez5",
    "aid": 117353555760681,
    "url": "https://www.bilibili.com/video/BV1rgap62Ez5",
    "title": "《原神》过场动画-「生与死的流速」",
    "category": "手机游戏",
    "categoryV2": "单人RPG游戏",
    "tags": ["过场动画", "米哈游", "miHoYo", "原神"],
    "duration": 1134,
    "durationFormatted": "18:54",
    "partCount": 4,
    "publishDate": "2026-10-08T04:00:00+00:00",
    "authorMid": 401742377,
    "authorName": "原神",
    "authorFollowers": 20899784,
    "viewCount": 673306,
    "likeCount": 76647,
    "coinCount": 18249,
    "favoriteCount": 10792,
    "shareCount": 2967,
    "replyCount": 7798,
    "danmakuCount": 2715,
    "engagementRate": 0.177,
    "likeToViewRatio": 0.1138,
    "highestRank": 27,
    "honors": ["全站排行榜最高第27名", "热门收录"],
    "changes": null,
    "scrapedAt": "2026-10-09T11:36:02.914195+00:00"
}
```

`engagementRate` 0.177 means the likes, coins, favorites, shares, comments and danmaku add up to 17.7% of the views. `changes` is `null` because this was the first time the video was seen. On the next run with the same **🔑 Monitoring key**, it holds the view, like, coin, favorite, share, reply and danmaku growth plus views per hour.

#### Comment and danmaku rows

These rows come from other videos and other settings (Include comments on, and Danmaku set to `full`). They show the shape of each row type. A comment row (real output, shortened, author removed):

```json
{
    "type": "comment",
    "commentId": 316516529233,
    "videoBvid": "BV1BWpW6WEv4",
    "text": "卧艹，三个眼被抬出去了",
    "likeCount": 10,
    "replyCount": 1,
    "createdAt": "2026-10-09T03:18:11+00:00",
    "authorLevel": 5,
    "isPinned": false,
    "upLiked": false,
    "ipLocation": null
}
```

`ipLocation` is `null` here because the run had no login cookie. A danmaku row (real output, shortened):

```json
{
    "type": "danmaku",
    "videoBvid": "BV1qMp46wE1n",
    "part": 1,
    "videoTime": 0.0,
    "text": "还有第二关？",
    "color": "#ffffff",
    "mode": 5,
    "sentAt": "2026-10-09T10:09:05+00:00"
}
```

`videoTime` is the second in the video where the danmaku appears. The **Danmaku** view works as a bilibili danmaku downloader for your own analysis, and the **Comments & replies** view as a bilibili comment exporter to Excel.

***

### Bilibili Scraper tips and advanced usage

#### How many results can you get?

Each search keyword and chart returns up to **🔢 Max results per source** videos (1 to 100,000). Creator links return up to **📼 Max uploads per creator** uploads each. The real number also depends on Bilibili rate limits, your filters, whether you use a login cookie, the Free-plan cap and how much danmaku Bilibili keeps for each video. Weekly picks (one issue), must-watch and ranking return the single list Bilibili serves, cut to Max results per source. Trending returns the hot-search list Bilibili serves. A quick test run is the best way to check your use case.

#### How to get cheaper results

- Set Danmaku to `stats` instead of `full` when you only need the profile.
- Keep Max comments per video and Max replies per comment small.
- Turn on **🆕 Only new videos** for scheduled runs so you do not pay for the same video twice.
- Use the search filters (Published after, Video length, Category ID) so fewer unwanted videos are saved.

#### Bilibili views growth and monitoring

With **📈 Track changes since the last run** on (the default), every video row gets a `changes` object with growth since the last run, including `viewsPerHour`. This makes it easy to track bilibili views over time. Add **🆕 Only new videos** for an only-new-videos feed, and **🔔 Follow-up comments on earlier videos** to collect new comments under earlier videos. History is kept per **🔑 Monitoring key** (`stateKey`) in a named key-value store in your own account, `bilibili-monitor-state`. It remembers up to 200,000 videos per key.

#### Known issues

- Without a login, Bilibili may serve only a few comments on some videos. The log says so. Add your cookie for those threads.
- Comments can be rate-limited for a few minutes when read heavily. Lower **⚡ Videos in parallel** or raise **🐢 Delay between requests**.
- A search can return 0 results while Bilibili is limiting requests. The run retries once, then asks you to retry later or use a proxy.
- Sometimes Bilibili limits a creator's full upload list. Uploads then come newest first, the sort is ignored, the total video count is unknown, and view counts may be rounded unless **📺 Fetch full video details** is on.
- Creator posts can stay empty for a while. The log warns when this happens.
- An unknown ranking category falls back to the all-site ranking, with a warning.

***

### Integrations and API for Bilibili Scraper

#### Can I use Bilibili Scraper as a Bilibili API?

Yes. This is not the official bilibili api: you run the Actor through the [Apify API](https://docs.apify.com/api/v2), which lets you start runs, schedule them and fetch results. Use the `apify-client` [NPM package](https://apify.com/insights_data/bilibili-scraper-videos-comments-danmaku-creator-uploads/api/javascript) for Node.js or the `apify-client` [PyPI package](https://apify.com/insights_data/bilibili-scraper-videos-comments-danmaku-creator-uploads/api/python) for Python. The [API tab](https://apify.com/insights_data/bilibili-scraper-videos-comments-danmaku-creator-uploads/api) has ready-to-use code.

#### How to scrape Bilibili with Python

If you searched for a bilibili api python client, this is the shortest route. The example uses the input from above:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("insights_data/bilibili-scraper-videos-comments-danmaku-creator-uploads").call(
    run_input={
        "urls": ["https://www.bilibili.com/video/BV1rgap62Ez5"],
        "searchQueries": ["原神"],
        "maxResults": 10,
        "proxyConfiguration": {"useApifyProxy": False},
    }
)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["type"], item.get("bvid"), item.get("title"))
```

#### Can I integrate Bilibili Scraper with other apps?

Yes. Connect it to almost any cloud service with [Apify integrations](https://apify.com/integrations): **Make, Zapier, Slack, Google Sheets, Google Drive, Airbyte, GitHub, LangChain** and more. Use [webhooks](https://docs.apify.com/integrations/webhooks) to act when a run finishes. For example, schedule a daily run with Only new videos on for your brand keyword and send the new videos to a Google Sheet for your bilibili marketing team.

#### Can I use Bilibili Scraper with AI agents (MCP)?

Yes. Connect it to Claude and other AI assistants through the Apify MCP server. Open the [MCP tab](https://apify.com/insights_data/bilibili-scraper-videos-comments-danmaku-creator-uploads/api/mcp) for setup steps.

***

### Other social media and video scrapers

These Actors from the same author cover comments, creators, sentiment and keyword research on other platforms:

| | |
|---|---|
| 💬 [TikTok Comments & Replies Scraper](https://apify.com/insights_data/tiktok-comments-replies-scraper): TikTok comments and replies with likes, reply counts and commenter details | 👤 [TikTok Profile Scraper](https://apify.com/insights_data/tiktok-profile-scraper): TikTok profile videos with views, likes, comments, shares and author stats |
| 📊 [Stocktwits Scraper](https://apify.com/insights_data/stocktwits-scraper): stock and crypto messages with bullish/bearish sentiment | 🔍 [Keyword Search Volume — Bulk Google Metrics (CPC & Trend)](https://apify.com/insights_data/keyword-search-volume): Google search volume, CPC and 12-month trends for keywords |

***

### ❓ FAQ

#### Is it legal to scrape Bilibili?

Scraping publicly available data is generally legal, but you must follow the laws that apply to you and Bilibili's terms. This Actor collects only public data. Comments and creator profiles can contain personal data, which is protected by laws such as GDPR and China's PIPL. Collect it only with a legitimate reason, and store it safely. This is not legal advice. Ask a lawyer if you are unsure.

#### How does Bilibili Scraper work?

It works like a person browsing public Bilibili pages, only faster. Like a bilibili crawler, it sorts each input entry (video, creator, search or chart), collects the videos from every source and removes duplicates. Then it loads each video's details, plus comments, danmaku and subtitles if you asked for them, several videos at a time. Rows are saved live, and creator profile rows are added at the end. If Bilibili blocks requests, it switches to Apify Proxy automatically when available on your account.

#### How is Bilibili Scraper different from copying data by hand?

It does in one run what would take hours of clicking, and it returns structured rows instead of screenshots or notes.

| Feature | Bilibili Scraper | Copying by hand |
|---|---|---|
| Many videos, creators and keywords at once | ✅ bulk input | ❌ one page at a time |
| Comments and replies linked in one table | ✅ `rootId` links each reply | ❌ |
| Danmaku timeline and top phrases | ✅ computed per video | ❌ |
| Only new videos and growth since the last run | ✅ Only new videos, Track changes | ❌ |
| Export to JSON, CSV or Excel | ✅ | ❌ |
| Price | $15.00 per 1,000 results on the Free plan, down to $10.00 on Business, + start fee + platform usage | your time |

#### Is it a bilibili extractor or a downloader?

It is a bilibili extractor for data, not files. Used as a bilibili video extractor, it returns metadata, stats, danmaku and subtitles as rows. Used as a bilibili comment extractor, it adds every comment with likes, author level and the pinned flag. It does not download MP4 or MP3 files.

#### Bilibili danmaku meaning: what are bullet comments?

Danmaku (弹幕) are comments that viewers post at a specific second of a video, and they scroll across the screen at that moment. They are also called bilibili bullet comments or bilibili danmu. Because each danmaku has a video time, they show exactly which scene viewers reacted to. The bilibili danmaku profile turns this into a per-minute timeline, the peak minute and the top phrases. Comments alone don't show this, which is why people look for a bilibili danmaku scraper.

#### Can I scrape Bilibili comments without login?

Yes. Videos, comments, replies, danmaku, creators, posts, charts and trending searches all work without a login. Your login cookie only adds subtitles and commenter IP location. On some videos, Bilibili serves only a few comments to visitors who are not logged in, and the log tells you when that happens. Adding your cookie helps there.

#### Can I download Bilibili subtitles?

Yes, with your own login cookie. For a bilibili subtitles download, turn on **📜 Include subtitles**, add your cookie, and pick `text` or `segments` (with start and end times) in **🔤 Subtitle format**. It works as a bilibili subtitle extractor for creator CC subtitles, and AI subtitles when no CC exists. Without the cookie, the subtitle fields stay empty and the log warns.

#### How do I get Bilibili trending videos and rankings?

Use **🏆 Charts & trending boards**. For bilibili trending videos, pick `popular` (Popular now), `weekly` (Weekly picks), `precious` (Must-watch) or `ranking`. These are the bilibili popularity ranking boards. For a category bilibili ranking, use `ranking:game`, `ranking:music`, `ranking:knowledge` or another category. The `trending` chart is different: bilibili trending returns the hot search keywords, one row each, with rank and heat score.

#### How do I run a Bilibili search video query with filters?

Add your keywords to **🔍 Search keywords**. Every bilibili search video query can use Sort search results by (relevance, most views, newest, most danmaku, most favorites, most comments), Video length, Category ID, and Published after / Published before. These filters apply to keyword video search only, not to links, creators or charts.

#### Can I use it for Bilibili influencer and uploader research?

Yes. Set **🧭 Search for** to Creators to find each bilibili uploader (UP主) by keyword, or paste creator space links. Every creator row includes followers and recent-upload KPIs: average and median views, average engagement rate and uploads per week. That makes it a practical tool for bilibili analytics and bilibili data analysis on creators. It does not return audience demographics.

#### Why scrape Bilibili data?

- **Datasets for AI:** build a bilibili dataset of comments and danmaku for Chinese NLP and sentiment models, or a bilibili video dataset with stats and tags.
- **Market research:** Bilibili is popular with young Chinese audiences, especially for games, anime and tech, so its stats and comments show what they care about.
- **Brand monitoring:** see new videos and comments about your brand every day.
- **Creator vetting:** compare engagement before you pay for a campaign.
- **Cross-platform research:** use it next to your other social media tools as a chinese social media scraper for Bilibili. Chinese-speaking teams often search for it as a b站 scraper.

#### Why am I getting fewer results than expected?

1. **Free plan:** each run stops at 10 results in total, and comments, replies and danmaku rows count toward them.
2. **Filters:** date, length and category filters drop videos that don't match. A filtered search also stops after Max results examined per source.
3. **Deep search off:** a search then stops at about 1,000 results.
4. **Video links:** a video whose details cannot be loaded is skipped (and not charged).
5. **Login:** some comment threads need your cookie.
6. **Rate limits:** if Bilibili limits requests, lower Videos in parallel, raise Delay between requests, or start with a proxy.
7. **Maximum charge limit:** the run stops when the limit you set is reached.

***

### Support and feedback

Found a bug or need a missing field? Please create an issue on the [Issues tab](https://apify.com/insights_data/bilibili-scraper-videos-comments-danmaku-creator-uploads/issues/open) with the run link and what you expected.

Need a **custom solution** or a different data source? Contact us at hello.insights.data@gmail.com.

Built and maintained by [insights_data](https://apify.com/insights_data).

# Actor input Schema

## `urls` (type: `array`):

One entry per line. Accepted: video links (www.bilibili.com/video/BV…, ?p=2 for a part, m.bilibili.com, b23.tv short links), BV or av IDs (a bare number is read as an av video ID), creator space links (space.bilibili.com/123456, m.bilibili.com/space/123456) or UID:123456, search pages (search.bilibili.com/all?keyword=…), chart pages (www.bilibili.com/v/popular/all, /v/popular/weekly, /v/popular/history, /v/popular/rank/game) and chart names (popular, weekly, weekly:300, precious, ranking, ranking:game, trending). Plain text that is not a link is searched as a keyword. Free plan users are limited to 10 items per run; paid plans have no limit. Every row counts toward the 10 (videos, comments, replies, danmaku, creators, posts, trending).

## `searchQueries` (type: `array`):

Keywords to search on Bilibili, in Chinese (原神) or English. Each keyword returns up to Max results per source.

## `searchType` (type: `string`):

Videos: each keyword returns matching videos. Creators: each keyword finds matching creators (KOL discovery); their uploads and profile rows are then collected like creator links.

## `charts` (type: `array`):

Popular now, Weekly picks (latest issue, or weekly:<issue number>), Must-watch (precious), Ranking (all site, or ranking:<category> such as ranking:game, ranking:music, ranking:knowledge, ranking:origin, ranking:rookie) and Trending searches (one row per hot keyword). You can also type your own value, e.g. weekly:300.

## `maxResults` (type: `integer`):

How many videos each source returns: per search keyword, per chart, and how many creators a creator search returns. Free plan users are limited to 10 items per run; paid plans have no limit. The 10 count all rows of the run together, not each source.

## `sortOrder` (type: `string`):

Order of search results.

## `durationFilter` (type: `string`):

Only videos of this length.

## `categoryId` (type: `integer`):

Limit search to one Bilibili category by its classic category id (e.g. 172 = mobile games, 17 = single-player games, 36 = knowledge). 0 = all categories.

## `publishedAfter` (type: `string`):

Only videos published on or after this date. Pick an absolute date (e.g. 2026-01-01, start of that day in UTC) or a relative one counted from the run start (e.g. 7 days, 2 weeks, 3 months ago). Leave empty for no limit.

## `publishedBefore` (type: `string`):

Only videos published on or before this date. An absolute date includes that whole day (UTC); a relative date is counted from the run start (e.g. 1 day ago). Leave empty for no limit.

## `deepSearch` (type: `boolean`):

Bilibili stops one search at about 1,000 results. When on and you ask for more, the search is repeated over smaller date ranges (newest first) to reach your Max results.

## `maxVideosPerCreator` (type: `integer`):

How many uploads to collect from each creator link or found creator. Free plan users are limited to 10 items per run; paid plans have no limit.

## `creatorVideosSort` (type: `string`):

Order of a creator's uploads.

## `includeCreatorProfile` (type: `boolean`):

Adds one creator row (followers, likes, level, verification, live room, average views and engagement of recent uploads) for the author of every collected video. Creator links and creator searches always get a profile row.

## `includeCreatorPosts` (type: `boolean`):

Also collect each creator's posts (text, image and video posts from their activity feed) as separate rows.

## `maxPostsPerCreator` (type: `integer`):

How many posts to collect per creator when Include creator posts is on. Free plan users are limited to 10 items per run; paid plans have no limit.

## `fetchVideoDetails` (type: `boolean`):

Adds the full stats (coins, shares, favorites), tags, parts, honors, collection and author follower count to every video. Search and chart rows lack some of these without it. Video links always get full details.

## `includeRelated` (type: `boolean`):

Adds the BV IDs of Bilibili's related videos to each video row (needs Fetch full video details).

## `includeSubtitles` (type: `boolean`):

Adds the video's subtitles (creator CC or AI subtitles) to the video row. Bilibili only serves subtitles to logged-in users, so this needs your SESSDATA cookie below.

## `subtitleFormat` (type: `string`):

Plain text (one line per caption) or timed segments with start and end seconds.

## `cookie` (type: `string`):

Optional. Your SESSDATA cookie value (or the full cookie string) from a logged-in browser: 1. Log in at bilibili.com. 2. Open DevTools > Application > Cookies > https://www.bilibili.com. 3. Copy the value of SESSDATA. Unlocks subtitles and the commenter IP location. Everything else works without it.

## `includeComments` (type: `boolean`):

Collects each video's comments as their own rows (type: comment) with text, likes, reply count, author, level and pinned flag. No login needed.

## `maxComments` (type: `integer`):

Top-level comments per video. 0 = all comments. Comment rows count as items. Free plan users are limited to 10 items per run; paid plans have no limit.

## `commentSort` (type: `string`):

Hottest comments first, or newest first.

## `includeReplies` (type: `boolean`):

Also collects the replies under each comment as rows (type: reply, linked by rootId). Turns on Include comments automatically.

## `maxRepliesPerComment` (type: `integer`):

Replies per top-level comment. 0 = all replies. Reply rows count as items. Free plan users are limited to 10 items per run; paid plans have no limit.

## `danmakuMode` (type: `string`):

Off. Profile: adds danmaku analytics to each video row — count, unique senders, per-minute rate, peak minute, per-minute timeline, top repeated phrases and an evenly spread sample. Profile + every danmaku: also one row per danmaku (type: danmaku) with its video time, text, color and send time. No login needed. Danmaku rows count as items. Free plan users are limited to 10 items per run; paid plans have no limit.

## `danmakuSampleSize` (type: `integer`):

How many danmaku texts, spread evenly across the video, go into the danmakuSample field of the video row.

## `danmakuAllParts` (type: `boolean`):

For videos with several parts, read the danmaku of every part (rows only; the profile describes the requested part). Off = only the part in the link (part 1 by default).

## `danmakuMaxSegments` (type: `integer`):

How far into each part danmaku are read, in 6-minute blocks. 20 = the first 2 hours.

## `trackChanges` (type: `boolean`):

Adds a changes object to each video row: view, like, coin, favorite, share, comment and danmaku growth since the last run that delivered the same video, plus views per hour. History is kept in your account under the Monitoring key.

## `deltaMode` (type: `boolean`):

Each run returns only videos that earlier runs with the same Monitoring key did not deliver. Pair it with a schedule for a daily 'what is new' feed.

## `followUpComments` (type: `boolean`):

Needs Only new videos and Include comments. Re-reads the comment threads of videos delivered by earlier runs and returns only comments posted since then (rows marked isFollowUp: true).

## `followUpDays` (type: `integer`):

Follow up on videos delivered within this many days.

## `followUpMaxVideos` (type: `integer`):

At most this many earlier videos are re-read per run, newest delivered first.

## `stateKey` (type: `string`):

Names the saved history so separate monitors do not mix (e.g. genshin-daily, game-ranking). Used by Only new videos, Track changes and Follow-up comments.

## `maxScanned` (type: `integer`):

When filters reject many search results, stop after examining this many per source. 0 = no limit.

## `concurrency` (type: `integer`):

How many videos are processed at the same time (1–8).

## `requestDelay` (type: `number`):

Pause between requests, with random jitter added. Comments always use at least 0.9 s.

## `maxRetries` (type: `integer`):

How often a failed or limited request is retried before it is skipped.

## `proxyConfiguration` (type: `object`):

Default: no proxy. If Bilibili blocks the requests, the run switches to a datacenter proxy, then to a residential proxy (with up to 3 fresh residential IPs), and stays on it for the rest of the run. Pick a proxy here to start with it.

## Actor input object example

```json
{
  "urls": [
    "https://www.bilibili.com/video/BV1rgap62Ez5"
  ],
  "searchQueries": [
    "原神"
  ],
  "searchType": "video",
  "maxResults": 10,
  "sortOrder": "totalrank",
  "durationFilter": "any",
  "categoryId": 0,
  "deepSearch": true,
  "maxVideosPerCreator": 10,
  "creatorVideosSort": "pubdate",
  "includeCreatorProfile": false,
  "includeCreatorPosts": false,
  "maxPostsPerCreator": 50,
  "fetchVideoDetails": true,
  "includeRelated": false,
  "includeSubtitles": false,
  "subtitleFormat": "text",
  "includeComments": false,
  "maxComments": 5,
  "commentSort": "hot",
  "includeReplies": false,
  "maxRepliesPerComment": 2,
  "danmakuMode": "off",
  "danmakuSampleSize": 10,
  "danmakuAllParts": false,
  "danmakuMaxSegments": 10,
  "trackChanges": true,
  "deltaMode": false,
  "followUpComments": false,
  "followUpDays": 7,
  "followUpMaxVideos": 10,
  "stateKey": "default",
  "maxScanned": 5000,
  "concurrency": 3,
  "requestDelay": 0.35,
  "maxRetries": 3,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `videos` (type: `string`):

One row per video: stats, tags, parts, author, ranking and the optional danmaku profile and growth since the last run.

## `comments` (type: `string`):

Comment and reply rows, linked to their video by videoBvid.

## `danmaku` (type: `string`):

One row per danmaku (bullet comment) when danmaku rows are switched on.

## `creators` (type: `string`):

Creator profiles: followers, likes, verification, live room and recent-upload averages.

## `posts` (type: `string`):

Posts from creators' activity feeds.

## `trending` (type: `string`):

Bilibili's trending search keywords with heat scores.

## `results` (type: `string`):

Every row of the run in one table.

## `summary` (type: `string`):

Rows saved per type and why the run stopped (completed, free plan limit or spend limit).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "https://www.bilibili.com/video/BV1rgap62Ez5"
    ],
    "searchQueries": [
        "原神"
    ],
    "maxResults": 10,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("insights_data/bilibili-scraper-videos-comments-danmaku-creator-uploads").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "urls": ["https://www.bilibili.com/video/BV1rgap62Ez5"],
    "searchQueries": ["原神"],
    "maxResults": 10,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("insights_data/bilibili-scraper-videos-comments-danmaku-creator-uploads").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://www.bilibili.com/video/BV1rgap62Ez5"
  ],
  "searchQueries": [
    "原神"
  ],
  "maxResults": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call insights_data/bilibili-scraper-videos-comments-danmaku-creator-uploads --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,insights_data/bilibili-scraper-videos-comments-danmaku-creator-uploads"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/nk3FG71MKTU1iKdUh/builds/bZ1raSZnDGpujWUPK/openapi.json
