接口说明
返回最近120min内的比赛事件、技术统计、文字直播、趋势数据(全量更新)
ps:非120min内的比赛数据有更新,也会同步返回
建议请求频次:2s/次
比赛进行分钟数获取公式
上半场:比赛进行分钟数=(当前时间戳-上半场开球时间戳) / 60 + 1
下半场:比赛进行分钟数=(当前时间戳-下半场开球时间戳) / 60 + 45 + 1
加时:比赛进行分钟数=(当前时间戳-加时开球时间戳) / 60 + 90 + 1
stats 比赛统计字段说明
包含:角球、黄牌、红牌、点球、射正、射偏、进攻、危险进攻、控球率、射门被阻挡
incidents 比赛事件字段说明
包含:黄牌、两黄变红、红牌、进球(助攻)、换人、点球、点球未进、乌龙球、VAR、中场、伤停补时、结束、加时结束、点球大战结束、补水
tlive 文字直播字段说明
包含:黄牌、红牌、进球、换人、角球、越位、助攻、比赛开始、中场、结束等
trend 趋势字段说明
主队为正、客队为负,按分钟数变化(有加时赛,加时分钟数变化加在下半场中)
ps:非120min内的比赛数据有更新,也会同步返回
建议请求频次:2s/次
比赛进行分钟数获取公式
上半场:比赛进行分钟数=(当前时间戳-上半场开球时间戳) / 60 + 1
下半场:比赛进行分钟数=(当前时间戳-下半场开球时间戳) / 60 + 45 + 1
加时:比赛进行分钟数=(当前时间戳-加时开球时间戳) / 60 + 90 + 1
stats 比赛统计字段说明
包含:角球、黄牌、红牌、点球、射正、射偏、进攻、危险进攻、控球率、射门被阻挡
incidents 比赛事件字段说明
包含:黄牌、两黄变红、红牌、进球(助攻)、换人、点球、点球未进、乌龙球、VAR、中场、伤停补时、结束、加时结束、点球大战结束、补水
tlive 文字直播字段说明
包含:黄牌、红牌、进球、换人、角球、越位、助攻、比赛开始、中场、结束等
trend 趋势字段说明
主队为正、客队为负,按分钟数变化(有加时赛,加时分钟数变化加在下半场中)
调用信息
- 请求
GET https://api.sports.csap.ai/api/v1/matches/detail/live- 鉴权
- 请求头 X-API-Key: <你的 key>(也支持 Authorization: Bearer <key>;?key= 仍可用但不建议,key 会留在地址和日志里)
- 外部 key
- 可调用(数据有范围)外部 key 可以调用,但只返回开放范围内的数据,见「通用说明 · 外部 key 的数据范围」。
- 频率限制
- 每分钟 3000 次 · 每天 200000 次 · 按 key 配置(以 /api/v1/account 返回的 rate_per_min、quota_daily 为准;上面是试用 key 的值),超出回 429。另外整表快照、不带比赛 id 的统计列表等重型请求全站同时只处理 2 个,排不上回 429 + Retry-After。响应里暂时没有 X-RateLimit-* 头。 详见通用说明
请求参数 0
该接口无请求参数。
请求示例
curl "https://api.sports.csap.ai/api/v1/matches/detail/live" \ -H "X-API-Key: YOUR_API_KEY"
在线调试
示例返回
{
"code": 0,
"data": [
{
"id": 6905,
"incidents": [],
"score": [
6905,
4,
[
0,
0,
0
]
],
"stats": [],
"tlive": [
{
"add_time": null,
"data": "比赛开始",
"incident_type": "match_started",
"main": 1,
"player_in": null,
"player_name": null,
"player_out": null,
"position": 0,
"time": "0",
"type": 40
},
{
"add_time": null,
"data": "上半场结束,弗兰德诺维 0-0 埃斯兰沙尔",
"incident_type": "halftime",
"main": 1,
"player_in": null,
"player_name": null,
"player_out": null,
"position": 0,
"time": "45",
"type": 41
},
{
"add_time": null,
"data": "下半场开始",
"incident_type": "second_half",
"main": 1,
"player_in": null,
"player_name": null,
"player_out": null,
"position": 0,
"time": "46",
"type": 66
}
]
},
{
"id": 6999,
"incidents": [
{
"position": 1,
"time": 29,
"type": 1
},
{
"position": 2,
"time": 32,
"type": 1
},
{
"position": 2,
"time": 42,
"type": 20
}
],
"score": [
6999,
4,
[
1,
1,
0
]
],
"stats": [
{
"away": 3,
"home": 2,
"type": 2
},
{
"away": 2,
"home": 2,
"type": 3
},
{
"away": 0,
"home": 0,
"type": 4
}
],
"tlive": [
{
"add_time": null,
"data": "比赛开始",
"incident_type": "match_started",
"main": 1,
"player_in": null,
"player_name": null,
"player_out": null,
"position": 0,
"time": "0",
"type": 40
},
{
"add_time": null,
"data": "24' KF雷普卡U19 第 1 个角球",
"incident_type": "corner_kick",
"main": 0,
"player_in": null,
"player_name": null,
"player_out": null,
"position": 1,
"time": "24",
"type": 6
},
{
"add_time": null,
"data": "29' 进球! KF雷普卡U19",
"incident_type": "goal",
"main": 1,
"player_in": null,
"player_name": null,
"player_out": null,
"position": 1,
"time": "29",
"type": 1
}
]
}
],
"message": "success",
"success": true
}返回字段 5
idinteger记录 id;翻页游标(id 参数取 >= 此值的记录)。比赛类接口里是我方比赛 id(gmid)
示例: 6905incidentsarray比赛事件字段说明,可能不存在
scorearray比分
statsarray统计项
tlivearray<object>文字直播字段说明,可能不存在· 10
错误码
| HTTP | message | 场景 |
|---|---|---|
| 401 | missing API key / unauthorized | 没带 X-API-Key 或 key 无效、已停用 |
| 429 | rate limit exceeded / daily quota exceeded | 超过 key 的每分钟次数或每日配额 |
| 429 | server busy, retry later | 服务端并发名额已满(重型请求同时只有 2 个),按 Retry-After 秒后重试 |
| 500 | query error | 服务端查询失败,可重试 |