1. 基本信息
| 接口地址 | https://v1.apizero.cn/api/bili-danmaku |
|---|
| 请求方法 | POST |
|---|
| 分类 | content |
|---|
| 提供方 | 极数本源 |
|---|
| 计费模式 | 免费试用 |
|---|
| 单次消耗 | 0 积分 |
|---|
| 起步价 | — |
|---|
| QPS 限制 | 2 req/s |
|---|
| 每日免费额度 | 20 次(已认证用户) |
|---|
| 匿名每日额度 | 10 次(无 API Key) |
|---|
| VIP 免费 | 否 |
|---|
| 调用次数 | |
|---|
3. 请求参数
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|
video | string | 是 | AV号或BV号 | BV1w8RBBUEYy |
limit | int | 否 | 返回高频弹幕/热词数量 | 10 |
timeout | int | 否 | 超时秒数 | 15 |
page_mode | string | 否 | all=抓全部分P / first=只抓第一页 | all |
5. 请求示例 (cURL)
curl -X POST "https://v1.apizero.cn/api/bili-danmaku" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"video": "BV1w8RBBUEYy",
"limit": "10",
"timeout": "15",
"page_mode": "all"
}'
6. 响应字段
| 字段 | 类型 | 说明 | 示例 |
|---|
video | object | 视频基本信息(bvid/title/duration) | — |
page_stats | array | 每个分P的弹幕数量 | — |
danmaku_summary.total_count | int | 弹幕总量 | — |
danmaku_summary.top_meme | string | 当前刷得最多的梗 | — |
danmaku_summary.top_repeat_comments | array | 高频重复弹幕(text+count) | — |
danmaku_summary.top_terms | array | 高频热词(term+count) | — |
sentiment_summary.label | string | 整体情感倾向(positive/negative/neutral) | — |
sentiment_summary.average_score | float | 平均情感分数 | — |
7. 响应示例
{
"code": 0,
"msg": "成功",
"data": {
"video": {
"bvid": "BV1w8RBBUEYy",
"title": "视频标题",
"duration": 300
},
"danmaku_summary": {
"total_count": 1500,
"top_meme": "哈哈哈哈",
"top_repeat_comments": [
{
"text": "哈哈哈哈",
"count": 120
}
],
"top_terms": [
{
"term": "牛逼",
"count": 200
}
]
},
"sentiment_summary": {
"label": "positive",
"average_score": 0.72
}
},
"request_id": "req_abc123"
}
8. 错误码
| code | status | 说明 |
|---|
4000 | — | 缺少 video 参数或无效的 AV/BV 号 |
5020 | — | B站弹幕接口请求失败 |