# Bilibili Video Downloader (`truefetch/bilibili-video-downloader`) Actor

Process one public Bilibili video page for structured metadata, optional comment details, and an optional stored video file. Choose metadata-only mode or a download quality preference.

- **URL**: https://apify.com/truefetch/bilibili-video-downloader.md
- **Developed by:** [TrueFetch](https://apify.com/truefetch) (community)
- **Categories:** Videos, Integrations, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

Bilibili Video Downloader prepares one public Bilibili video page as structured metadata, optional comment details, and an optional stored video file within an Apify workflow.

- The effective input schema has three fields, with only `video_url` required.
- Four explicit quality values separate metadata-only processing from low, medium, and high download preferences.
- The Dataset schema contains 39 fields for identity, uploader, engagement, media properties, comments, processing context, and file delivery.
- The local pay-per-event configuration declares start, usage, $0.11 metadata, and $0.30 download events.

**[Run a one-result test](https://apify.com/truefetch/bilibili-video-downloader)**

**[View API](https://apify.com/truefetch/bilibili-video-downloader/api)**

Test one public Bilibili URL in `metadata` mode before requesting comments or a file.

### What does Bilibili Video Downloader do?

Bilibili Video Downloader is scoped to one known Bilibili video page per run. It normalizes the values available for that page into an Apify Dataset record: video identity, thumbnail, title and description, duration, publication time, uploader details, categories, tags, engagement counts, frame information, audio metadata, and processing context.

The optional `max_comments` input requests individual comment details when the source provides them. The setting is a ceiling, not a promised count. A page can expose a total comment number while returning fewer or no comment objects.

When `video_quality` requests a download, the Actor can store the resulting video and return its storage URL. Quality names express a preference over formats available for the page; they do not guarantee that every Bilibili video publishes the same resolution or media combination.

The Actor does not search Bilibili, expand a user space, crawl a playlist, process a batch array, or handle account-only data.

### How do I run Bilibili Video Downloader?

Because the Actor was not publicly listed at the verification checkpoint, first publish or open the draft in Apify Console. Confirm that the effective input form shows the Bilibili title and three fields documented here.

Use the shared schema example for a smallest metadata check:

```json
{
  "video_url": "https://www.bilibili.com/video/BV17x411w7KC",
  "video_quality": "metadata"
}
```

Start the run and inspect **Results**. If the page returns a coherent Dataset item, add a small `max_comments` value in a second run. Test the download preference last. This sequence separates page access, comment availability, and media storage, which makes a failed acceptance check easier to diagnose.

Do not assume that a URL accepted by a browser session is publicly accessible without that session. Use only content you are authorized to process, and apply the rights and policy rules relevant to your intended use.

### What data does Bilibili Video Downloader return?

The effective Dataset contract exposes these 39 fields:

| Group | Dataset fields |
|---|---|
| Processing | `processor`, `processed_at` |
| Video page | `id`, `thumbnail`, `platform`, `title`, `description`, `duration`, `published_at` |
| Uploader | `author`, `author_id`, `author_url` |
| Classification | `categories`, `tags` |
| Engagement | `view_count`, `like_count`, `shares_count`, `dislike_count`, `comment_count` |
| Media | `width`, `height`, `fps`, `audio_title`, `audio_artist` |
| Optional details | `comments`, `video` |

| Source and availability | `source_url`, `media_type`, `live_status`, `availability`, `age_limit`, `language` |
| Creator reach | `followers`, `is_verified` |
| File and captions | `file_ext`, `file_size`, `saves_count`, `subtitles`, `chapters` |
An abbreviated illustrative item for the same BV URL is:

```json
{
  "id": "BV17x411w7KC",
  "platform": "BiliBili",
  "title": "Example Bilibili video title",
  "author": "Example uploader",
  "thumbnail": "https://example.com/bilibili-thumbnail.jpg",
  "view_count": null,
  "comments": [],
  "video": ""
}
```

This example documents shape, not current source values. Fields can be null or empty when unavailable. In metadata mode, an empty `video` is expected. A returned comment object can contain `author`, `text`, `like_count`, and `published_at`.

### What inputs can I configure?

The input schema order is:

| Input | Required | Contract |
|---|---:|---|
| `video_url` | Yes | One public Bilibili video page URL. |
| `video_quality` | No | `metadata`, `low`, `medium`, or `high`; metadata mode skips file storage. |
| `max_comments` | No | Integer from 0 through 10,000; 0 skips comment retrieval and a positive value sets a requested ceiling. |

Only the required URL contains a prefill and example. Optional controls are not prefilled, preserving whether a value was actually provided. Keep the comment ceiling small during validation; a large request can increase work without proving that the page makes those comments available.

### What platforms and markets does Bilibili Video Downloader cover?

The public contract targets Bilibili video pages. It has no market, locale, language, uploader, keyword, category, date, playlist, or account filter. Bilibili also has series, collections, live pages, audio pages, international variants, and account-scoped areas; those page types are not promised by this one-video schema.

Current upstream coverage references BiliBili and multiple related Bilibili extractors, but the upstream project itself warns that listed sites are not guaranteed because websites change. The only reliable acceptance test is the exact public page type your workflow will submit.

Regional access, account state, removed content, and source changes can affect results. Preserve the submitted URL with the run ID and avoid generalizing from one successful page to every Bilibili surface.

### Why use Bilibili Video Downloader?

The Actor gives an application one stable set of field names around a Bilibili video URL. A data team can consume a Dataset item instead of manually copying metadata. An authorized archive can associate a stored file with the URL, uploader, publication time, and engagement snapshot from the processing run.

Metadata mode supports page qualification before media transfer. Comment retrieval is explicitly optional. The thumbnail-first Dataset overview improves human review, and nullable values keep unavailable data distinct from real zeros.

That means the README can make the contract clear, but it cannot supply public ratings, customer quotes, usage counts, or a verified Store identity. Those items must be evaluated after the Actor is published.

### Who is Bilibili Video Downloader for?

Developers can use it behind a Bilibili URL submission workflow. Researchers can document metadata from a defined public sample. Content operations teams can review authorized videos with uploader and engagement context. Archivists can preserve permitted media and processing timestamps. AI teams can feed the available title, description, tags, or stored media into a separate downstream analysis step.

Console users can run one URL without writing code after the Actor is available in their Apify account.

It is not for Bilibili search, user-space crawling, playlist discovery, private content, live recording, rights determination, or guaranteed comment collection. A separate subtitle or speech-to-text Actor is more appropriate when the required output is text rather than page metadata and a video file.

### How can I use Bilibili Video Downloader through the API or MCP?

The following request is syntactically valid and uses the shared scenario, but the named public route will not run until the Actor is published under that reference:

```bash
curl -X POST "https://api.apify.com/v2/acts/truefetch~bilibili-video-downloader/runs?token=$APIFY_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"video_url":"https://www.bilibili.com/video/BV17x411w7KC","video_quality":"metadata"}'
```

The same publication dependency applies to a focused MCP configuration:

```json
{
  "mcpServers": {
    "apify-bilibili": {
      "url": "https://mcp.apify.com?tools=truefetch/bilibili-video-downloader",
      "headers": {
        "Authorization": "Bearer <APIFY_TOKEN>"
      }
    }
  }
}
```

Use the same JSON input when calling the tool. Follow the [official Apify MCP guide](https://docs.apify.com/integrations/mcp) for authentication and client setup.

### How much does Bilibili Video Downloader cost?

These are the effective local metadata prices, not a verified published Store offer:

| Declared event | Billing unit | Local price |
|---|---|---:|
| `apify-actor-start` | Actor start | $0.01 |
| `actor_usage` | Metered usage event | $0.00001 |
| `metadata` | One processed video without file download | $0.11 |
| `download` | One processed video with file download and storage | $0.30 |

For the smallest metadata-only test, the declared fixed events total $0.12 for Actor start plus metadata, before metered usage or any platform costs. A download path uses the $0.30 download event instead of the metadata event.

Publication can change pricing behavior. Verify the live Store configuration and a completed run’s charges before presenting these amounts to customers. No tier-specific prices exist in the local metadata.

### How does Bilibili Video Downloader compare with alternatives?

| Option | Choose it for | Main trade-off |
|---|---|---|
| Bilibili Video Downloader | One known Bilibili video needing metadata, comments when available, or a file ||
| Best Video Downloader | A queue that mixes Bilibili with other supported video sites | Broader scope with less Bilibili-specific documentation. |
| Video To Text | Speech transcription from authorized media | Text output rather than this page-metadata contract. |
| Video Subtitles Downloader | Existing caption or subtitle tracks | Does not replace full video metadata and file processing. |

Choose based on the required input entity and output artifact. A Bilibili page record, comment sample, stored video, subtitle file, and transcript are separate products.

### What are the limits and troubleshooting steps?

The Actor accepts one URL. Batch lists, search, uploader expansion, playlists, live pages, credentials, and market filters are absent. Comment results are source-dependent. Quality values are preferences. Nullable fields are expected, and repeated runs do not deduplicate prior results.

If the draft fails, confirm the actor title and schema use Bilibili branding, then test metadata mode with the example URL. If a representative public BV page fails, inspect the run log and verify source access. Add a small comment ceiling only after metadata succeeds. Test media last and inspect storage when `video` remains empty.

The public Store, API, and Issues pages did not exist at the verification checkpoint, so public issue history and real-run feedback could not be reviewed. Publication identity is a release blocker rather than evidence that the Actor has no defects.

### Frequently asked questions

#### How do I choose between `bvid` and short links?

Pass the canonical `bilibili.com/video/BV..` address. Short share links and app redirects may resolve to a player page that does not expose the same identifiers, which leaves `id`, `author_id`, and engagement counters empty. Resolve the redirect in a browser first and submit the address that shows the `BV` code.

#### Are comments guaranteed?

No. `max_comments` sets a requested maximum; the source can return fewer or none.

#### Can it process a playlist or uploader space?

No. The effective input accepts one video URL.

#### Does high quality guarantee a fixed resolution?

No. Available formats for the supplied page determine the result.

#### Why is a count null?

The source did not expose a usable value. Keep null distinct from zero.

#### Does metadata mode store media?

No. The `video` field is expected to be empty.

#### How does regional availability affect a run?

Bilibili applies region and login rules per video. When the source withholds the playback manifest, the run cannot reach the publish threshold and ends without a Dataset item, so no result event is charged. Retry in metadata mode and confirm the page plays without an account before requesting a file.

#### Does a multi-part video return every part?

No. One run resolves one page and writes one Dataset item. A multi-part upload reports the page-level title and duration that Bilibili exposes for the default part. Submit each part URL separately when you need per-part media facts.

#### What is the smallest safe way to trial the Actor?

Run one short, openly playable video in `metadata` mode and leave `max_comments` at its prefilled value. That path charges one Actor start event plus one metadata event and stores no file, so the trial cost is bounded and predictable. Inspect `id`, `platform`, `title`, `author`, and `duration` in the returned item and compare them against the page before you spend a download event. Once the identifiers line up, switch a single run to `low` to confirm that storage and the returned `video` URL behave the way your pipeline expects.

### Related TrueFetch Actors

- [Best Video Downloader](https://apify.com/truefetch/best-video-downloader) covers mixed supported video sources.
- [Video To Text](https://apify.com/truefetch/video-to-text) produces speech text from authorized media.
- [Video Subtitles Downloader](https://apify.com/truefetch/video-subtitles-downloader) retrieves subtitle tracks when those are the required artifact.

### Support

- [Apify Actor dashboard](https://apify.com/truefetch/bilibili-video-downloader)
- [Apify Actor API reference](https://apify.com/truefetch/bilibili-video-downloader/api)
- [Official Apify MCP documentation](https://docs.apify.com/integrations/mcp)
- [TrueFetch community](https://t.me/TrueFetch)
- [Direct support](https://t.me/AiAgentApi)

Report a problem with the public Actor link, stable ID, redacted input, run ID, expected field or file, and observed result.

**[Run a one-result test](https://apify.com/truefetch/bilibili-video-downloader)**

**[View API](https://apify.com/truefetch/bilibili-video-downloader/api)**

# Actor input Schema

## `video_url` (type: `string`):

Public Bilibili video page URL to process.

## `video_quality` (type: `string`):

Preferred download quality, or metadata-only mode without a video file.

## `max_comments` (type: `integer`):

Maximum Bilibili comment details to request; use 0 to skip them.

## Actor input object example

```json
{
  "video_url": "https://www.bilibili.com/video/BV17x411w7KC",
  "max_comments": 2
}
```

# Actor output Schema

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

All video details and optional download links with full engagement stats and comments

# 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 = {
    "video_url": "https://www.bilibili.com/video/BV17x411w7KC",
    "max_comments": 2
};

// Run the Actor and wait for it to finish
const run = await client.actor("truefetch/bilibili-video-downloader").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 = {
    "video_url": "https://www.bilibili.com/video/BV17x411w7KC",
    "max_comments": 2,
}

# Run the Actor and wait for it to finish
run = client.actor("truefetch/bilibili-video-downloader").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "video_url": "https://www.bilibili.com/video/BV17x411w7KC",
  "max_comments": 2
}' |
apify call truefetch/bilibili-video-downloader --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=truefetch/bilibili-video-downloader",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/wOcPn4R2beMbfK5k5/builds/7wXSmSLxjFRiSbNCY/openapi.json
