接口说明
返回全量球员数据,可根据时间戳增量获取新增或变动的数据
1、首次全量更新,根据参数id获取全量数据
2、后续增量更新,根据参数time增量获取变动数据(建议请求频次:1min/次)
1、首次全量更新,根据参数id获取全量数据
2、后续增量更新,根据参数time增量获取变动数据(建议请求频次:1min/次)
调用信息
- 请求
GET https://api.sports.csap.ai/api/v1/players- 鉴权
- 请求头 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-* 头。 详见通用说明
请求参数 3
| 参数 | 类型 | 必填 | 示例 | 说明 |
|---|---|---|---|---|
| id | integer | 可选 | 6917 | 查询大于等于id的记录,根据id排序 |
| time | integer | 可选 | 查询大于等于更新时间的记录(时间戳),根据更新时间排序 | |
| limit | integer | 可选 | 2 | 返回数据最大数,默认为1000,最大为1000 |
请求示例
curl "https://api.sports.csap.ai/api/v1/players?limit=2" \ -H "X-API-Key: YOUR_API_KEY"
在线调试
示例返回
{
"code": 0,
"data": [
{
"ability": null,
"age": null,
"birthday": "1999-02-25T00:00:00Z",
"characteristics": null,
"coach_id": null,
"contract_until": "2030-06-30T00:00:00Z",
"country_id": null,
"country_ids": null,
"deathday": null,
"height": 196,
"id": 1,
"limit": null,
"logo": null,
"logo_url": null,
"market_value": 45000000,
"market_value_currency": null,
"market_value_eur": 45000000,
"max_id": null,
"max_time": null,
"min_id": null,
"min_time": null,
"name_zh": "詹路易吉·多纳鲁马",
"name_zht": null,
"national_logo": null,
"nationality": "Italy",
"position": "Goalkeeper",
"positions": null,
"preferred_foot": "right",
"query": null,
"retire_time": null,
"short_name_zh": null,
"short_name_zht": null,
"source": "S6",
"source_id": "315858",
"suffix": null,
"team": "Manchester City",
"team_zh": null,
"time": null,
"type": null,
"uid": 1,
"updated_at": 1794153803316,
"weight": null
},
{
"ability": null,
"age": null,
"birthday": "1992-05-20T00:00:00Z",
"characteristics": null,
"coach_id": null,
"contract_until": "2028-06-30T00:00:00Z",
"country_id": null,
"country_ids": null,
"deathday": null,
"height": 189,
"id": 2,
"limit": null,
"logo": null,
"logo_url": null,
"market_value": 5000000,
"market_value_currency": null,
"market_value_eur": 5000000,
"max_id": null,
"max_time": null,
"min_id": null,
"min_time": null,
"name_zh": null,
"name_zht": null,
"national_logo": null,
"nationality": "Argentina, Italy",
"position": "Goalkeeper",
"positions": null,
"preferred_foot": "right",
"query": null,
"retire_time": null,
"short_name_zh": null,
"short_name_zht": null,
"source": "S6",
"source_id": "229604",
"suffix": null,
"team": "Manchester City",
"team_zh": null,
"time": null,
"type": null,
"uid": 2,
"updated_at": 1794153803321,
"weight": null
}
],
"message": "success",
"success": true
}返回字段 44
abilitynull可为空能力评分(没有字段不存在)
agenull可为空年龄
birthdaystring出生日期
示例: "1999-02-25T00:00:00Z"characteristicsnull可为空技术特点字段说明(没有字段不存在): · 1-卸球 · 2-罚点球 · 3-任意球 · 4-远射 · 5-临门一脚 · 6-传球 · 7-组织进攻 · 8-带球 · 9-断球 · 10-铲球 · 11-稳定性 · 12-过人 · 13-长传 · 14-控球 · 15-空中对抗 · 16-地面对抗 · 17-失误倾向 · 18-纪律性 · 19-扑点球 · 20-反应 · 21-弃门参与进攻 · 22-高球拦截 · 23-处理球 · 24-远距离射门 · 25-站位 · 26-高位紧逼 · 27-远射扑救 · 28-传中 · 29-越位意识 · 30-近射扑救 · 31-专注度 · 32-防守参与度 · 33-关键传球 · 34-头球 · 35-定位球 · 36-直传球 · 37-反击 · 38-一脚出球 · 39-起高球 · 40-造犯规 · 41-内切 · 42-拳击球 · 43-解围 · · example:[[[11, 1]], [[7, 1]]]
coach_idnull可为空教练 id
contract_untilstring合同到期日
示例: "2030-06-30T00:00:00Z"country_idnull可为空国家 / 地区 id
country_idsnull可为空多国籍国家id · example:[1, 34]
deathdaynull可为空死亡时间(有数据时返回)
heightinteger身高(厘米)
示例: 196idinteger记录 id;翻页游标(id 参数取 >= 此值的记录)。比赛类接口里是我方比赛 id(gmid)
示例: 1limitnull可为空本次最多返回条数
logonull可为空logo(本平台的图片地址;没有时为空)
logo_urlnull可为空logo(本平台的图片地址;没有时为空)
market_valueinteger市值
示例: 45000000market_value_currencynull可为空市值单位
market_value_eurinteger身价(欧元)
示例: 45000000max_idnull可为空本页最大 id
max_timenull可为空本页最大更新时间(Unix 秒)
min_idnull可为空本页最小 id
min_timenull可为空本页最小更新时间(Unix 秒)
name_enstring英文名
示例: "Gianluigi Donnarumma"name_zhstring可为空中文名
示例: "詹路易吉·多纳鲁马"name_zhtnull可为空繁体中文名
national_logonull可为空球员logo(国家队,可判断球队是国家队时使用)
nationalitystring国籍
示例: "Italy"positionstring位置
示例: "Goalkeeper"positionsnull可为空详细位置字段说明(没有字段不存在): · 'LW'-左边锋 · 'RW'-右边锋 · 'ST'-前锋 · 'SS'-影锋 · 'AM'-攻击型中场 · 'ML'-左中场 · 'MC'-中路中场 · 'MR'-右中场 · 'DM'-防守型中场 · 'DL'-左后卫 · 'DC'-中后卫 · 'DR'-右后卫 · 'GK'-守门员 · · example:["RW", ["ST"]]
preferred_footstring惯用脚
示例: "right"querynull可为空查询信息(翻页游标、总数)
retire_timenull可为空退役时间(有数据时返回)
short_name_ennull可为空英文简称
short_name_zhnull可为空中文简称
short_name_zhtnull可为空粤语简称
sourcestring数据来源代号(S1、S2…)
示例: "S6"source_idstring来源内的 id
示例: "315858"suffixnull可为空球员u系列
teamstring球队名
示例: "Manchester City"team_zhnull可为空球队中文名
timenull可为空时间 / 分钟
typenull可为空类型
uidinteger记录唯一游标 id
示例: 1updated_atinteger最后更新时间(UTC,ISO 8601;增量同步用 time 参数按它取)
示例: 1794153803316weightnull可为空体重
错误码
| 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 | 服务端查询失败,可重试 |