返回单场直播的观众数采样时间序列,便于把峰值与直播中的时刻对应。
GET
/api/v1/twitch/live/viewer_count/over_time额度扣减: 本接口每次成功请求会从套餐额度中扣减 1 单位。
请求参数
必填参数
| 名称 | 位置 | 类型 | 说明 |
|---|---|---|---|
live_id | query | string | live_id example: 315722295417 |
响应字段
| 名称 | 类型 | 说明 |
|---|---|---|
success | boolean | Success |
code | integer | Code |
message | string | Message |
data | array<object> | Data |
data[].count | integer | Viewer count |
data[].monitor_time | string | Monitoring time |
在线调试
https://openapi.scdata.cc/api/v1/twitch/live/viewer_count/over_time
请先从 Dashboard 选择一个 API key
发送请求前请先准备一个 API key。前往 Dashboard
查询参数
live_id*cURL 示例
bash
curl -X GET "https://openapi.scdata.cc/api/v1/twitch/live/viewer_count/over_time?live_id=315722295417" \-H "Authorization: YOUR_API_KEY"
响应示例 (200 application/json)
json
{"success": true,"code": 200,"message": "Request successful","data": [{"count": 0,"monitor_time": "2019-08-24T14:15:22.123Z"}]}
使用场景
- 环节影响 — 检查赞助环节期间观众是流失还是激增。
- 高峰时段规划 — 把产品露出安排在观众最多的直播时段。