Bilibili-Web-API

获取番剧详情/Get bangumi details

Changed on

[中文]

用途:

  • 获取一季番剧的详情、正片及附加分集列表、播放和互动统计。
  • 传入分集ID也会返回所属整季详情,不仅是该分集;其他季度需分别查询。

参数:

  • ep_id、season_id 必须且只能提供一个。
  • ep_id: 分集链接中 ep 后的数字,例如 ep359441 对应 359441。
  • season_id: 番剧链接中 ss 后的数字,例如 ss34430 对应 34430。
  • 两个ID都只传数字,不包含 ep 或 ss 前缀;Swagger中只填写一个,另一个留空。

返回:

  • data.result: 番剧详情,包括 season_id、title、episodes、section、stat 等字段。
  • data.result.episodes: 当前季返回的正片列表,其数组长度为返回的正片集数。
  • data.result.section[].episodes: 主题曲、PV、SP等附加栏目中的分集,单独统计。
  • data.result.stat.views: 整季播放量,不是指定分集的播放量。
  • data.result.episodes 中的 stat.play: 对应正片分集的播放量。
  • data.result.section 中各 episodes 的 stat.play: 对应附加分集的播放量。
  • 使用分集的 id 或 ep_id 匹配目标;部分统计字段可能缺失。
  • ep359441为NCOP1,位于附加分集的主题曲栏目,不在正片episodes中。

请求示例:

GET /api/v1/bilibili/web/fetch_bangumi_detail?ep_id=359441
GET /api/v1/bilibili/web/fetch_bangumi_detail?season_id=34430

响应片段(其他字段及分集已省略,统计值仅作示例):

{
  "code": 200,
  "data": {
    "code": 0,
    "result": {
      "season_id": 34430,
      "title": "咒术回战",
      "stat": {"views": 1026250642},
      "section": [{
        "title": "主题曲",
        "episodes": [{"id": 359441, "title": "NCOP1", "stat": {"play": 4564555}}]
      }]
    }
  }
}

错误:

  • 422: ID缺失、同时提供两个ID,或ID不是正整数。
  • 400: 未能获取有效的番剧详情。

[English]

Purpose:

  • Get one season's details, regular and additional episodes, and viewing statistics.
  • An episode ID returns its entire season. Query other seasons separately.

Parameters:

  • Provide exactly one of ep_id and season_id.
  • ep_id: Digits after ep in an episode URL, such as 359441 in ep359441.
  • season_id: Digits after ss in a season URL, such as 34430 in ss34430.
  • Use numeric IDs without ep/ss prefixes. In Swagger, fill only one ID and leave the other empty.

Response:

  • data.result: Season details, including season_id, title, episodes, section and stat.
  • data.result.episodes: Regular episodes returned for this season; its length is the returned episode count.
  • data.result.section[].episodes: Additional episodes, such as theme songs, PVs and SPs; count these separately.
  • data.result.stat.views: Total views for the season, not the selected episode.
  • stat.play in data.result.episodes: Views for each regular episode.
  • stat.play in episodes under data.result.section: Views for each additional episode.
  • Match the episode by id or ep_id; some statistics may be absent.
  • Episode 359441 (NCOP1) is in the additional theme-song section, not the regular episodes list.

Requests:

  • By episode: /api/v1/bilibili/web/fetch_bangumi_detail?ep_id=359441
  • By season: /api/v1/bilibili/web/fetch_bangumi_detail?season_id=34430
  • The JSON excerpt above omits other fields and episodes; statistics are illustrative.

Errors:

  • 422: Missing IDs, both IDs provided, or an ID is not a positive integer.
  • 400: Valid season details could not be retrieved.

[示例/Example]

ep_id = 359441

get/api/v1/bilibili/web/fetch_bangumi_detail

Request

  • Base URL
    https://api.tikhub.io (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Query parameters

ep_idinteger nullable

分集ID,与season_id二选一/Episode ID; provide either ep_id or season_id

Example:359441
season_idinteger nullable

番剧季度ID,与ep_id二选一/Season ID; provide either ep_id or season_id

Response

Successful Response

codeinteger

HTTP status code | HTTP状态码

request_idstring nullable

Unique request identifier | 唯一请求标识符

messagestring

Response message (EN-US) | 响应消息 (English)

message_zhstring

Response message (ZH-CN) | 响应消息 (中文)

supportstring

Support message | 支持消息

timestring

The time the response was generated | 生成响应的时间

time_stampinteger

The timestamp the response was generated | 生成响应的时间戳

time_zonestring

The timezone of the response time | 响应时间的时区

docsstring nullable

Link to the API Swagger documentation for this endpoint | 此端点的 API Swagger 文档链接

cache_messagestring nullable

Cache message (EN-US) | 缓存消息 (English)

cache_message_zhstring nullable

Cache message (ZH-CN) | 缓存消息 (中文)

cache_urlstring nullable

The URL to access the cached result | 访问缓存结果的 URL

routerstring

The endpoint that generated this response | 生成此响应的端点

paramsunknown
dataunknown

Changes