# Bilibili Scraper: Views, Coins, Danmaku & Tags per Video (`h1018y/anvil-bilibili-videos`) Actor

Scrapes Bilibili with a Bilibili scraper for search results, the popular list and video links. Give search terms or links; get each video's views, likes, coins, danmaku, tags, uploader and publish time as rows, never the video file.

- **URL**: https://apify.com/h1018y/anvil-bilibili-videos.md
- **Developed by:** [ANVIL Tools](https://apify.com/h1018y) (community)
- **Categories:** Videos, Social media
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.02 / 1,000 results

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/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: Views, Coins, Danmaku & Tags per Video

**Bilibili Scraper** - Get Bilibili video stats from search, the popular list or links, with a new-video feed for schedules.

### What does Bilibili Scraper do?

Returns coins, shares, danmaku count, tags and uploader followers per video, and an only-new mode that gives just the videos not seen in the last run.

- Keyword search with sort by views, newest, danmaku or favorites
- Popular list and direct video links, BV ids and b23.tv short links
- Views, likes, coins, shares, favorites, danmaku count, tags, publish time
- Only-new mode with views gained since the last run for schedules
- Same input and output field names as truefetch/bilibili-video-downloader - switch by changing the actor id

### Who uses Bilibili Scraper, and for what

- Marketers - watch which videos trend for a keyword in China every morning
- Creators - compare views, coins and danmaku of competing videos
- Researchers - export search results and tags of a topic
- Programs - poll one keyword on a schedule and receive only new videos

### Why this Bilibili Scraper?

Downloader-style tools fail for researchers because they cannot search or list videos and return file info they do not need. This Bilibili Scraper checks every run and tells you plainly when a page could not be read, instead of returning empty or wrong rows.

### Data you get from Bilibili Scraper

Every result is one flat row with these fields (values from a real run):

| Field | Example |
|---|---|
| `id` | BV1TxxC6vEo4 |
| `bvid` | BV1TxxC6vEo4 |
| `aid` | 117534648963255 |
| `url` | https://www.bilibili.com/video/BV1TxxC6vEo4 |
| `source_url` | https://www.bilibili.com/video/BV1TxxC6vEo4 |
| `platform` | bilibili |
| `title` | 全球笑点下降2000倍而我不变【第二集】 |
| `description` | 这一集等于我做三个视频了...我要去睡觉了 不过，很多朋友不知道怎么看完整版，关注雀巢 搞笑人才断代，龙国岌岌可危，雀巢... |
| `thumbnail` | https://i2.hdslb.com/bfs/archive/b469c3f10f8498c42cd3a29741f... |
| `author` | 逗比的雀巢 |
| `author_id` | 5294454 |
| `author_url` | https://space.bilibili.com/5294454 |
| `followers` | null |
| `is_verified` | null |
| `duration` | 968 |
| `published_at` | 2026-10-31T08:56:20+00:00 |
| `view_count` | 1496278 |
| `like_count` | 201554 |
| `comment_count` | 7593 |
| `shares_count` | 16710 |
| `saves_count` | 56829 |
| `dislike_count` | 0 |
| `coin_count` | 136420 |
| `danmaku_count` | 11197 |
| `categories` | null |

### How to use Bilibili Scraper

1. Press **Start** - the form already holds an example that works.
2. Put in your own input (see the fields on the Input tab).
3. Run it once, or put it on an **Apify Schedule** (with **only new** on, where the form has it) to get just what is new every day; add a **webhookUrl** to get each run's rows sent to your own system, Zapier, Make or Slack.
4. Download the results as JSON, CSV or Excel, or send them to Google Sheets, Zapier, Make, the Apify API or an AI agent (Apify MCP server).

#### Input example

```json
{
  "searchQueries": [
    "cat"
  ],
  "popular": false,
  "maxResults": 3,
  "sortBy": "views",
  "minViews": 0,
  "minLikes": 0,
  "includeDetails": true,
  "includeUploaderStats": false,
  "onlyNew": false,
  "useApifyProxy": true
}
```

#### Output example (a real run)

```json
[
  {
    "id": "BV1TxxC6vEo4",
    "bvid": "BV1TxxC6vEo4",
    "aid": 117534648963255,
    "url": "https://www.bilibili.com/video/BV1TxxC6vEo4",
    "source_url": "https://www.bilibili.com/video/BV1TxxC6vEo4",
    "platform": "bilibili",
    "title": "全球笑点下降2000倍而我不变【第二集】",
    "description": "这一集等于我做三个视频了...我要去睡觉了\n不过，很多朋友不知道怎么看完整版，关注雀巢\n搞笑人才断代，龙国岌岌可危，雀巢被推上擂台。全民嘲笑他长这么帅根本不会搞笑，樱花国笑出眼泪。下一秒，雀巢讲出核弹级地狱笑话。当雀巢获胜，全网跪了。世人终于颤栗，龙国的搞笑大王，终于诞生！",
    "thumbnail": "https://i2.hdslb.com/bfs/archive/b469c3f10f8498c42cd3a29741fe501fc9aad287.jpg",
    "author": "逗比的雀巢",
    "author_id": 5294454,
    "author_url": "https://space.bilibili.com/5294454",
    "followers": null,
    "is_verified": null,
    "duration": 968,
    "published_at": "2026-10-31T08:56:20+00:00",
    "view_count": 1496278,
    "like_count": 201554,
    "comment_count": 7593,
    "shares_count": 16710,
    "saves_count": 56829,
    "dislike_count": 0,
    "coin_count": 136420,
    "danmaku_count": 11197,
    "categories": null,
    "tags": [
      "搞笑视频",
      "高能",
      "幽默",
      "娱乐",
      "生活",
      "帅哥",
      "搞笑",
      "搞笑小剧场",
      "爽文",
      "整活"
    ],
    "language": null,
    "media_type": "video",
    "live_status": "not_live",
    "availability": "public",
    "age_limit": null,
    "width": 1920,
    "height": 1080,
    "fps": null,
    "video_codec": null,
    "source": "popular",
    "position": 1,
    "scrapedAt": "2026-10-31T17:55:36+00:00",
    "changeType": "new",
    "viewsSinceLastRun": null
  }
]
```

One flat row per result.

### Built for pipelines

- **Field names never change** - fixes and new features only ever add fields, so your code keeps working.
- **Every row has the same shape** - a missing value is `null`, never a dropped field.
- **A plain status line** on every run - how many results, and on a problem what to change in the input - for your logs and for AI agents.
- **Runs on its own** - put it on an Apify Schedule and add a `webhookUrl`: each run's rows go straight to your system, Zapier, Make or Slack.

### How much does Bilibili Scraper cost?

You pay only per result (pay per event) - no monthly fee, no minimum, and the price per result is lower on Apify's Bronze, Silver and Gold plans. The exact price is on the **Pricing** tab. Apify's free plan credit is enough to try it on real input.

| You want | What you pay for |
|---|---|
| A quick test with the example | a few results |
| A daily scheduled run | only the rows that run returns |
| A big one-off export | the results delivered - set a maximum in the input |

### Also searched as

- bilibili video scraper
- bilibili api
- bilibili trending
- bilibili search
- bilibili video stats

### FAQ

**Does Bilibili Scraper need a login, cookies or an API key?** No. It reads public pages only.

**Can I run Bilibili Scraper on a schedule?** Yes - with Apify Schedules; each run returns fresh rows.

**Can I call it from Python, JavaScript or an AI agent?** Yes - through the Apify API, the Apify client libraries or the Apify MCP server.

**Is it legal?** It collects only data anyone can see without logging in. You are responsible for using it within the source site's terms and data protection law (GDPR, CCPA).

**What if the site blocks a request?** The run retries from a fresh connection and, if it still cannot read the page, stops with a clear message - never with made-up rows.

**Do I need proxies?** No setup needed - Bilibili Scraper uses Apify Proxy by default where the site needs it.

### Troubleshooting

- **No results:** check the input (a public URL or a search term that returns results in a normal browser), then try the example input once.
- **Fewer results than expected:** raise the maximum in the input; some sites show only a part of their data without logging in, and Bilibili Scraper never logs in.
- **The run stopped with a message:** the message says what the site answered; run it again later or with fewer items.

### Your feedback

Missing a field, found a bug, or need another site? Open an issue on the **Issues** tab - issues are answered and fixed. If Bilibili Scraper saved you time, a short review on this page helps others find it.

Data source: [www.bilibili.com](https://www.bilibili.com)

### More tools from this developer

- [Tweet Scraper: Tweet Details by URL, No Login or Cookies](https://apify.com/h1018y/anvil-tweet-scraper)
- [YouTube Thumbnail Downloader: Bulk, Every Size & Titles](https://apify.com/h1018y/anvil-youtube-thumbnail-downloader)
- [ML Conference Finder: NeurIPS, ICLR & ICML Alternatives](https://apify.com/h1018y/anvil-ml-conference-finder)
- [YouTube Transcript Scraper: Find Every Moment a Word Is Said](https://apify.com/h1018y/anvil-youtube-transcript-scraper)
- [Facebook Ads Library Scraper: Only New Ads & Days Running](https://apify.com/h1018y/anvil-facebook-ads-library-scraper)
- [Reddit Scraper: Keyword Alerts for New Posts & Comments](https://apify.com/h1018y/anvil-reddit-scraper)
- [Twitter Scraper: New Tweets From Any X Account, No Login](https://apify.com/h1018y/anvil-twitter-scraper)
- [Facebook Page Monitor: New Posts & Engagement Growth](https://apify.com/h1018y/anvil-facebook-posts-scraper)

# Actor input Schema

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

Words to search for on Bilibili, one per line, in any language, e.g. cat or 原神. Also accepted as keywords.

## `videoUrls` (type: `array`):

Optional Bilibili video links or BV ids to read directly, e.g. https://www.bilibili.com/video/BV1GJ411x7h7 or a b23.tv short link.

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

One Bilibili video link or BV id, same field name as the Bilibili Video Downloader actor, e.g. BV1GJ411x7h7.

## `popular` (type: `boolean`):

Set true to also return Bilibili's current popular videos, true or false, e.g. true.

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

Maximum videos per search term (and for the popular list), from 1 to 200, e.g. 20.

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

Order of search results: relevance, views, newest, danmaku (comments on screen) or favorites, e.g. views.

## `minViews` (type: `integer`):

Keep only videos with at least this many views, e.g. 100000. Use 0 for no filter.

## `minLikes` (type: `integer`):

Keep only videos with at least this many likes, e.g. 5000. Use 0 for no filter.

## `includeDetails` (type: `boolean`):

Adds coins, shares, video size and tags with one extra request per video, true or false, e.g. true.

## `includeUploaderStats` (type: `boolean`):

Adds the uploader's follower count with one extra request per uploader, true or false, e.g. false.

## `onlyNew` (type: `boolean`):

Return only videos that were not in the last run with the same input. Use it on a schedule, e.g. true.

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

Accepted so inputs of the Bilibili Video Downloader actor work unchanged. No video files are downloaded.

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

Accepted so inputs of the Bilibili Video Downloader actor work unchanged. Comments are not collected.

## `useApifyProxy` (type: `boolean`):

Route requests through Apify Proxy, true or false. The plain datacenter proxy is enough, e.g. true.

## `proxyGroups` (type: `array`):

Optional Apify Proxy group names, e.g. \["RESIDENTIAL"]. Leave empty for the default group.

## `webhookUrl` (type: `string`):

Optional. An https address - your own system, Zapier, Make or a Slack incoming webhook - that gets each run's results as JSON (with 'only new' on: just the new ones). Example: https://hooks.slack.com/services/T000/B000/XXXX

## Actor input object example

```json
{
  "searchQueries": [
    "cat"
  ],
  "popular": false,
  "maxResults": 3,
  "sortBy": "views",
  "minViews": 0,
  "minLikes": 0,
  "includeDetails": true,
  "includeUploaderStats": false,
  "onlyNew": false,
  "useApifyProxy": true
}
```

# Actor output Schema

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

All result rows (open as table, JSON, CSV or Excel).

# 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 = {
    "searchQueries": [
        "cat"
    ],
    "maxResults": 3,
    "sortBy": "views"
};

// Run the Actor and wait for it to finish
const run = await client.actor("h1018y/anvil-bilibili-videos").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 = {
    "searchQueries": ["cat"],
    "maxResults": 3,
    "sortBy": "views",
}

# Run the Actor and wait for it to finish
run = client.actor("h1018y/anvil-bilibili-videos").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 '{
  "searchQueries": [
    "cat"
  ],
  "maxResults": 3,
  "sortBy": "views"
}' |
apify call h1018y/anvil-bilibili-videos --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,h1018y/anvil-bilibili-videos"
        }
    }
}
```

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/RAxYal7M6GZbRz5XK/builds/bmDV68x3bLW7us0Ed/openapi.json
