接口说明
返回比赛分析统计数据(历史交锋/近期战绩、未来赛程、进球分布)
该接口用于请求未开赛的比赛的历史对阵等数据,多为历史数据,变化不频繁
请求限制:前30天比赛
请求次数:60次/min
该接口用于请求未开赛的比赛的历史对阵等数据,多为历史数据,变化不频繁
请求限制:前30天比赛
请求次数:60次/min
调用信息
- 请求
GET https://api.sports.csap.ai/api/v1/matches/analysis- 鉴权
- 请求头 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
| 参数 | 类型 | 必填 | 示例 | 说明 |
|---|---|---|---|---|
| id | integer | 必填 | 5179 | 比赛id |
请求示例
curl "https://api.sports.csap.ai/api/v1/matches/analysis?id=5179" \ -H "X-API-Key: YOUR_API_KEY"
在线调试
示例返回
{
"code": 0,
"data": [
{
"all": null,
"away": [
{
"away_scores": [
0,
0,
0
],
"away_team_id": 93586,
"competition_id": 3136,
"home_scores": [
2,
1,
0
],
"home_team_id": 75362,
"id": 4662815,
"match_time": 1793124000,
"odds": [
"0.87,0.5,0.92,0",
"1.83,3.50,3.50,0",
"0.97,3.25,0.82,0"
]
},
{
"away_scores": [
2,
1,
0
],
"away_team_id": 75362,
"competition_id": 3136,
"home_scores": [
4,
1,
0
],
"home_team_id": 93586,
"id": 4660166,
"match_time": 1792521000,
"odds": [
"1.02,0.0,0.77,0",
"2.60,3.50,2.25,0",
"0.97,3.25,0.82,0"
]
},
{
"away_scores": [
0,
0,
0
],
"away_team_id": 75362,
"competition_id": 3136,
"home_scores": [
4,
1,
0
],
"home_team_id": 25930,
"id": 4537979,
"match_time": 1777746600,
"odds": [
"0.82,2.25,0.97,0",
"1.11,7.5,17.0,0",
"0.87,3.0,0.92,0"
]
}
],
"away_avg_rating": null,
"away_form": "WLLLL",
"away_position": null,
"away_scores": null,
"away_team_id": null,
"competition_id": null,
"conceded": null,
"future": null,
"goal_distribution": null,
"group_num": null,
"h2h_away_wins": 0,
"h2h_draws": 0,
"h2h_home_wins": 0,
"history": {
"away": [
{
"away_scores": [
0,
0,
0
],
"away_team_id": 93586,
"competition_id": 3136,
"home_scores": [
2,
1,
0
],
"home_team_id": 75362,
"id": 4662815,
"match_time": 1793124000,
"odds": [
"0.87,0.5,0.92,0",
"1.83,3.50,3.50,0",
"0.97,3.25,0.82,0"
]
},
{
"away_scores": [
2,
1,
0
],
"away_team_id": 75362,
"competition_id": 3136,
"home_scores": [
4,
1,
0
],
"home_team_id": 93586,
"id": 4660166,
"match_time": 1792521000,
"odds": [
"1.02,0.0,0.77,0",
"2.60,3.50,2.25,0",
"0.97,3.25,0.82,0"
]
},
{
"away_scores": [
0,
0,
0
],
"away_team_id": 75362,
"competition_id": 3136,
"home_scores": [
4,
1,
0
],
"home_team_id": 25930,
"id": 4537979,
"match_time": 1777746600,
"odds": [
"0.82,2.25,0.97,0",
"1.11,7.5,17.0,0",
"0.87,3.0,0.92,0"
]
}
],
"home": [
{
"away_scores": [
1,
0,
1
],
"away_team_id": 53790,
"competition_id": 3136,
"home_scores": [
1,
0,
0
],
"home_team_id": 83504,
"id": 4661910,
"match_time": 1792866600,
"odds": [
"0.85,0.5,0.95,0",
"1.80,3.40,3.75,0",
"0.90,2.5,0.90,0"
]
},
{
"away_scores": [
1,
0,
1
],
"away_team_id": 83504,
"competition_id": 3136,
"home_scores": [
1,
1,
0
],
"home_team_id": 53790,
"id": 4660167,
"match_time": 1792521000,
"odds": [
"1.00,-0.25,0.80,0",
"3.00,3.50,2.00,0",
"0.80,2.5,1.00,0"
]
},
{
"away_scores": [
3,
0,
1
],
"away_team_id": 53790,
"competition_id": 3136,
"home_scores": [
1,
0,
2
],
"home_team_id": 93268,
"id": 4657192,
"match_time": 1791914400,
"odds": [
"1.00,1.0,0.80,0",
"1.57,3.60,5.00,0",
"0.95,2.75,0.85,0"
]
}
],
"vs": []
},
"home": [
{
"away_scores": [
1,
0,
1
],
"away_team_id": 53790,
"competition_id": 3136,
"home_scores": [
1,
0,
0
],
"home_team_id": 83504,
"id": 4661910,
"match_time": 1792866600,
"odds": [
"0.85,0.5,0.95,0",
"1.80,3.40,3.75,0",
"0.90,2.5,0.90,0"
]
},
{
"away_scores": [
1,
0,
1
],
"away_team_id": 83504,
"competition_id": 3136,
"home_scores": [
1,
1,
0
],
"home_team_id": 53790,
"id": 4660167,
"match_time": 1792521000,
"odds": [
"1.00,-0.25,0.80,0",
"3.00,3.50,2.00,0",
"0.80,2.5,1.00,0"
]
},
{
"away_scores": [
3,
0,
1
],
"away_team_id": 53790,
"competition_id": 3136,
"home_scores": [
1,
0,
2
],
"home_team_id": 93268,
"id": 4657192,
"match_time": 1791914400,
"odds": [
"1.00,1.0,0.80,0",
"1.57,3.60,5.00,0",
"0.95,2.75,0.85,0"
]
}
],
"home_avg_rating": null,
"home_form": "DDWDD",
"home_position": null,
"home_scores": null,
"home_team_id": null,
"id": 5190,
"info": {
"away_team_id": 75362,
"home_team_id": 53790,
"id": 4664993
},
"match_source": "S3",
"match_time": null,
"matches": null,
"neutral": null,
"note": null,
"odds": null,
"round": null,
"round_num": null,
"scored": null,
"season_id": null,
"stage_id": null,
"status_id": null,
"updated_at": 1793778664249,
"vs": []
},
{
"all": null,
"away": [
{
"away_scores": [
0,
0,
0
],
"away_team_id": 37921,
"competition_id": 1699,
"home_scores": [
2,
1,
0
],
"home_team_id": 39007,
"id": 4661675,
"match_time": 1793124000,
"odds": [
"0.92,0.75,0.87,0",
"1.66,3.50,4.20,0",
"1.00,2.5,0.80,0"
]
},
{
"away_scores": [
1,
0,
0
],
"away_team_id": 39007,
"competition_id": 1699,
"home_scores": [
0,
0,
1
],
"home_team_id": 37337,
"id": 4659266,
"match_time": 1792605600,
"odds": [
"1.00,0.25,0.80,0",
"2.50,3.10,2.55,0",
"0.77,2.0,1.02,0"
]
},
{
"away_scores": [
0,
0,
0
],
"away_team_id": 38154,
"competition_id": 1699,
"home_scores": [
3,
1,
0
],
"home_team_id": 39007,
"id": 4655809,
"match_time": 1792094400,
"odds": [
"0.85,0.25,0.95,0",
"2.00,3.10,3.30,0",
"1.02,2.25,0.77,0"
]
}
],
"away_avg_rating": null,
"away_form": "WWWLW",
"away_position": null,
"away_scores": null,
"away_team_id": null,
"competition_id": null,
"conceded": null,
"future": null,
"goal_distribution": null,
"group_num": null,
"h2h_away_wins": 2,
"h2h_draws": 0,
"h2h_home_wins": 3,
"history": {
"away": [
{
"away_scores": [
0,
0,
0
],
"away_team_id": 37921,
"competition_id": 1699,
"home_scores": [
2,
1,
0
],
"home_team_id": 39007,
"id": 4661675,
"match_time": 1793124000,
"odds": [
"0.92,0.75,0.87,0",
"1.66,3.50,4.20,0",
"1.00,2.5,0.80,0"
]
},
{
"away_scores": [
1,
0,
0
],
"away_team_id": 39007,
"competition_id": 1699,
"home_scores": [
0,
0,
1
],
"home_team_id": 37337,
"id": 4659266,
"match_time": 1792605600,
"odds": [
"1.00,0.25,0.80,0",
"2.50,3.10,2.55,0",
"0.77,2.0,1.02,0"
]
},
{
"away_scores": [
0,
0,
0
],
"away_team_id": 38154,
"competition_id": 1699,
"home_scores": [
3,
1,
0
],
"home_team_id": 39007,
"id": 4655809,
"match_time": 1792094400,
"odds": [
"0.85,0.25,0.95,0",
"2.00,3.10,3.30,0",
"1.02,2.25,0.77,0"
]
}
],
"home": [
{
"away_scores": [
1,
0,
0
],
"away_team_id": 44210,
"competition_id": 1699,
"home_scores": [
1,
0,
0
],
"home_team_id": 37302,
"id": 4661663,
"match_time": 1793210400,
"odds": [
"1.05,0.0,0.75,0",
"2.75,3.10,2.30,0",
"1.00,2.25,0.80,0"
]
},
{
"away_scores": [
2,
0,
0
],
"away_team_id": 37862,
"competition_id": 1699,
"home_scores": [
1,
1,
1
],
"home_team_id": 44210,
"id": 4658848,
"match_time": 1792519200,
"odds": [
"0.85,0.0,0.95,0",
"2.45,3.10,2.55,0",
"0.77,2.0,1.02,0"
]
},
{
"away_scores": [
1,
0,
0
],
"away_team_id": 44210,
"competition_id": 1699,
"home_scores": [
0,
0,
0
],
"home_team_id": 37316,
"id": 4655558,
"match_time": 1792000800,
"odds": [
"0.80,0.0,1.00,0",
"2.55,3.20,2.45,0",
"0.80,2.0,1.00,0"
]
}
],
"vs": [
{
"away_scores": [
2,
0,
1
],
"away_team_id": 44210,
"competition_id": 1699,
"home_scores": [
2,
2,
1
],
"home_team_id": 39007,
"id": 4546848,
"match_time": 1780610400,
"odds": [
"1.05,0.25,0.75,0",
"2.3,3.4,2.7,0",
"1.0,2.5,0.8,0"
]
},
{
"away_scores": [
1,
0,
0
],
"away_team_id": 44210,
"competition_id": 1699,
"home_scores": [
1,
1,
1
],
"home_team_id": 39007,
"id": 4008933,
"match_time": 1694210400,
"odds": [
"1.02,0.25,0.78,0",
"2.25,3.2,2.8,0",
"0.8,2.25,1.0,0"
]
},
{
"away_scores": [
1,
0,
1
],
"away_team_id": 39007,
"competition_id": 1699,
"home_scores": [
4,
1,
0
],
"home_team_id": 44210,
"id": 3929992,
"match_time": 1685023200,
"odds": [
"0.9,0.5,0.9,0",
"1.85,3.25,3.8,0",
"0.82,2.25,0.97,0"
]
}
]
},
"home": [
{
"away_scores": [
1,
0,
0
],
"away_team_id": 44210,
"competition_id": 1699,
"home_scores": [
1,
0,
0
],
"home_team_id": 37302,
"id": 4661663,
"match_time": 1793210400,
"odds": [
"1.05,0.0,0.75,0",
"2.75,3.10,2.30,0",
"1.00,2.25,0.80,0"
]
},
{
"away_scores": [
2,
0,
0
],
"away_team_id": 37862,
"competition_id": 1699,
"home_scores": [
1,
1,
1
],
"home_team_id": 44210,
"id": 4658848,
"match_time": 1792519200,
"odds": [
"0.85,0.0,0.95,0",
"2.45,3.10,2.55,0",
"0.77,2.0,1.02,0"
]
},
{
"away_scores": [
1,
0,
0
],
"away_team_id": 44210,
"competition_id": 1699,
"home_scores": [
0,
0,
0
],
"home_team_id": 37316,
"id": 4655558,
"match_time": 1792000800,
"odds": [
"0.80,0.0,1.00,0",
"2.55,3.20,2.45,0",
"0.80,2.0,1.00,0"
]
}
],
"home_avg_rating": null,
"home_form": "DLWLD",
"home_position": null,
"home_scores": null,
"home_team_id": null,
"id": 5191,
"info": {
"away_team_id": 39007,
"home_team_id": 44210,
"id": 4663132
},
"match_source": "S3",
"match_time": null,
"matches": null,
"neutral": null,
"note": null,
"odds": null,
"round": null,
"round_num": null,
"scored": null,
"season_id": null,
"stage_id": null,
"status_id": null,
"updated_at": 1793778673021,
"vs": [
{
"away_scores": [
2,
0,
1
],
"away_team_id": 44210,
"competition_id": 1699,
"home_scores": [
2,
2,
1
],
"home_team_id": 39007,
"id": 4546848,
"match_time": 1780610400,
"odds": [
"1.05,0.25,0.75,0",
"2.3,3.4,2.7,0",
"1.0,2.5,0.8,0"
]
},
{
"away_scores": [
1,
0,
0
],
"away_team_id": 44210,
"competition_id": 1699,
"home_scores": [
1,
1,
1
],
"home_team_id": 39007,
"id": 4008933,
"match_time": 1694210400,
"odds": [
"1.02,0.25,0.78,0",
"2.25,3.2,2.8,0",
"0.8,2.25,1.0,0"
]
},
{
"away_scores": [
1,
0,
1
],
"away_team_id": 39007,
"competition_id": 1699,
"home_scores": [
4,
1,
0
],
"home_team_id": 44210,
"id": 3929992,
"match_time": 1685023200,
"odds": [
"0.9,0.5,0.9,0",
"1.85,3.25,3.8,0",
"0.82,2.25,0.97,0"
]
}
]
}
],
"message": "success",
"success": true
}返回字段 39
allnull可为空全部场次
awayarray<object>可为空客队近期战绩(格式同 info比赛信息字段)· 8
away_avg_ratingnumber可为空
示例: 7.27away_formstring
示例: "WLLLL"away_positionnull可为空客队排名
away_scoresnull可为空比分字段说明 · example:[1, 0, 0, 0, -1, 0, 0]
away_team_idnull可为空客队id
competition_idnull可为空赛事 id
concedednull可为空主队失球分布
futurenull可为空未来赛程
goal_distributionnull可为空进球分布,可能不存在
group_numnull可为空第几组,1-A、2-B以此类推
h2h_away_winsinteger可为空
示例: 0h2h_drawsinteger可为空
示例: 0h2h_home_winsinteger可为空
示例: 0historyobject可为空历史交锋/近期战绩· 3
homearray<object>可为空主队近期战绩(格式同 info比赛信息字段)· 8
home_avg_ratingnumber可为空
示例: 7.01home_formstring
示例: "DDWDD"home_positionnull可为空主队排名
home_scoresnull可为空比分字段说明 · example:[1, 0, 0, 0, -1, 0, 0]
home_team_idnull可为空主队id
idinteger记录 id;翻页游标(id 参数取 >= 此值的记录)。比赛类接口里是我方比赛 id(gmid)
示例: 5190infoobject可为空· 3
match_sourcestring这行数据的来源代号
示例: "S3"gmidinteger可为空我方比赛 id(gmid,全平台唯一)
match_timenull可为空开赛时间(UTC,ISO 8601)
matchesnull可为空场次
neutralnull可为空是否中立场,1-是、0-否
notenull可为空备注
oddsnull可为空BET365初盘 · example:["0.86,-0.5,1.04,0","3.8,3.6,2.05,0","0.9,2.75,1.0,0","0.9,9,0.9,0"]
roundnull可为空轮次
round_numnull可为空第几轮
scorednull可为空主队进球分布
season_idnull可为空赛季 id
stage_idnull可为空阶段id
status_idnull可为空比赛状态码(见状态与类型码对照表)
updated_atinteger最后更新时间(UTC,ISO 8601;增量同步用 time 参数按它取)
示例: 1793778664249vsarray可为空历史交锋(格式同 info比赛信息字段)
错误码
| HTTP | message | 场景 |
|---|---|---|
| 401 | missing API key / unauthorized | 没带 X-API-Key 或 key 无效、已停用 |
| 400 | bad param … | 参数格式不对(如 id 不是数字或 u<uid>) |
| 301 | match merged into <gmid> | 按旧比赛 id 查,这场已合并到新 gmid:Location 指向新地址,返回体带 moved_to |
| 404 | not found | 比赛 / 球队 / 赛事不存在,或不在这个 key 的可见范围内(外部 key 只能看到开放范围内的比赛) |
| 429 | rate limit exceeded / daily quota exceeded | 超过 key 的每分钟次数或每日配额 |
| 429 | server busy, retry later | 服务端并发名额已满(重型请求同时只有 2 个),按 Retry-After 秒后重试 |
| 500 | query error | 服务端查询失败,可重试 |