← 返回接口文档

GET/api/v1/matches/live/history

获取历史比赛统计数据
统计数据包世界杯专题数据包activebetacore可调用(数据有范围)

接口说明

返回已完结历史比赛(限制:30天内)的统计数据(比赛事件、技术统计、文字直播)
请求次数:120次/min

说明:
实时比赛统计数据都在实时统计数据接口获取,实时统计数据接口返回的是2h内的全量比赛的实时统计数据,需本地记录
若比赛统计数据获取有缺失或未获取到,再通过该接口进行查缺补漏

调用信息

请求
GET https://api.sports.csap.ai/api/v1/matches/live/history
鉴权
请求头 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-* 头。 详见通用说明

请求参数 1

参数类型必填示例说明
idinteger必填5179比赛id

请求示例

curl "https://api.sports.csap.ai/api/v1/matches/live/history?id=5179" \
  -H "X-API-Key: YOUR_API_KEY"

在线调试

示例返回

下面是 2026/11/09 22:28(北京时间) 用外部 key 实际请求的返回:HTTP 200,1 行,112 ms(数据只留前 2 行)

{
  "code": 0,
  "data": [
    {
      "id": 5179,
      "incidents": [
        {
          "position": 2,
          "time": 9,
          "type": 20
        },
        {
          "player_name": "Adam Mulele",
          "position": 2,
          "time": 29,
          "type": 22
        },
        {
          "position": 2,
          "time": 30,
          "type": 21
        }
      ],
      "score": [
        5179,
        8,
        [
          3,
          0,
          0
        ]
      ],
      "stats": [
        {
          "away": 37,
          "home": 63,
          "type": 25
        },
        {
          "away": 3,
          "home": 7,
          "type": 2
        },
        {
          "away": 2,
          "home": 1,
          "type": 3
        }
      ],
      "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": "6' 皇家马德里C队 第 1 个角球",
          "incident_type": "corner_kick",
          "main": 0,
          "player_in": null,
          "player_name": null,
          "player_out": null,
          "position": 1,
          "time": "6",
          "type": 6
        },
        {
          "add_time": null,
          "data": "9' 黄牌 巴拉多利德B队",
          "incident_type": "yellow_card",
          "main": 0,
          "player_in": null,
          "player_name": null,
          "player_out": null,
          "position": 2,
          "time": "9",
          "type": 20
        }
      ]
    }
  ],
  "message": "success",
  "success": true
}

返回字段 5

idinteger记录 id;翻页游标(id 参数取 >= 此值的记录)。比赛类接口里是我方比赛 id(gmid)示例: 5179
incidentsarray<object>比赛事件字段说明,不存在为空· 5
scorearray比分
statsarray<object>统计项· 3
tlivearray<object>文字直播字段说明,不存在为空· 10

错误码

HTTPmessage场景
401missing API key / unauthorized没带 X-API-Key 或 key 无效、已停用
400bad param …参数格式不对(如 id 不是数字或 u<uid>)
301match merged into <gmid>按旧比赛 id 查,这场已合并到新 gmid:Location 指向新地址,返回体带 moved_to
404not found比赛 / 球队 / 赛事不存在,或不在这个 key 的可见范围内(外部 key 只能看到开放范围内的比赛)
429rate limit exceeded / daily quota exceeded超过 key 的每分钟次数或每日配额
429server busy, retry later服务端并发名额已满(重型请求同时只有 2 个),按 Retry-After 秒后重试
500query error服务端查询失败,可重试