Bilibili-Web-API
获取动态评论/Get dynamic comments
Changed on[中文]
用途:
- 获取图文、文字动态的评论列表。
参数:
- dynamic_id、oid 必须且只能提供一个。
- dynamic_id: 动态链接中的ID,自动识别评论区及评论类型。
- oid: 评论区ID,可从动态详情的 data.data.item.basic.rid_str 获取(旧版为comment_id_str),不是动态ID。
- comment_type: 仅配合oid使用,11为图文(默认),17为文字;使用dynamic_id时不传。
- mode: 3为热门,2为时间。
- pagination_str: 首页留空;下一页传入 {"offset":"上一页的next_offset值"}。
返回与翻页:
- data.data.replies: 评论列表;data.data.top_replies: 置顶评论。
- data.data.cursor.pagination_reply.next_offset: 下一页offset,作为字符串原样使用。
- data.data.cursor.is_end 为true时停止翻页,不再发起下一页请求。
[English]
Purpose:
- Get comments on image and text dynamics.
Parameters:
- Provide exactly one of dynamic_id and oid.
- dynamic_id: ID from the dynamic URL; identifies the comment section and type automatically.
- oid: Comment-section ID from data.data.item.basic.rid_str (comment_id_str in older responses); not the dynamic ID.
- comment_type: Only with oid; 11 for image posts (default), 17 for text. Omit when using dynamic_id.
- mode: 3 for hot, 2 for time.
- pagination_str: Leave empty for page one; then pass {"offset":"previous next_offset value"}.
Response and pagination:
- data.data.replies: Comments; data.data.top_replies: Pinned comments.
- data.data.cursor.pagination_reply.next_offset: Use this string unchanged as the next offset.
- Stop pagination when data.data.cursor.is_end is true.
[示例/Example]
dynamic_id = "DYNAMIC_ID" mode = 3 pagination_str = ""
get/api/v1/bilibili/web/fetch_dynamic_comments
Request
- Base URLhttps://api.tikhub.io (the document declares no server; this is the origin it was published from)
- AuthHTTP bearer
Query parameters
dynamic_idstring nullable
动态ID,与oid二选一/Dynamic ID; provide either dynamic_id or oid
oidstring nullable
评论区ID,与dynamic_id二选一/Comment-section ID; provide either oid or dynamic_id
comment_typeinteger nullable
仅配合oid使用,默认11(图文)/Only with oid; defaults to 11 (image posts)
modeinteger
排序:3热门,2时间/Sort: 3 hot, 2 time
pagination_strstring
翻页JSON,首页留空/Pagination JSON; leave empty for the first page
Example:{"offset":""}
Response
Successful Response
Changes
- info
endpoint added
- info