aidstring必填
Bilibili Archive ID (AID).
https://api.sandbase.ai/v1/api/bilibili/video-commentGet comments for a Bilibili video identified by AID, with optional cursor pagination. Use it to review audience discussion, continue through comment pages, or support comment moderation and analysis.
您的輸出會顯示在這裡
完成輸入後,點擊執行。
Returns a page of comments for a Bilibili video. It needs the video's aid and accepts an optional cursor to fetch the next page.
curl -X POST "https://api.sandbase.ai/v1/api/bilibili/video-comment" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"aid": "80433022"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
aid | string | Yes | Bilibili Archive ID (AID). |
cursor | string | No | Pagination cursor. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"code": 0,
"data": {
"assist": 0,
"blacklist": 0,
"callbacks": {},
"config": {
"read_only": false,
"show_up_flag": true,
"showtopic": 1
},
"control": {
"answer_guide_android_url": "https://www.bilibili.com/h5/newbie/entry?navhide=1&re_src=6",
"answer_guide_icon_url": "http://i0.hdslb.com/bfs/emote/96940d16602cacbbac796245b7bb99fa9b5c970c.png",
"answer_guide_ios_url": "https://www.bilibili.com/h5/newbie/entry?navhide=1&re_src=12",
"answer_guide_text": "需要升级成为lv2会员后才可以评论,先去答题转正吧!",
"bg_text": "",
"child_input_text": "新的风暴已经出现,你的妙评何时再现",
"disable_jump_emote": false,
"empty_page": null,
"enable_charged": false,
"enable_cm_biz_helper": false,
"giveup_input_text": "不发没关系,请继续友善哦~",
"input_disable": false
},
"cursor": {
"all_count": 239733,
"is_begin": true,
"is_end": false,
"mode": 2,
"mode_text": "",
"name": "最新评论",
"next": 203073,
"pagination_reply": {
"next_offset": "CAESEDE4MzY3Mzk0MzQ1OTM4MjEaOAo2wdWey6QJ8c6+y6QJkOSpt7IJkKLKt7IJwInnt7IJgPGnurIJ…"
},
"prev": 0,
"session_id": "",
"support_mode": [
2
]
},
"effects": {
"preloading": ""
},
"note": 1,
"replies": [
{
"action": 0,
"all_count": 239733,
"assist": 0,
"attr": 0,
"content": {
"jump_url": {},
"max_line": 6,
"members": [],
"message": "测试一下,马上删。"
},
"count": 0,
"ctime": 1793685983,
"cursor": "CAESEDE4MzY3Mzk0MzQ1OTM4MjEaOAo2wdWey6QJ8c6+y6QJkOSpt7IJkKLKt7IJwInnt7IJgPGnurIJ…",
"dialog": 0,
"dialog_str": "0",
"dynamic_id_str": "0",
"fansgrade": 0
}
],
"top": {
"admin": null,
"upper": null,
"vote": null
},
"top_replies": [],
"upper": {
"mid": 486906719
}
},
"message": "OK",
"ttl": 1
}
| Field | Meaning |
|---|---|
data.replies[].content.message | Text of the comment. Emotes appear as text such as [星星眼], and @mentions appear as @name. |
data.replies[].rpid / data.replies[].rpid_str | ID of the comment, as a number and as a string. Use the string form to avoid number precision loss. |
data.replies[].ctime | Time the comment was posted, as a Unix timestamp in seconds. |
data.replies[].like / data.replies[].rcount | Number of likes on the comment, and the number of replies under it. |
data.replies[].mid_str | ID of the user who wrote the comment, as a string. The same ID appears in data.replies[].member.mid. |
data.replies[].member.avatar | URL of the commenter's avatar image. |
data.replies[].reply_control.location | Location label shown with the comment, for example IP属地:湖南. |
data.replies[].content.members[] | Profiles of users mentioned in the comment, with mid, avatar and level_info.current_level. |
data.cursor.all_count | Total comment count reported for the video. |
data.cursor.is_end / data.cursor.next | Flags whether this is the last page, and gives a paging value for the next one. |
data.cursor.pagination_reply.next_offset | Offset string for the next page of comments. |
aid as a string, for example 80433022. If you only have a BV ID, convert it first with Bilibili BV to AID Converter.cursor parameter. The response shows data.cursor.pagination_reply.next_offset and a cursor string on each comment. Stop when data.cursor.is_end is true.oid equal to the video aid, parent and root set to 0 for top-level comments, and rcount for the number of replies. To read replies to a comment, use Bilibili Comment Replies.data.data.top_replies is an empty list in this response, so pinned comments are not always present.$0.014286 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
開始建置
具備統一驗證與用量追蹤的平台 API 端點。
curl -X POST "https://api.sandbase.ai/v1/api/bilibili/video-comment" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"aid": "80433022"
}'請將您的 SandBase API 金鑰設定在伺服器環境中。請求使用 Bearer 驗證。
export SANDBASE_API_KEY="YOUR_API_KEY"請將金鑰保留在伺服器端,不要在瀏覽器程式碼中公開。
aidstring必填Bilibili Archive ID (AID).
cursorstringPagination cursor.
這是此 API 的已儲存範例回應;檢視時不會發出即時請求。
尚未發布已儲存回應。請在 Playground 中執行 API 以檢視其回應。
探索更多
| API | 價格 | 回應 |
|---|---|---|
Bilibili | 每次呼叫 $0.014286 | JSON |
Bilibili | 每次呼叫 $0.001 | JSON |
Bilibili | 每次呼叫 $0.001 | JSON |
Bilibili | 每次呼叫 $0.001 | JSON |
Bilibili | 每次呼叫 $0.001 | JSON |
Bilibili | 每次呼叫 $0.001 | JSON |
問題
使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/bilibili/video-comment。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。
每次 $0.014286,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。
必要:aid (string)。 選填:cursor (string)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。
在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。
不需要。Bilibili Video Comments 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 Bilibili API 存取權。