调用信息
- 请求
GET https://api.sports.csap.ai/api/v1/player/summary- 鉴权
- 请求头 X-API-Key: <你的 key>(也支持 Authorization: Bearer <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-* 头。 详见通用说明
请求参数 3
| 参数 | 类型 | 必填 | 示例 | 说明 |
|---|---|---|---|---|
| gpid | integer | 必填 | 6917 | 我方球员 id(必填) |
| competition_id | integer | 可选 | 287 | 只看某项赛事 |
| limit | integer | 可选 | 2 | 近期出场条数 |
请求示例
curl "https://api.sports.csap.ai/api/v1/player/summary?gpid=6917&limit=2" \ -H "X-API-Key: YOUR_API_KEY"
在线调试
示例返回
{
"code": 0,
"data": {
"profile": {
"birthday": null,
"contract_until": null,
"gpid": 6917,
"height": null,
"name_zh": "索兹尔",
"name_zht": null,
"nationality": null,
"position": "D",
"position_id": 4,
"position_zh": "后卫",
"preferred_foot": null,
"shirt_number": "12",
"weight": null
},
"summary": {
"apps": 1,
"assists": 0,
"avg_rating": null,
"goals": 0,
"minutes": 46
}
},
"message": "success",
"success": true
}返回字段 2
profileobject· 14
summaryobject· 5
错误码
| 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 | 服务端查询失败,可重试 |