# Bilibili Scraper 哔哩哔哩 | Videos $0.49/1k (`monkey.d.scraping/bilibili-scraper`) Actor

Bilibili videos, UP主 catalogs & root comments; no login. Per run: 1k plain videos $0.49005 or 1k standalone comments $0.19005, start + platform included. Ten attached comments/parent included; extras $0.19/1k. Extra catalog uploads $0.49/1k. Empty runs $0.00005. Scoped comparisons in README.

- **URL**: https://apify.com/monkey.d.scraping/bilibili-scraper.md
- **Developed by:** [Monkey D. Scraping](https://apify.com/monkey.d.scraping) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 2 monthly users, 71.4% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 video or creator results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Bilibili Scraper 哔哩哔哩 | Videos, Creators & Comments

**Low-cost Bilibili data for creator research, video performance comparisons and audience research.** Collect public videos, creator profiles, complete public upload catalogs and root comments without a Bilibili login. Videos and creator results cost **$0.49/1,000**; standalone or extra comments cost **$0.19/1,000**. Ten requested comments per parent result are included; each start costs **$0.00005**. [See total-price examples and catalog billing](#low-cost-pricing).

**Total for one run:** 1,000 videos without comments = **$0.49005**; 1,000 standalone root comments = **$0.19005**, including one start and platform usage. No separate compute or proxy surcharge. [Compare matching volumes and see exceptions](#when-is-this-bilibili-scraper-cheaper).

[English](#choose-your-collection) · [中文：B站视频、UP主与评论采集](#chinese-guide)

Export structured JSON through Apify datasets, with complete JSON files available for oversized results. Start with five videos, then choose the collection that fits your research.

### Choose your collection

| Mode | Input | Output |
|---|---|---|
| `search` | Keywords or Bilibili search URLs | Video details, statistics, tags and parts |
| `videos` | BV/av video URLs, including b23.tv redirects | Video details and optional comments |
| `profiles` | Creator URLs or keywords | Public profile and ten recent upload summaries; optional complete catalog with full video details; comments on the ten recent videos |
| `comments` | Video URLs | One row per comment, with author, publication time and video association |

Search supports relevance, views, newest, comments, favorites and danmaku ordering. Comment order is `recent` or the source's `top` order. Date filters apply to search and standalone comments. Video search sends the requested date window to Bilibili and validates returned dates locally. Maximum counts are ceilings, not promises of source availability.

### What can you use it for?

- **Research Bilibili creators:** compare public follower counts, biographies and recent uploads before choosing creators to investigate further.
- **Compare video performance:** search a topic or supply video URLs to collect views, likes, coins, favorites, shares and tags in a consistent format.
- **Export a creator's public catalog:** enable `includeAllUploads` for full details on every available catalog video, with explicit completion checks.
- **Prepare audience research:** collect root comments with their video association for your own qualitative or sentiment analysis. The Actor collects data; it does not perform AI analysis.

### Output fields

| Record | Selected fields | Coverage |
|---|---|---|
| Video | `bvid`, `url`, `title`, `description`, `category`, `publishedAt`, `tags`, `pages`, `creatorId`, `viewCount`, `likeCount`, `coinCount`, `favoriteCount`, `shareCount`, `commentCount`, `danmakuCount` | Public video details; missing source values are not invented |
| Creator | `mid`, `name`, `bio`, `followerCount`, `followingCount`, `videoCount`, `topVideos` | Profile and up to ten recent upload summaries |
| Complete catalog | `uploads`, `uploadsCoverage` | Optional full video details, listing and detail completion checks |
| Root comment | `id`, `message`, `authorName`, `likeCount`, `replyCount`, `publishedAt`, `videoBvid` | Standalone rows or attached comments; reply threads are not collected |

Reply counts do not mean reply threads were extracted. Danmaku counts are statistics: this Actor does not collect danmaku texts, subtitles, transcripts or media files. Use JSON to preserve nested arrays such as `uploads`, `pages` and attached comments.

### Low-cost pricing

| Event | USD price |
|---|---:|
| Complete video or creator result | $0.49 per 1,000 |
| First 10 requested comments per complete video/creator | Included |
| Additional comments, or every standalone comment | $0.19 per 1,000 |
| Each start at the supported memory setting, including resurrection | $0.00005 |

For a creator, the inclusion is **ten comments across the whole profile**, not ten per nested video. The ten `topVideos` summaries are included in the creator result. Comments are optional and off by default. With the optional complete catalog, each additional unique upload not already delivered in that run beyond the ten included summaries is another result event at $0.49 per 1,000. The uploader ID is preserved separately from the creator under whose catalog it was listed; these may differ.

Totals in a single run: 1,000 plain videos = $0.49005; 1,000 standalone comments = $0.19005; one creator with 10,000 comments = $1.89864. These are calculations, not guaranteed volumes. The model includes platform usage; there is no separate compute/proxy surcharge. Comparisons with Lofomachines are scoped to matching modes and volumes: a large nested result may cost more under this per-comment model. No universal lowest-price claim is made.

Under these rules, error/status records, duplicates and incomplete recovery files are free. Only complete, saved requested units can be charged. Earlier complete results remain chargeable if a later source request fails; the start fee remains payable for empty or failed runs. Apify also charges the start event again when a finished run is resurrected; saved result/comment events are not repeated. The maximum run charge is checked before expensive collection and before saving each complete result. A conservative reservation uses the requested maximum nested comment count; if the budget cannot cover it, the result is not started. Confirmed result/comment charges are not repeated on restart. An unresolved billing state stops the run for reconciliation.

#### When is this Bilibili scraper cheaper?

Choose this Actor for low unit prices on public videos and root comments, with explicit total costs. The table compares **delivered data units in one run**, not every feature of each product. USD list prices checked on **November 3, 2026**, through Apify MCP pricing metadata. Our rates are the same across the listed tiers; account credits and subscriptions are not included. Lofomachines totals assume one start event (at most 1 GB); additional start events would increase its total. TopAPI has no start event in the checked list.

| Same requested output in one run | Our total, start included | Comparator total | Where we stand |
|---|---:|---:|---|
| 1,000 videos, no comments — Free tier | **$0.49005** | Lofomachines **$4.50005** | **89.1% lower** |
| 1,000 videos, no comments — Gold / Platinum / Diamond | **$0.49005** | Lofomachines **$2.00005** | **75.5% lower**, even against its lowest listed result tier |
| 1,000 videos, no comments | **$0.49005** | TopAPI **$0.90000** | **45.6% lower** |
| 1,000 standalone root comments, no videos or replies | **$0.19005** | TopAPI **$0.44000** | **56.8% lower** |
| One video with 100 attached root comments — Gold tier | **$0.01764** | Lofomachines **$0.00205**, **if all comments are included in one result** | **Lofomachines can be cheaper**; its delivery at this volume was not verified |
| Zero delivered units, one start | **$0.00005** | TopAPI **$0.00000** | Our start fee still applies |

Sources: [Lofomachines pricing](https://apify.com/lofomachines/bilibili-scraper/pricing) and [TopAPI pricing and feature scope](https://apify.com/topapi/bilibili-scraper). Lofomachines also lists Bronze at $3.50 and Silver at $2.50 per 1,000 result events, plus start. Its Free-plan comment limit prevents treating a 1,000-comment Free run as an equivalent delivered-volume comparison. No additional competitor runs were performed for this price review.

**What this comparison does not claim:** universal lowest price, faster collection, higher reliability or complete functional parity. TopAPI advertises reply extraction, danmaku text and other features not supplied here. Our full creator catalog is verified on specific samples, but a faster or more complete catalog than Lofomachines has not been demonstrated. Large nested comment collections can favor Lofomachines' per-result model.

### Ready-to-run examples

Choose a focused example, review its input and spending limit, then run your own copy. Source availability determines the delivered count.

| Public example | Expected output |
|---|---|
| [Search videos by keyword](https://apify.com/monkey.d.scraping/bilibili-scraper/examples/bilibili-video-search) | Up to five videos with details and statistics |
| [Research a creator](https://apify.com/monkey.d.scraping/bilibili-scraper/examples/bilibili-creator-profile) | One public profile and up to ten recent upload summaries |
| [Export recent comments](https://apify.com/monkey.d.scraping/bilibili-scraper/examples/bilibili-recent-comments) | Up to twenty root comments, one row per comment |
| [Export a complete creator catalog](https://apify.com/monkey.d.scraping/bilibili-scraper/examples/bilibili-complete-creator-catalog) | One creator with full public video details and coverage checks; allow 15 minutes |

### First useful result

The exact prefill returns up to five videos:

```json
{"searchTerms":["minecraft"],"maxItems":5}
```

Creator example:

```json
{"mode":"profiles","startUrls":[{"url":"https://space.bilibili.com/5970160"}],"maxItems":1,"getComments":false}
```

Standalone comment example:

```json
{"mode":"comments","startUrls":[{"url":"https://www.bilibili.com/video/BV1oe4y1Y7n5"}],"maxItems":20,"maxCommentsPerVideo":20,"commentsSort":"recent"}
```

Complete creator catalog example (allow 15 minutes and a spending cap that covers the catalog):

```json
{
  "mode": "profiles",
  "startUrls": [
    {
      "url": "https://space.bilibili.com/3745000386988717"
    }
  ],
  "maxItems": 1,
  "includeAllUploads": true,
  "largeResultFiles": true
}
```

This creator returned 83 fully detailed uploads in a cloud check on November 3, 2026. At that volume, one creator plus 73 extra uploads costs **$0.03631 including one start**, without comments. Catalog size can change; `maxItems: 1` limits creator rows, not the number of nested uploads.

#### Real video output example

Selected fields from the five-video prefill check on November 3, 2026; values are an observed snapshot, not current statistics. The full record contains additional fields listed above.

```json
{
  "type": "video",
  "bvid": "BV1Nxxr6oES2",
  "url": "https://www.bilibili.com/video/BV1Nxxr6oES2",
  "title": "耗资上万！我重制了网页版MC！【B站AI创造公开赛】",
  "publishedAt": "2026-10-31T03:55:11.000Z",
  "durationSeconds": 168,
  "creatorId": 1987439458,
  "viewCount": 651513,
  "likeCount": 76670,
  "commentCount": 5831,
  "scrapedAt": "2026-11-03T11:24:17.478Z"
}
```

### Large results and incomplete collections

Default delivery preserves nested JSON in the dataset. The inline budget is conservatively 4.5 MB of decoded UTF-8 JSON per result. HTTP gzip reduces upload bandwidth without removing fields.

With `largeResultFiles: true`, an oversized complete result is saved as a gzip JSON file containing `{"complete":true,"result":...}`. The default dataset contains an explicit index with `delivery: "complete-file"` and `fullResult.url`; nested comments and the optional full upload array are available in the file instead of duplicated in that dataset index. Every original field remains in the file. Smaller results stay inline. This is an opt-in output format and is not identical to inline-only export. Large exports select 256 MB automatically unless you override memory; use at least 15 minutes of timeout. Set the maximum run charge to cover the requested ceiling: for one creator requesting 1,500 comments on each of ten videos, $3 covers the $2.84864 maximum. A request for 5,000 per video needs a cap of at least $9.49864, even when fewer comments may be available. A private run verified 41,225 unique comments across ten videos in a complete file, in about 12 minutes; this is an observed example, not a performance guarantee.

If source access, pagination, time or collection-size limits interrupt a nested result, available data may be saved separately as an `INCOMPLETE-*.json.gz` recovery file. `SUMMARY.recoveryFiles` lists these with `complete: false` and progress. They are never complete dataset results. Recovery is best-effort and cannot be guaranteed after forced termination or memory exhaustion.

Runs with source errors end as FAILED, even if other complete results were saved. Exception: in video search, a detail API `-404` for a skipped candidate is a warning when the search still collects `maxItems` complete results. These runs succeed with `partial: false`; `warnings` and `skippedUnavailableVideos` preserve the skipped candidates. If the limit is not reached, or any other error occurs, the error remains explicit. This exception does not apply to explicit video URLs, creator catalogs or comment failures. Console logs show a compact summary and separate issue lines; full diagnostics remain in `SUMMARY`. Inspect both the dataset and `SUMMARY` / Coverage and errors. Requested quotas and source-reported counts can differ because content becomes unavailable or the source changes.

### Optional complete public creator catalog

`includeAllUploads: true` in profiles mode adds an `uploads` array and `uploadsCoverage`, preserving the original ten `topVideos`. Comments still apply to those ten videos only. Cloud checks returned complete video details for catalogs of 83, 134 and 1,203 unique uploads. These samples do not guarantee every creator catalog. Source HTTP 412 can still interrupt collection; retries are bounded and incomplete output is recovered separately without result charges. A partial catalog is not reported as complete. Collection starts with the listing that returns up to 99 entries per page. If source access fails or that listing does not pass the count/page checks, a separate complete attempt paginates the primary public listing, reusing the initial profile page. Partial results from different endpoints are never combined to claim completeness. Every catalog video is enriched with the full video-detail schema, including description, category, tags, parts, actual uploader and seven engagement counters. Missing counters are not replaced with zero. uploadsCoverage separately reports listing and detail completion. If any video is unavailable, the creator remains incomplete and unbilled, with best-effort recovery. Large catalogs require one detail request per video; allow 15 minutes. Original topVideos summaries remain unchanged. Completion requires visiting every page advertised by the listing endpoint, matching the public-video count from the primary listing or public space navigation, and retaining all ten initial video IDs. Both public and pagination counts are exposed in uploadsCoverage; they can differ, and paginationCountMatches explicitly reports that discrepancy. This cross-check does not establish a historical or transactional snapshot. No transactional snapshot or unlimited catalog guarantee is made.

### Frequently asked questions

**When is this Bilibili scraper cheaper?** At the checked list prices, one run delivering 1,000 plain videos costs $0.49005 here versus TopAPI's $0.90 and Lofomachines' $2.00005 on Gold/Platinum/Diamond, including one start. One run delivering 1,000 standalone root comments costs $0.19005 here versus TopAPI's $0.44. These are scoped price comparisons checked November 3, 2026, not claims of identical features or guaranteed volumes. Lofomachines can be cheaper for many comments nested inside a single result.

**What exactly is charged?** Each complete video or creator costs $0.00049. Up to ten requested attached comments per parent result are included; each extra or standalone comment costs $0.00019. Additional unique catalog uploads beyond the ten included summaries count as video results. Each start costs $0.00005, including an empty or failed run. Platform usage is included; there is no separate compute or proxy surcharge.

**Do I need a Bilibili account?** No. Only publicly accessible data is requested. Apify account access is still required to run the Actor and access its stored exports.

**How do I scrape Bilibili comments, and can I get all of them?** You can request up to 5,000 root comments per video. Available data, runtime, size and source restrictions determine the delivered count. Replies and private/deleted content are not promised. Empty intermediate comment pages are skipped only when the source cursor advances; a stalled cursor or more than ten consecutive empty pages ends with an explicit error.

**Are creator comments included ten per video?** The price includes ten across the complete creator result. The collection limit is independently controlled by `maxCommentsPerVideo`.

**Does a successful source request mean complete data?** No. Pagination, uniqueness and requested-field checks also apply. Recovery files explicitly describe partial progress.

**How do I export a complete creator catalog?** Select `profiles`, provide a creator URL and enable `includeAllUploads`. Full details are saved in `uploads`, with completion reported in `uploadsCoverage`. An unavailable video or interrupted listing makes that creator result incomplete and unbilled; best-effort recovery is separate. Comments apply only to the ten recent videos, not the entire catalog.

**How much does a small test cost?** Five plain video results in one start cost $0.00250; 20 standalone comments cost $0.00385. These are list-price calculations for those delivered volumes, including platform usage and one start. Account credits and spending limits still apply.

**Can I use the API?** The Actor accepts the JSON inputs above through Apify. The run output links to its dataset and coverage summary. Actor metadata, prices and documentation can also be read through Apify MCP; this retrieval has been verified. An MCP-triggered run and specific n8n, Make or Zapier workflows have not been independently verified.

### Chinese guide — 中文说明

低成本获取哔哩哔哩（B站）公开视频、UP主资料、完整公开视频目录和根评论，无需登录B站账号。视频及UP主结果 **每1,000条0.49美元**，独立或额外评论 **每1,000条0.19美元**；每次启动另收 **0.00005美元**。完整计费条件见下文。

[English examples and output fields](#first-useful-result)

#### 适用场景：视频表现、UP主研究与评论分析

- **B站视频数据采集**：按关键词搜索或输入视频链接，导出播放量、点赞、投币、收藏、分享及标签，用于比较内容表现。
- **UP主数据与视频目录导出**：获取公开资料、粉丝数和近期作品；开启完整目录选项后，采集目录中每个可用视频的完整详情。
- **B站评论采集**：保留根评论文本、作者、时间和视频关联，供后续人工研究或自行分析。本工具不进行AI情感分析。

#### 快速开始：先获取五个视频

```json
{"searchTerms":["minecraft"],"maxItems":5}
```

#### 独立评论示例：每条评论一行

```json
{"mode":"comments","startUrls":[{"url":"https://www.bilibili.com/video/BV1oe4y1Y7n5"}],"maxItems":20,"maxCommentsPerVideo":20,"commentsSort":"recent"}
```

#### 导出UP主完整公开视频目录

```json
{
  "mode": "profiles",
  "startUrls": [
    {
      "url": "https://space.bilibili.com/3745000386988717"
    }
  ],
  "maxItems": 1,
  "includeAllUploads": true,
  "largeResultFiles": true
}
```

大型目录建议设置15分钟超时，并预留足够的运行费用上限。`maxItems: 1` 限制UP主结果行数，不限制其嵌套视频数量。`uploads` 保存详情，`uploadsCoverage` 说明目录和详情是否完整。2026年11月3日该示例验证得到83个视频；数量会变化，不能保证持续相同。

#### 输出与价格

支持关键词搜索、视频链接、UP主链接和独立评论模式。视频结果包含可用的统计数据、标签和分P信息；UP主资料包含粉丝数、关注数、认证信息和十个近期视频摘要。评论包含文本、作者、点赞数、回复数和发布时间。回复数量不代表已采集回复内容；本工具不采集弹幕文本、字幕或视频文件。

价格：视频或UP主资料每1,000条结果0.49美元。每条完整结果包含前10条已请求的评论；UP主资料按整个资料合计10条，并非每个视频10条。额外评论及独立评论模式每1,000条0.19美元。每次运行另收0.00005美元启动费，即使没有结果或运行失败也会收取。错误记录、重复记录和不完整的恢复文件不收费；后续失败不影响此前完整结果的计费。可选完整目录中，超出十个已包含视频摘要的每个新增独立视频按结果计费，每1,000条0.49美元。部分目录视频的上传者可能与所查询的UP主不同，输出保留两者的ID。我们不保证在所有情况下价格低于Lofomachines。

单次运行的总价示例：1,000条不含评论的视频为0.49005美元；1,000条独立评论为0.19005美元。示例是价格计算，不保证结果数量。

默认将结果内嵌保存至数据集。启用 `largeResultFiles` 后，超大完整结果保存在gzip JSON文件中，数据集通过 `fullResult.url` 提供索引；文件保留全部原始字段。中断产生的恢复文件标记为 `complete: false`，不算完整结果。发生源站错误时，即使已有部分完整结果，运行也会标记为失败，请同时检查数据集和覆盖报告。

`includeAllUploads` 云测试已验证83、134和1,203个独立视频的完整目录详情；这些样本不保证每个UP主都能完整采集。源站HTTP 412可能中断视频目录分页。评论仅针对 `topVideos` 中的十个视频。实际可用内容、时间和大小限制可能影响采集结果，不承诺完整历史、无限采集或持续可用。

最高费用在采集前检查。嵌套评论按请求上限预留预算，预算不足时不开始该结果。重启不会重复收取已保存的结果和评论费用，但Apify会再次收取启动费。

完整目录优先使用每页最多99条的列表接口；访问失败或数量、分页验证未通过时，复用个人资料的首个视频页面并独立完整遍历主要接口。不会合并两个接口的部分结果来宣称完整。每个目录视频都会查询完整详情，包括简介、分区、标签、分P、实际上传者和七项互动统计。缺失统计不会填为零。任何视频不可用时，整个资料保持不完整且不收取结果费用。大型目录建议设置15分钟超时。完整目录验证要求遍历所有分页，匹配主要列表或公开空间导航提供的视频数，并保留初始十个视频ID。主要列表被阻止时，资料可使用公开空间数量和另一公开视频列表，并逐个查询十个视频的实际统计；profileCoverage 会标明来源，不会把缺失的评论数填为零。两个接口的数量差异会明确记录，不保证历史快照。

#### 哪些场景更省钱？

以下为2026年11月3日核对的美元标价，按一次运行、相同已交付数据数量计算。我们的总价包含一次启动及平台用量，不另收计算或代理费用。

| 单次运行的输出 | 本工具总价 | 对比标价 | 结论 |
|---|---:|---:|---|
| 1,000条视频，不含评论 | **$0.49005** | TopAPI $0.90000 | **低45.6%** |
| 1,000条视频，不含评论，Gold / Platinum / Diamond | **$0.49005** | Lofomachines $2.00005 | **低75.5%** |
| 1,000条独立根评论，不含视频或回复 | **$0.19005** | TopAPI $0.44000 | **低56.8%** |
| 1个视频附100条根评论，Gold | **$0.01764** | Lofomachines $0.00205，前提是全部包含于一个结果 | Lofomachines可能更便宜；该交付量未经实测 |

Lofomachines对比按一次启动事件计算，实际启动次数及内存会影响总价；Free档1,000条视频标价合计$4.50005，但评论有限额，不能把Free档1,000条评论视为同等可交付量。TopAPI无启动事件；本工具即使零结果也收$0.00005启动费。价格来源及完整条件见英文[对比表](#when-is-this-bilibili-scraper-cheaper)。不保证全场景最低价、速度领先或完整功能对等；本工具不采集回复内容或弹幕文本。

#### 常见问题

**为什么这个B站采集器更便宜？** 在上述相同数据量的比较中，本工具的视频和独立根评论单价更低，且平台用量已包含。大量评论嵌套在单个结果时，Lofomachines可能更便宜。请按所需输出和套餐比较总价，而非只看起价。

**需要登录B站或提供Cookie吗？** 不需要。只采集公开可访问数据；运行和查看导出结果仍需要Apify账号。

**采集20条评论需要多少钱？** 单次启动并成功返回20条独立评论的标价为0.00385美元，已包含启动费及平台用量。实际评论数量受源站可用性影响。

**“完整目录”包含什么？** 每个可用目录视频的详情、标签、分P和互动统计。任一视频详情缺失时，该UP主结果不标记完整，也不收取结果费用；可能另存不完整恢复文件。

**是否采集评论回复、弹幕或字幕？** 不采集回复内容、弹幕文本或字幕。`replyCount` 和 `danmakuCount` 仅为数量统计。

**能导出JSON或通过API读取吗？** 可以。数据集提供结构化记录；大型完整文件通过 `fullResult.url` 获取。嵌套目录建议使用JSON保留全部结构。

### Related public-data tools

For complementary community research, [Telegram Channel Scraper](https://apify.com/monkey.d.scraping/telegram-channel-scraper) exports public channel history to structured records. This is a separate Actor and is never called by this Bilibili Actor.

# Actor input Schema

## `mode` (type: `string`):

Search/videos: complete video results at $0.49/1,000. Profiles: creator results at the same rate. Comments: standalone root comments at $0.19/1,000. Each start adds $0.00005; platform usage is included.

## `searchTerms` (type: `array`):

Used for video search or creator discovery. Leave empty for video URLs and comments.

## `startUrls` (type: `array`):

Video URLs for details/comments; space.bilibili.com URLs for creators. Short b23.tv video links are accepted.

## `maxItems` (type: `integer`):

Maximum dataset rows across all inputs, not a guaranteed count. In profiles mode this limits creators, not nested uploads or comments. Complete video/creator rows cost $0.49/1,000; standalone comment rows $0.19/1,000; $0.00005/start.

## `sortBy` (type: `string`):

Applies to video search.

## `onlyPostsAfter` (type: `string`):

Search and standalone comments only. Use an ISO date or a relative age such as 3 months; date-only boundaries include the selected day.

## `onlyPostsBefore` (type: `string`):

Search and standalone comments only. Use an ISO date or a relative age such as 3 months; date-only boundaries include the selected day.

## `getComments` (type: `boolean`):

Adds comments to videos or the ten summaries in each creator. Ten comments total per parent result are included; extra comments cost $0.19 per 1,000.

## `commentsSort` (type: `string`):

Recent follows publication time; top follows the source popularity order.

## `maxCommentsPerVideo` (type: `integer`):

Limit for standalone or attached comments. Large nested requests require additional runtime.

## `includeAllUploads` (type: `boolean`):

Profiles only. Adds every public catalog video with full video details and engagement statistics. Extra unique videos beyond ten included summaries cost $0.49 per 1,000. Allow 15 minutes for large catalogs. If any listing or detail is unavailable, incomplete recovery is free.

## `largeResultFiles` (type: `boolean`):

When a result exceeds the inline dataset budget, save the complete unchanged result as a downloadable gzip JSON file. The dataset contains an explicit index with fullResult.url instead of nested comments/uploads. Incomplete recoveries remain separate and free. Use this option for large creator collections.

## Actor input object example

```json
{
  "mode": "search",
  "searchTerms": [
    "minecraft"
  ],
  "maxItems": 5,
  "sortBy": "relevance",
  "getComments": false,
  "commentsSort": "top",
  "maxCommentsPerVideo": 50,
  "includeAllUploads": false,
  "largeResultFiles": false
}
```

# Actor output Schema

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

Complete saved video, creator or standalone root-comment records. Large-file results contain fullResult.url. A creator row may contain separately billed extra catalog uploads and comments; dataset row count alone is not total billable units.

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

Collection coverage, skipped-video warnings, errors and incomplete recovery-file references. Search detail -404 warnings are non-fatal only when maxItems complete results are collected. Incomplete recovery files are not complete dataset results and are not billed as results.

# 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 = {
    "searchTerms": [
        "minecraft"
    ],
    "maxItems": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("monkey.d.scraping/bilibili-scraper").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 = {
    "searchTerms": ["minecraft"],
    "maxItems": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("monkey.d.scraping/bilibili-scraper").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 '{
  "searchTerms": [
    "minecraft"
  ],
  "maxItems": 5
}' |
apify call monkey.d.scraping/bilibili-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,monkey.d.scraping/bilibili-scraper"
        }
    }
}
```

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/csOv4VgWsRc8sCpOG/builds/zSp9QoB2OHsZeIVJ2/openapi.json
