# Bilibili Scraper B站: Comments, Danmaku 弹幕 & Videos (`molded_mountainpass/bilibili-scraper`) Actor

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

- **URL**: https://apify.com/molded_mountainpass/bilibili-scraper.md
- **Developed by:** [Divya Raj](https://apify.com/molded_mountainpass) (community)
- **Categories:** Social media, Videos, AI
- **Stats:** 1 total users, 1 monthly users, 87.5% runs succeeded, 0 bookmarks
- **User rating**: 4.00 out of 5 stars

## Pricing

from $5.00 / 1,000 comments

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

### What is Bilibili Scraper?

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

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

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

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

### What you can scrape

| Mode | One row per | Login needed? |
|---|---|---|
| **Videos** | video: title, views, likes, coins, favourites, shares, danmaku and comment counts, duration, uploader, category, tags | No |
| **Comments** | comment or reply: text, likes, replies, author level, VIP and verification badges, pinned flag, "liked by uploader" | No |
| **Danmaku** | bullet comment: text, playback second, colour, mode, send time, anonymised sender | No |
| **Subtitles** | subtitle track (including AI captions) with every cue and the full text; filter by language, all parts of multi-part videos | Yes |
| **Creator profiles** | creator: followers, following, video count, total likes, level, verification | No |

Find videos from any mix of:

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

### Use cases

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

### Why this scraper

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

### Do I need to log in?

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

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

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

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

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

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

### How to use it

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

#### Example inputs

Comments with sentiment for the top 20 search results:

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

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

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

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

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

### Output example

A video row with a danmaku profile (shortened):

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

A comment row (illustrative values):

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

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

### Pricing

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

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

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

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

### Sentiment analysis

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

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

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

### Tips

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

### Limits

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

### FAQ

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

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

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

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

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

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

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

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

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

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

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

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

### 中文简介

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

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

# Actor input Schema

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

Row type to output. Pick Danmaku here to get bullet comments; the danmaku settings further down only tune that mode. Videos are discovered from the sources below; comments, danmaku and subtitles are then collected for every discovered video. 'users' outputs creator profiles for the given user IDs / space URLs. Only 'subtitles' needs the SESSDATA cookie below.

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

Video URLs (bilibili.com/video/BV…, b23.tv short links), creator pages (space.bilibili.com/123) or search pages (search.bilibili.com/all?keyword=…).

## `videoIds` (type: `array`):

BV ids or av ids.

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

Each keyword is searched and up to 'Max videos per source' results are used.

## `userIds` (type: `array`):

In 'users' mode: profiles. In other modes: the creator's uploads are used as videos.

## `feed` (type: `string`):

Also take videos from the popular feed or the top-100 ranking.

## `rankingCategory` (type: `integer`):

0 = all. E.g. 1 animation, 3 music, 4 games, 36 knowledge, 188 tech, 160 life, 211 food.

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

Hard cap on billable rows for the whole run.

## `maxVideosPerSource` (type: `integer`):

Per search keyword, creator or feed.

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

Absolute date (2024-05-01) or relative ('7 days', '12 hours'). Applies to videos and comments; pagination stops early where possible, which keeps runs cheap.

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

Absolute date (2024-05-01) or relative ('30 days'). Skips videos published later. Search applies it on Bilibili's side, at no extra cost.

## `searchOrder` (type: `string`):

Order of search results. Bilibili returns at most 1,000 results per search.

## `searchDuration` (type: `string`):

Only return search results of this length. Bilibili filters them itself, at no extra cost.

## `uploadOrder` (type: `string`):

Order of a creator's uploads. With 'Newest', 'Published after' stops pagination at the first older upload.

## `fullDetails` (type: `boolean`):

Search/creator/feed rows already contain title, views, duration, etc. Enable to fetch the full detail record (likes, coins, shares, parts) for each — one extra request per video.

## `includeTags` (type: `boolean`):

Adds the video's tags to each video row (one extra request per video).

## `danmakuProfile` (type: `boolean`):

Adds danmaku_profile to video rows: how many danmaku are in the recent pool, a 20-slice density timeline, the busiest moment, the most repeated phrases and text samples. One extra request per video, plus the detail request when the video came from a search, creator or feed listing. No extra charge.

## `danmakuSamplesPerVideo` (type: `integer`):

How many danmaku texts the profile includes, spread evenly over the video.

## `commentsSamplePerVideo` (type: `integer`):

Adds the N hottest comments to each video row (no extra charge per comment).

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

Top-level comments per video, 0 = all. Replies (if included) come on top. No login needed.

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

Hottest first, or newest first. With 'Newest', 'Published after' stops pagination at the first older comment.

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

Also output the nested replies under each comment.

## `maxDanmakuPerVideo` (type: `integer`):

Only used when 'What to scrape' (at the top) is Danmaku. 0 = everything Bilibili serves.

## `danmakuSource` (type: `string`):

Only used when 'What to scrape' (at the top) is Danmaku. Bilibili serves a sample spread over the video's lifetime (protobuf segments) and the most recent pool of a few thousand (XML). They barely overlap, so 'both' returns the most danmaku for one extra request per video.

## `allParts` (type: `boolean`):

Only used when 'What to scrape' is Danmaku or Subtitles. Danmaku and subtitles for every part (P1, P2, …) of a multi-part video, instead of only the first.

## `subtitleLanguages` (type: `array`):

Only used when 'What to scrape' (at the top) is Subtitles. Only these subtitle tracks, by language code, for example ai-zh (AI Chinese captions), zh-CN, zh-Hans or en-US. Leave empty for every track. The 'subtitles' mode needs a SESSDATA cookie (see 'Access & performance').

## `sentimentAnalysis` (type: `boolean`):

Labels every comment and danmaku positive, neutral or negative with a score from -1 to 1, using an AI model that understands Bilibili slang. Video rows get a summary over their danmaku samples and embedded top comments (turn on 'danmaku profile' or 'top comments'). Charged per label as a 'sentiment' event.

## `sentimentApiKey` (type: `string`):

Free key from console.groq.com (no card needed), or a key for the provider below. Sentiment analysis needs one. Stored encrypted.

## `sentimentModel` (type: `string`):

Model name at the provider. Default: GPT-OSS 120B on Groq. If the provider has retired the model, the actor picks the best available one and logs which.

## `sentimentApiUrl` (type: `string`):

Any OpenAI-compatible chat completions API. Default: Groq.

## `onlyNewItems` (type: `boolean`):

Skip videos/comments/danmaku already returned by earlier runs with the same sources. You pay only for what is new — ideal for scheduled monitoring.

## `deltaKey` (type: `string`):

Optional name to share delta history between tasks. Defaults to a hash of mode + sources.

## `sessdata` (type: `string`):

Login cookie from a bilibili.com account (not bilibili.tv). Needed only for the 'subtitles' mode; every other mode, comments included, works without it. In your browser, log in to bilibili.com, open DevTools (F12) > Application > Cookies > https://www.bilibili.com and copy the full SESSDATA value from the Cookie Value pane (about 200 characters). Step-by-step guide in the README. Stored encrypted.

## `proxyStrategy` (type: `string`):

'Auto' starts with no proxy (cheapest) and escalates to datacenter, then residential proxies only if Bilibili starts blocking.

## `proxyCountry` (type: `string`):

Two-letter code, e.g. HK, TW, SG. Empty = any.

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

Used only with the 'Custom' strategy.

## `maxRequestsPerSecond` (type: `integer`):

Upper limit on requests to Bilibili. Higher is faster but triggers more risk-control blocks.

## `maxConcurrency` (type: `integer`):

How many videos are scraped at the same time (still bounded by the request rate).

## `healthCheck` (type: `boolean`):

For scheduled monitoring: marks the run as failed (so Apify can email you) when it returns no rows or any error row.

## Actor input object example

```json
{
  "mode": "videos",
  "startUrls": [
    {
      "url": "https://www.bilibili.com/video/BV1xx411c7mD"
    }
  ],
  "feed": "none",
  "rankingCategory": 0,
  "maxItems": 1000,
  "maxVideosPerSource": 50,
  "searchOrder": "totalrank",
  "searchDuration": "any",
  "uploadOrder": "pubdate",
  "fullDetails": false,
  "includeTags": false,
  "danmakuProfile": false,
  "danmakuSamplesPerVideo": 25,
  "commentsSamplePerVideo": 0,
  "maxCommentsPerVideo": 200,
  "commentSort": "hot",
  "includeReplies": false,
  "maxDanmakuPerVideo": 0,
  "danmakuSource": "both",
  "allParts": false,
  "subtitleLanguages": [
    "ai-zh",
    "zh-CN"
  ],
  "sentimentAnalysis": false,
  "sentimentModel": "openai/gpt-oss-120b",
  "sentimentApiUrl": "https://api.groq.com/openai/v1",
  "onlyNewItems": false,
  "proxyStrategy": "auto",
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "maxRequestsPerSecond": 4,
  "maxConcurrency": 4,
  "healthCheck": false
}
```

# Actor output Schema

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

Every row of the run: videos, comments, danmaku, subtitles or creator profiles, plus free error rows.

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

No description

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

No description

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

No description

## `errors` (type: `string`):

No description

## `runStats` (type: `string`):

Requests, megabytes, blocks, proxy tier and sentiment usage.

# 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 = {
    "startUrls": [
        {
            "url": "https://www.bilibili.com/video/BV1xx411c7mD"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("molded_mountainpass/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 = { "startUrls": [{ "url": "https://www.bilibili.com/video/BV1xx411c7mD" }] }

# Run the Actor and wait for it to finish
run = client.actor("molded_mountainpass/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 '{
  "startUrls": [
    {
      "url": "https://www.bilibili.com/video/BV1xx411c7mD"
    }
  ]
}' |
apify call molded_mountainpass/bilibili-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,molded_mountainpass/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/58hsOgj2aXz7UMvZc/builds/OKmrUDniOK4eMGwj9/openapi.json
