# Bilibili Bangumi Catalog & Hot Search Scraper (`crawlyth-forge/bilibili-bangumi-scraper`) Actor

Collect Bilibili's licensed anime, Chinese animation, film, documentary, TV and variety catalog with official filters, sort orders, pagination, full episode lists, Top 100 rankings, the release calendar and the live hot-search board.

- **URL**: https://apify.com/crawlyth-forge/bilibili-bangumi-scraper.md
- **Developed by:** [crawlyth forge](https://apify.com/crawlyth-forge) (community)
- **Categories:** Videos, Social media, Automation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

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/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 Bangumi Catalog & Hot Search Scraper

Collect Bilibili's licensed **anime (番剧), Chinese animation (国创), films, documentaries, TV series and variety shows** from the public PGC catalog. Filter by region, genre, year, airing status, free/paid/VIP access, copyright and premiere quarter; sort by followers, plays, rating, update time, release date or danmaku; and page through the whole catalog. The same run also fetches full season details, every episode (including PVs and extras), Top 100 rankings, the release calendar and the live hot-search board. Public pages and JSON only — no login, no cookies, no API key.

### What this actor does

- **Seven modes:** `catalog`, `details`, `episodes`, `ranking`, `calendar`, `hotSearch`, `filterOptions`
- **Official filters:** region, genre, year, finished/ongoing, free/paid/VIP, copyright, quarter, dub, version and documentary producer
- **Six sort keys:** followers, plays, rating, updated, release date, danmaku — with ascending/descending where Bilibili offers it
- **Full pagination:** walks the catalog with `has_next`; `maxItems` and `startPage` control the walk
- **Deep records:** rating and vote count, followers and series followers, plays, danmaku, likes, coins, favorites, replies, shares, episode progress, areas, styles, synopsis, cast, staff and related seasons
- **Episodes:** episode number and title, duration, release time, badge, cover, aid/bvid/cid and section label; extras and PVs are optional
- **Rankings and calendar:** Top 100 for every content type over 3 or 7 days; release calendar for anime and Chinese animation
- **Hot search:** the live Bilibili trending board with rank, keyword, display name, heat score and icon
- **Empty fields are omitted** — no nulls, no placeholders

### Output per catalog title (mode = `catalog`) or season (mode = `details`)

- `seasonId`, `mediaId`, `seasonType`, `seasonTypeTitle`, `seasonTypeId`, `seasonLabel`
- `title`, `subtitle`, `jpTitle`, `aliases[]`, `description`
- `coverUrl`, `squareCoverUrl`, `bannerCoverUrl`, `firstEpisodeId`, `firstEpisodeCoverUrl`
- `badge`, `badgeType`, `badgeColor`, `accessLevel`, `paymentTip`, `seasonStatus`, `status`
- `score`, `ratingCount`
- `followerCount`, `seriesFollowerCount`, `followerText`, `totalPlays`, `playText`
- `danmakuCount`, `likeCount`, `coinCount`, `favoriteCount`, `replyCount`, `shareCount`
- `episodeText`, `episodeCount`, `declaredEpisodeCount`, `latestEpisode`, `latestEpisodeDesc`, `latestEpisodeId`
- `releaseDate`, `releaseDateLabel`, `weekday`, `isFinished`, `hasStarted`
- `areas[]`, `areaIds[]`, `styles[]`
- `actors`, `staff`, `seriesId`, `seriesTitle`, `positiveTitle`, `registrationNumber`
- `relatedSeasons[]` — `seasonId`, `mediaId`, `title`, `seasonTypeId`, `coverUrl`
- `orderLabel`, `sortBy`, `matchedFilters[]`, `apiCountry`, `apiProvince`
- `sourceUrl`, `recordType`, `scrapedAt`

### Output per episode (mode = `episodes`)

- `seasonId`, `mediaId`, `seasonTitle`, `seasonType`
- `episodeId`, `episodeNumber`, `episodeTitle`, `showTitle`, `episodeKind`
- `durationSeconds`, `durationText`, `publishTime`, `releaseDate`
- `badge`, `badgeType`, `badgeColor`
- `coverUrl`, `aid`, `bvid`, `cid`, `status`
- `sectionType`, `sectionTitle`, `isPreview`
- `apiCountry`, `apiProvince`, `sourceUrl`, `recordType`, `scrapedAt`

### Output per ranking entry (mode = `ranking`)

- `rank`, `rankingWindowDays`, `seasonType`, `seasonTypeTitle`
- `seasonId`, `title`, `coverUrl`, `wideCoverUrl`, `sourceUrl`
- `score`, `followerCount`, `seriesFollowerCount`, `totalPlays`, `danmakuCount`, `playText`
- `badge`, `badgeType`, `badgeColor`, `episodeText`, `copyrightOwner`
- `apiCountry`, `apiProvince`, `recordType`, `scrapedAt`

### Output per calendar entry (mode = `calendar`)

- `calendarDate`, `dayOfWeek`, `isToday`, `seasonType`, `seasonId`, `episodeId`
- `title`, `episodeLabel`, `publishTimeText`, `publishAt`, `published`, `delayed`, `delayReason`
- `coverUrl`, `episodeCoverUrl`, `playsText`, `followsText`
- `apiCountry`, `apiProvince`, `sourceUrl`, `recordType`, `scrapedAt`

### Output per hot-search keyword (mode = `hotSearch`)

- `rank`, `keyword`, `displayName`, `heatScore`, `iconUrl`, `goto`, `uri`
- `boardTitle`, `trackId`, `apiCountry`, `apiProvince`, `recordType`, `scrapedAt`

### Output per filter option (mode = `filterOptions`)

- `seasonType`, `seasonTypeTitle`, `filterKey`, `filterName`
- `options[]` — `name`, `value` (the exact Bilibili keyword)
- `optionCount`, `recordType`, `scrapedAt`

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `catalog` | `catalog` / `details` / `episodes` / `ranking` / `calendar` / `hotSearch` / `filterOptions` |
| `contentTypes` | array | `["anime"]` | `anime`, `guochuang`, `movie`, `documentary`, `tv`, `variety` |
| `rankingWindowDays` | string | `3` | Ranking window: `3` or `7` (mode=ranking) |
| `region` | string | `all` | Production region (mode=catalog); options depend on content type |
| `genre` | string | `all` | Genre / style (mode=catalog) |
| `genreId` | string | – | Exact Bilibili style ID, overrides `genre` (mode=catalog) |
| `year` | string | `all` | Premiere year or year range (mode=catalog) |
| `finishStatus` | string | `all` | `finished` or `ongoing` (anime/guochuang only) |
| `payment` | string | `all` | `free`, `paid` or `vip` (mode=catalog) |
| `copyright` | string | `all` | `exclusive` or `other` (anime/guochuang only) |
| `seasonMonth` | string | `all` | `january`, `april`, `july`, `october` (anime only) |
| `contentTypeVersion` | string | `all` | `main`, `movie` or `other` (anime/guochuang only) |
| `dub` | string | `all` | `original` or `chinese_dub` (anime only) |
| `producer` | string | `all` | Documentary producer, e.g. `bbc`, `cctv`, `natgeo` |
| `sortBy` | string | `followers` | `followers`, `plays`, `score`, `updated`, `releaseDate`, `danmaku` |
| `sortOrder` | string | `desc` | `desc` or `asc`; rating is descending-only upstream |
| `startPage` | integer | `1` | First catalog page (mode=catalog) |
| `includeDetails` | boolean | `true` | Add rating/follower/play statistics and synopsis per catalog title |
| `seasonIds` | array | – | Season IDs (`835`), ss/ep IDs (`ss835`, `ep15014`) or bangumi URLs (modes=details, episodes) |
| `includeSections` | boolean | `true` | Add PVs, previews, clips and behind-the-scenes sections (mode=episodes) |
| `calendarDaysBefore` | integer | `0` | Past days, 0–7 (mode=calendar) |
| `calendarDaysAfter` | integer | `7` | Upcoming days, 0–7 (mode=calendar) |
| `maxItems` | integer | `50` | Total record cap, 1–10000 |
| `proxyConfiguration` | object | disabled | Optional Apify Proxy; Bilibili decides the visible catalog by request region |

#### Example: anime catalog, Japanese comedies from 2010–2014, most played first

```json
{
  "mode": "catalog",
  "contentTypes": ["anime"],
  "region": "japan",
  "genre": "comedy",
  "year": "2010-2014",
  "payment": "free",
  "sortBy": "plays",
  "sortOrder": "desc",
  "includeDetails": true,
  "maxItems": 50
}
```

#### Example: every content type, one page each, newest releases

```json
{
  "mode": "catalog",
  "contentTypes": ["anime", "guochuang", "movie", "documentary", "tv", "variety"],
  "sortBy": "releaseDate",
  "sortOrder": "desc",
  "includeDetails": true,
  "maxItems": 60
}
```

#### Example: full episode list with extras

```json
{
  "mode": "episodes",
  "seasonIds": ["ss835", "https://www.bilibili.com/bangumi/play/ss26283"],
  "includeSections": true,
  "maxItems": 200
}
```

#### Example: Top 100 and hot search

```json
{
  "mode": "ranking",
  "contentTypes": ["anime", "guochuang"],
  "rankingWindowDays": "7",
  "maxItems": 200
}
```

```json
{
  "mode": "hotSearch",
  "maxItems": 50
}
```

#### Example: discover the official filter values for one section

```json
{
  "mode": "filterOptions",
  "contentTypes": ["movie"],
  "maxItems": 50
}
```

### Use cases

- **Anime and donghua market research** — track licensed titles, ratings, follower growth and play counts by season and region
- **Licensing and streaming analysis** — see which regions, genres and years Bilibili licenses, and compare free versus VIP catalog depth
- **Release trackers** — build a daily calendar of upcoming anime and Chinese-animation episodes
- **Fan communities and newsletters** — serve weekly Top 100 rankings and hot-search snapshots
- **Metadata pipelines** — enrich a media database with synopsis, cast, staff, episode lists and related seasons
- **Trend monitoring** — snapshot Bilibili hot search and compare it with catalog activity

### FAQ

#### Do I need a Bilibili account, cookies or an API key?

No. Every mode reads public pages and JSON that Bilibili serves to logged-out visitors. The actor never asks for credentials.

#### Why does the catalog differ between runs or locations?

Bilibili decides which licensed titles are visible from the request IP. The actor records the request country and province on every record (`apiCountry`, `apiProvince`) so you can tell which catalog you saw. An optional Apify Proxy can change the request region.

#### Why were some filters skipped?

Bilibili offers different filters for each section. For example, anime offers Japan, USA and “other” regions, while documentaries have no region filter; only anime has a dub filter. The actor applies every filter the selected section supports, logs the ones it cannot, and records the applied set in `matchedFilters`.

#### Why is `sortOrder: "asc"` ignored for ratings?

Bilibili's rating sort is descending-only. The actor forces descending and says so in the run log.

#### Why are some fields missing on some records?

New or upcoming titles may have no rating, no rating count, no styles and no main episodes yet; free episodes may have no badge. Those fields are omitted rather than filled with a placeholder.

#### How many results can I get?

The anime catalog currently exposes about 950 titles, Chinese animation about 1,900, film about 780, documentary about 760, TV about 990 and variety about 440. `maxItems` caps the walk; pagination follows `has_next` to the end. Rankings return at most 100 entries per content type and window; hot search at most 50 keywords; the calendar covers −7 to +7 days.

#### Does the actor download video or subtitles?

No. It collects catalog and release metadata only. Video streams, comments, danmaku and subtitles are separate use cases.

#### Are the cover images usable directly?

Yes. Bilibili's image CDN serves the cover and episode images without authentication; the actor upgrades them to `https://`. If a URL ever stops resolving, treat it as a source change rather than a data error.

#### Can I run it on a schedule?

Yes. A small catalog prefill is safe for daily runs, while weekly ranking, calendar and hot-search runs build a useful time series.

#### Is this affiliated with Bilibili?

No. This is an independent third-party actor that reads public Bilibili pages and JSON.

# Actor input Schema

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

What to collect: the filterable PGC catalog, full details for specific seasons, episode lists, Top 100 rankings, the release calendar, the hot-search board, or the official filter values for each content type.

## `contentTypes` (type: `array`):

Bilibili sections to read. Catalog and ranking support all six; calendar supports anime and guochuang only. maxItems is split fairly across the selected types.

## `rankingWindowDays` (type: `string`):

Ranking period (mode=ranking). Bilibili publishes a 3-day and a 7-day Top 100 for every content type.

## `region` (type: `string`):

Production region (mode=catalog). Each section offers its own regions; a region Bilibili does not offer for the selected content type is skipped and logged.

## `genre` (type: `string`):

Genre / style filter (mode=catalog). The actor validates the genre against the selected content type and skips it if Bilibili does not offer it there.

## `genreId` (type: `string`):

Advanced (mode=catalog). Exact Bilibili style_id from the filterOptions mode, e.g. 10010. Overrides the Genre dropdown.

## `year` (type: `string`):

Premiere year or year range (mode=catalog). Bilibili groups older titles into ranges; a year the selected content type does not offer is skipped and logged.

## `finishStatus` (type: `string`):

Finished or ongoing (mode=catalog; anime and guochuang only).

## `payment` (type: `string`):

Access tier (mode=catalog). Bilibili offers free, paid and VIP-member titles per section.

## `copyright` (type: `string`):

Exclusive or other licensing (mode=catalog; anime and guochuang only).

## `seasonMonth` (type: `string`):

January, April, July or October season (mode=catalog; anime only).

## `contentTypeVersion` (type: `string`):

Main feature, film or other (mode=catalog; anime and guochuang only).

## `dub` (type: `string`):

Original audio or Chinese dub (mode=catalog; anime only).

## `producer` (type: `string`):

Production company (mode=catalog; documentaries only).

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

Catalog ordering (mode=catalog). Bilibili sorts every section by these keys; the actor records the sort used in sortedBy.

## `sortOrder` (type: `string`):

Ascending or descending (mode=catalog). Rating sort is descending-only upstream and is reported in the run log when adjusted.

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

First catalog page to read, 1-based (mode=catalog). Use it to resume a long catalog walk.

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

Fetch the season detail record for every catalog title (mode=catalog) to add rating count, follower count, play counts, synopsis, cast, staff, regions and styles. Disable for the fastest listing.

## `seasonIds` (type: `array`):

Seasons to read (modes=details, episodes). Accepts season IDs (835), ss IDs (ss835), episode IDs (ep15014) and full bilibili.com/bangumi/play URLs.

## `includeSections` (type: `boolean`):

Add PVs, previews, clips and behind-the-scenes sections to episode lists (mode=episodes). Main episodes are always included.

## `calendarDaysBefore` (type: `integer`):

How many past days to include in the release calendar (mode=calendar). 0-7.

## `calendarDaysAfter` (type: `integer`):

How many upcoming days to include in the release calendar (mode=calendar). 0-7.

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

Stop after this many records in total. In catalog mode the cap is split fairly across the selected content types.

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

Optional. Leave disabled unless Bilibili blocks your region or datacenter IP. Bilibili decides the catalog by request region, so a proxy in another region can change which titles are listed.

## Actor input object example

```json
{
  "mode": "catalog",
  "contentTypes": [
    "anime"
  ],
  "rankingWindowDays": "3",
  "region": "all",
  "genre": "all",
  "year": "all",
  "finishStatus": "all",
  "payment": "all",
  "copyright": "all",
  "seasonMonth": "all",
  "contentTypeVersion": "all",
  "dub": "all",
  "producer": "all",
  "sortBy": "followers",
  "sortOrder": "desc",
  "startPage": 1,
  "includeDetails": false,
  "seasonIds": [],
  "includeSections": false,
  "calendarDaysBefore": 0,
  "calendarDaysAfter": 7,
  "maxItems": 3,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `items` (type: `string`):

Dataset containing all scraped Bilibili catalog, episode, ranking, calendar, filter-option and hot-search records.

# 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 = {
    "mode": "catalog",
    "contentTypes": [
        "anime"
    ],
    "includeDetails": false,
    "seasonIds": [],
    "includeSections": false,
    "maxItems": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlyth-forge/bilibili-bangumi-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 = {
    "mode": "catalog",
    "contentTypes": ["anime"],
    "includeDetails": False,
    "seasonIds": [],
    "includeSections": False,
    "maxItems": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlyth-forge/bilibili-bangumi-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 '{
  "mode": "catalog",
  "contentTypes": [
    "anime"
  ],
  "includeDetails": false,
  "seasonIds": [],
  "includeSections": false,
  "maxItems": 3
}' |
apify call crawlyth-forge/bilibili-bangumi-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawlyth-forge/bilibili-bangumi-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/Rs8TmuipAcQaPDwUW/builds/rU3g42vKcdV1zzeXP/openapi.json
