Bilibili-Web-API

获取用户主页作品数据V2/Get user homepage video data V2

Changed on

[中文]

用途:

  • 获取用户发布的视频数据,并可按关键词在该用户的作品内搜索。
  • 与 /fetch_user_post_videos 的区别见下方「与V1的区别」。

参数:

  • uid: 用户UID
  • pn: 页码,无上限;超出末页返回空的 data.archives
  • ps: 每页数量,取值 1~100
  • keyword: 关键词,留空表示不过滤,返回该用户全部作品
    • 仅支持单个词,请勿包含空格。

与V1的区别:

  • 无分页上限:V1 最多只能取到第 5000 个作品,本接口可一直翻到该用户最早的一条投稿。作品数超过 5000 时请使用本接口。
  • 关键词生效:本接口支持在该用户的作品内按关键词搜索,V1 不支持。
  • 字段更精简:返回 aid/bvid/title/pubdate/pic/duration/desc/stat.view 等;不含评论数、分区等字段。需要这些字段请用 V1,或用 /fetch_one_video 按 bvid 补齐。
  • 排序固定为发布时间倒序,不支持 order 参数。

返回:

  • 用户发布的视频数据,作品列表在 data.archives,总数在 data.page.total

[English]

Purpose:

  • Get user post video data, optionally searching by keyword within that user's works.
  • See "Differences from V1" below for how this compares to /fetch_user_post_videos.

Parameters:

  • uid: User UID
  • pn: Page number, no cap; past the last page data.archives comes back empty
  • ps: Page size, 1~100
  • keyword: Keyword, empty returns all works of the user
    • Single word only; do not include spaces.

Differences from V1:

  • No pagination cap: V1 reaches at most 5000 works; this endpoint pages all the way back to the user's earliest upload. Use this one when a user has more than 5000 works.
  • Keyword works: this endpoint supports searching within the user's works; V1 does not.
  • Leaner fields: returns aid/bvid/title/pubdate/pic/duration/desc/stat.view and similar; no comment count or category fields. Use V1 for those, or fill them in per bvid via /fetch_one_video.
  • Ordering is fixed to newest-first by publish time; no order parameter.

Return:

  • User posted video data; the list is in data.archives, the total in data.page.total

[示例/Example]

uid = "178360345" pn = 1 ps = 30 keyword = ""

get/api/v1/bilibili/web/fetch_user_post_videos_v2

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

uidstring required

用户UID

pninteger

页码,无上限/Page number, no cap

psinteger

每页数量,最大100/Page size, max 100

keywordstring

关键词,留空返回全部/Keyword, empty returns all

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