# Bilibili Popular Videos | Metrics & Snapshot Comparison (`apivault_labs/bilibili-popular-videos-prototype`) Actor

Collect Bilibili popular videos with titles, creators, UTC dates and available views, likes, coins, favorites and shares. Compare snapshots, filter views and resume bounded feed collection. No login or proxy required.

- **URL**: https://apify.com/apivault_labs/bilibili-popular-videos-prototype.md
- **Developed by:** [Apivault Labs](https://apify.com/apivault_labs) (community)
- **Categories:** Videos, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 popular video observations

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

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

## What's an Apify Actor?

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

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

## How to integrate an Actor?

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

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

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

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

# README

## Bilibili Popular Videos Scraper — Metrics & Snapshot Comparison

![Bilibili popular video snapshots — generated product illustration](https://raw.githubusercontent.com/apivault-labs/apivault-labs/a54524e19cd1756b9551b5a878b37997c3b1c6f7/assets/bilibili-popular/avatar-v1.png)

Collect **Bilibili's public popular-video feed** as structured observations for content research, creator discovery and repeated video-metric comparisons. Export video IDs, titles, creators, publication dates, available views, likes, coins, favorites and shares. Compare against a previous compact snapshot supplied in input, without a separate comparison event.

This Actor is focused on the popular feed. It does not search keywords, expand creator channels, request individual video details, retrieve comment bodies/danmaku text, download videos, or extract transcripts. No login, cookies, proxy subscription or third-party backend is required. Source access can still fail or change.

### Get your first snapshot

1. Keep a small result limit, such as five videos.
2. Run the Actor and inspect the **Useful video rows** Dataset and **Collection summary**.
3. Download JSON, CSV or Excel; inspect diagnostics for partial collection.

```json
{"maxVideos":5}
```

The default input requests up to 20 useful rows. One result is one delivered video observation, not a permanent unique video: observing the same video again in a later run is a new result.

### What you can do

| Workflow | Useful output | Boundary |
|---|---|---|
| Discover current popular videos | IDs, titles, creators, URLs and source positions | Feed observation, not keyword search or a stable global rank |
| Build a research spreadsheet | UTC publication time and available counters | Missing values stay null; real zero stays zero |
| Compare two snapshots | Signed counter and position differences for shared video IDs | Absence in one limited snapshot does not mean deleted/newly uploaded |
| Focus on higher-view videos | Optional minimum observed view count | Filtering consumes resources even without paid results |
| Collect another bounded portion | Start page and continuation with delivered-ID exclusions | A moving feed cannot provide gap-free archive coverage |

### Copyable collection scenarios

#### Up to 200 video observations

```json
{"maxVideos":200,"maxPages":10,"pageSize":20}
```

#### Compact metrics without description

```json
{"maxVideos":20,"includeDescription":false}
```

#### Videos observed with at least 100,000 views

```json
{"maxVideos":20,"maxPages":10,"minViews":100000}
```

#### Begin at the second source page

```json
{"maxVideos":20,"startPage":2,"maxPages":1,"pageSize":20}
```

#### Compare with your earlier snapshot

Run a baseline first. Open its **Compact observed snapshot** (SNAPSHOT) output and copy the JSON array into **Previous snapshot JSON** on your next run. This uses the input only and needs no access to other private storage. The following is an illustrative single-row baseline, not a prediction of current video counters:

```json
{"maxVideos":20,"previousSnapshot":[{"bvid":"BV18Unm6qEPo","source":"bilibili_public_popular_feed","snapshotAt":"2026-10-22T15:00:00+00:00","sourcePosition":1,"views":400000,"likes":12000}]}
```

A previous snapshot supports at most 200 unique valid rows with source identity and timezone-aware timestamps. Missing counters are allowed as null. Invalid data fails before video collection. No previous Dataset is opened, overwritten or made public. Keep your Apify token in secure platform credentials, never in input.

### Comparing snapshots correctly

The Actor matches `bvid` and adds `comparison` to current delivered rows. Shared IDs include `previousSnapshotAt`, signed `metricDeltas` and `positionDelta` (current position minus previous position). Negative differences are preserved: counters can be corrected or observations can vary. Unknown counters have null differences; they are not zero growth.

`seenInPreviousSnapshot=false` only means the video was absent from the provided bounded snapshot. It does not prove the video is new to Bilibili. A video missing from the current snapshot may simply fall outside the collected pages/filter; no deletion event is inferred. Position is the order observed in a changing popular feed, not an official durable ranking.

Keep the same page size, source page range and filters when comparing like-for-like samples. Collection is sequential rather than an atomic snapshot of the whole feed. The observation timestamp is a run-level timestamp, not the video's last metric update time.

### Input settings

| Input | Default / limits | Meaning |
|---|---|---|
| maxVideos | 20; 1–200 | Maximum useful rows delivered in this run |
| maxPages | 10; 1–10 | Maximum sequential source pages fetched |
| pageSize | 20; 1–20 | Keep constant across related traversals |
| startPage | 1; 1–20 | One-based feed page, not an archive cursor |
| minViews | 0 | With a positive threshold, unknown/low views are excluded |
| includeDescription | true | Optional source description; same result tariff |
| previousSnapshot | \[] | Prior SNAPSHOT JSON array, at most 200 valid rows |
| excludeVideoIds | \[] / max 200 | Previously delivered Bilibili IDs, typically from continuation |
| maxRunSeconds | 120; 10–150 | Checked between requests; in-flight request/final writes may exceed it |

Use 256 MB and a 240-second platform timeout for a small run. A source request has an 8-second connection and 25-second read timeout, and temporary network/server errors have one bounded retry. HTTP source blocks are reported, not silently converted into empty successful data.

### Output fields and exports

| Fields | Description |
|---|---|
| bvid, aid, videoUrl | Bilibili identity and canonical video URL |
| title, description, coverUrl | Source title, optional description and available cover URL |
| creatorId, creatorName | Creator identity exposed by the feed; not a full profile |
| publishedAt, durationSeconds | Publication UTC timestamp and available duration |
| views, likes, coins, favorites, shares | Available source counters; null differs from zero |
| comments, danmakuCount | Counts only; comment bodies/danmaku text are not collected |
| sourcePage, sourcePosition | Observed feed location, not a stable global rank |
| snapshotAt, source, coverage | Observation timestamp and explicit source scope |
| comparison | Optional prior observation, signed deltas and position difference |

The overview table shows video identity, title, creator and key metrics. Full JSON retains nested comparison fields. CSV/Excel exports are available from the Dataset; use JSON for nested data or select/flatten the desired comparison fields through Dataset export settings.

### Summaries, errors and continuation

The paid Dataset contains useful video rows only. Run outputs also link to:

- **SUMMARY** — delivered/filtered/duplicate counts, stop reason and comparison state.
- **PAGES** — source rows, valid rows and delivered rows per fetched page.
- **ERRORS** — source failure or repeated-page diagnostics.
- **SNAPSHOT** — compact observed metrics from rows accepted for delivery.
- **CONTINUATION** — `canResume`, a suggested `resumeInput` and caveats.
- **CHECKPOINT** — delivered IDs for reconciling interrupted runs.

For an ordinary result/charge/page/time limit, use `CONTINUATION.resumeInput` rather than guessing the next page. The current partial page may be fetched again and exclusions avoid billing the already delivered IDs. Exclusions are limited to 200 IDs. This is bounded continuation, not unlimited history or automatic crash recovery.

The live feed can reorder between requests. Even with exclusions it can skip changing content; the result is never promised to be a complete archive. Dataset delivery and checkpoint writes are not atomic. After a crash, reconcile Dataset IDs with CHECKPOINT before an explicit new run; uncertain writes are not retried automatically.

A source failure before any rows fails the run. Partial output is preserved with diagnostics. A valid filter with no matches may succeed with zero result rows. Inspect SUMMARY and ERRORS instead of treating platform SUCCEEDED as complete source coverage.

### Pricing and resource costs

**Free plan: $1.00 per 1,000 useful video observations. All paid tiers: $0.70 per 1,000.** Each delivered row includes the requested fields and optional comparison; there is no separate comparison/format event. Actor Start is $0.00005 per GB of memory, minimum one. Apify compute/storage/traffic are additional and user-paid. Effective account rates appear in the Pricing tab.

Filtered, duplicate, invalid, undelivered and diagnostic rows do not create useful-video result events. Empty/failed runs can still incur startup and platform costs. A charge cap limits Actor event fees; it is not a cap on every platform resource expense. Rerunning a snapshot intentionally observes and charges new rows again; download the existing Dataset again instead when you only need another export format.

Historical source feasibility runs returned 200 rows on 10 pages without proxy for about $0.00315 of platform usage per run. That scales to roughly $0.0157 per 1,000 rows for those runs only, before developer fees and excluding builds/storage/other probes. Smaller runs have higher per-row overhead. These are historical measurements, not a performance/cost guarantee for every current run.

### API, Python, JavaScript, MCP and automation

The Actor's stable ID is `64qil0kulltTOy0Gl`; existing technical slug is `apivault_labs/bilibili-popular-videos-prototype`. The slug is retained for compatibility; the candidate adds the documented commercial features to the same Actor.

Use [asynchronous Actor runs](https://docs.apify.com/api/v2/act-runs-post), wait for a terminal status, and read its Dataset and SUMMARY/ERRORS. [Dataset export](https://docs.apify.com/api/v2/dataset-items-get) supports JSON/CSV/Excel. Official [Python](https://github.com/apify/apify-client-python) and [JavaScript](https://github.com/apify/apify-client-js) clients support the exact Actor ID and input. Keep credentials in your client's secure environment.

[Apify MCP](https://docs.apify.com/platform/integrations/mcp) is a generic integration path; public execution of this candidate through MCP has not been verified. There is no confirmed dedicated npm/PyPI client or verified n8n node for this product. n8n/Make can use HTTP workflows with the same run/Dataset contract; availability of a generic HTTP node does not imply this Actor is verified in n8n Cloud.

Five separate scenario Tasks are prepared for quick snapshots, 200-video batches, compact rows, view filtering and comparing a user's own snapshot. Private Tasks are not public one-click templates; availability depends on actual publication. The JSON scenarios work without public Task templates. The comparison template contains no owner's data: leave previousSnapshot empty for a new baseline or supply your own prior SNAPSHOT JSON.

### FAQ

**Does it return every popular video?** No. It collects a bounded, moving feed. Source access, limits and reordering constrain coverage.

**Can I search for a brand or channel?** No. Keyword search, channel expansion and individual detail endpoints are outside this product.

**Are comments and danmaku available?** Only their exposed counts. Bodies and text are not retrieved.

**What does a negative delta mean?** A lower observed counter or position change. It is preserved rather than forced to zero; it does not establish a cause.

**Why is a video not marked new/deleted?** A limited snapshot cannot prove either. `seenInPreviousSnapshot` describes only the snapshot you provided.

**Will increasing maxVideos guarantee 200 rows?** No. It is an upper limit. Filters, source availability, page/time/charge limits can return fewer.

**Do I need cookies or proxies?** This version sends direct public HTTP requests. No login, cookie input or paid proxy is used; access is not guaranteed.

**Does comparison need access to a private Dataset?** No. Paste the compact SNAPSHOT JSON from your previous observation into previousSnapshot. The Actor validates it without opening other private storage.

**Is this affiliated with Bilibili?** No. It is an independent data collection tool for public feed observations.

# Changelog

This Actor's version history is a separate document: https://apify.com/apivault_labs/bilibili-popular-videos-prototype/changelog.md

# Actor input Schema

## `maxVideos` (type: `integer`):

Stop after this many distinct useful video rows. Source availability may be lower.

## `maxPages` (type: `integer`):

Bound the number of sequential popular-feed requests.

## `pageSize` (type: `integer`):

Keep this size constant while comparing successive pages.

## `startPage` (type: `integer`):

First one-based popular-feed page; not a keyword search or archive cursor.

## `maxRunSeconds` (type: `integer`):

Checked between requests. An in-flight request and final writes can take longer.

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

Exclude videos below this view count. Unknown views are excluded only when threshold is above zero. Filtering still consumes resources.

## `includeDescription` (type: `boolean`):

Include source description. Disable for compact rows; event price stays the same.

## `excludeVideoIds` (type: `array`):

Up to 200 IDs excluded when resuming. Use CONTINUATION.resumeInput. Exclusions reduce repeats but cannot prevent feed changes.

## `previousSnapshot` (type: `array`):

Optional array copied from the SNAPSHOT output of an earlier run, up to 200 rows. Read locally from input; no access to other storage is needed. Leave empty for a fresh snapshot.

## Actor input object example

```json
{
  "maxVideos": 20,
  "maxPages": 10,
  "pageSize": 20,
  "startPage": 1,
  "maxRunSeconds": 120,
  "minViews": 0,
  "includeDescription": true,
  "excludeVideoIds": [],
  "previousSnapshot": []
}
```

# Actor output Schema

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

No description

## `pages` (type: `string`):

No description

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

No description

## `continuation` (type: `string`):

No description

## `snapshot` (type: `string`):

No description

## `checkpoint` (type: `string`):

No description

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

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("apivault_labs/bilibili-popular-videos-prototype").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("apivault_labs/bilibili-popular-videos-prototype").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 '{}' |
apify call apivault_labs/bilibili-popular-videos-prototype --silent --output-dataset

```

## MCP server setup

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

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/64qil0kulltTOy0Gl/builds/PDs2ZkpF4ZekiERTj/openapi.json
