aidstring必填
Bilibili Archive ID (AID).
https://api.sandbase.ai/v1/api/bilibili/video-danmuGet one page of danmaku comments for a Bilibili video segment identified by AID and CID. Use it to review time-synchronized audience reactions or page through danmaku for a known video.
您的输出将显示在这里
完成输入,然后点击运行。
Returns one page of danmaku (time-synced viewer comments) for a Bilibili video segment. It needs the video's aid and cid, and takes an optional page number.
stime value.page.curl -X POST "https://api.sandbase.ai/v1/api/bilibili/video-danmu" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"aid": "80433022", "cid": "137649199"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
aid | string | Yes | Bilibili Archive ID (AID). |
cid | string | Yes | Bilibili Chat ID (CID). |
page | string | No | Page number for pagination. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
[
{
"color": 16777215,
"date": 1593092327,
"dmid": "34576873522987015",
"id": 34576873522987015,
"mode": 1,
"size": 25,
"stime": 95453,
"text": "80年代迪厅必放金曲",
"uhash": "d2b24dbe",
"weight": 9
}
]
| Field | Meaning |
|---|---|
text | The danmaku comment text shown on screen. |
stime | Time position of the comment in the video. The value 95453 suggests milliseconds, but the response does not state the unit. |
date | Time the comment was posted, as a Unix timestamp in seconds. |
id / dmid | Unique ID of the danmaku. dmid is the same number as id, returned as a string. |
uhash | Hashed ID of the user who sent the comment. It is not a plain user ID. |
color | Comment color as a decimal number. The value 16777215 is white (#FFFFFF). |
mode / size / weight | Display mode, font size and weight value of the comment. All three are plain numbers. |
page to move through further pages for the same aid and cid.aid from a BV ID, call Bilibili BV to AID Converter.cid values, call Bilibili Video Parts.$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-danmu" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"aid": "80433022",
"cid": "137649199"
}'将您的 SandBase API 密钥设置到服务器环境中。请求使用 Bearer 身份验证。
export SANDBASE_API_KEY="YOUR_API_KEY"请将密钥保存在服务器端。不要在浏览器代码中暴露它。
aidstring必填Bilibili Archive ID (AID).
cidstring必填Bilibili Chat ID (CID).
pagestringPage number for pagination.
这是该 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 |
问题
向 https://api.sandbase.ai/v1/api/bilibili/video-danmu 发送 POST 请求,在 Authorization 请求头中使用您的 SandBase API key(Bearer),并将参数作为 JSON 请求体传入。您也可以直接在本页的 Playground 中试用,无需编写代码。
每次调用 $0.014286,从您的 SandBase 余额中扣费。您只需为实际调用付费;无需订阅。
必填:aid (string) 和 cid (string)。 可选:page (string)。 Parameters 表和本页的 Playground 列出了每个字段。
在同一个 HTTP 请求中返回的 JSON 响应(同步)。 本页的 README 包含一个示例响应。
不需要。Bilibili Video Danmaku 通过 SandBase 运行,因此一个 SandBase API key 即可覆盖此端点以及目录中的其他所有 API 和模型。您无需单独申请 Bilibili API 访问权限。