Docs
控制台

搜索Twitch直播

13 个接口 • Base: https://openapi.scdata.cc

返回符合筛选条件的直播,按观众数排序,含标题、游戏和主播信息。

POST/api/v1/twitch/search/live

额度扣减: 本接口每次成功请求会从套餐额度中扣减 1 单位。

请求参数

必填参数

该接口没有必填参数。

可选参数

名称位置类型说明
user_idbodyobjectUser ID
example: string
user_loginbodyobjectUser login name
example: string
game_idbodyobjectGame (category) ID
example: string
typebodyobjectStream type filter for the live list. Possible values: all, live; default all
example: string
languagebodyobjectLanguage
example: string
firstbodyintegerPage size, maximum 100, default 20
example: 0
beforebodyobjectPrevious page cursor
example: string
afterbodyobjectNext page cursor
example: string

响应字段

名称类型说明
successbooleanSuccess
codeintegerCode
messagestringMessage
dataobject-
data.morebooleanHas more
data.offsetstringoffset
data.dataarray<object>data

在线调试

https://openapi.scdata.cc/api/v1/twitch/search/live
请先从 Dashboard 选择一个 API key
发送请求前请先准备一个 API key。前往 Dashboard

JSON 请求体

cURL 示例

bash
curl -X POST "https://openapi.scdata.cc/api/v1/twitch/search/live" \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"user_id":"string","user_login":"string","game_id":"string","type":"string","language":"string","first":0,"before":"string","after":"string"}'

响应示例 (200 application/json)

json
{
"success": true,
"code": 200,
"message": "Request successful",
"data": {
"more": true,
"offset": "string",
"data": [
{
"id": "string",
"user_id": "string",
"user_login": "string",
"user_name": "string",
"game_id": "string",
"game_name": "string",
"type": "string",
"title": "string",
"viewer_count": 0,
"started_at": "2019-08-24T14:15:22.123Z",
"language": "string",
"thumbnail_url": "string",
"tags": [
"string"
],
"is_mature": true
}
]
}
}

使用场景

  • 实时机会捕捉 — 查看谁正在直播新发布的游戏,趁热度联系。
  • 直播看板 — 在内部监控屏上展示某分类下的热门直播频道。

相关接口