接口说明
建议每天更新
- 请求方式
GET- 请求地址
https://api.superscore.cn/basketball/statistics/team- Content-Type
application/x-www-form-urlencoded;charset=UTF-8
请求头与鉴权
| 字段 | 类型 | 必填 | 文档示例值 | 说明 |
|---|---|---|---|---|
token | string | 是 | test | token仅供测试,正式站请设置IP |
商户密钥仅保存在自己的服务端。测试 token 与正式 IP 授权的适用范围以本表及账户授权说明为准。
请求参数
Query 查询参数
| 字段 | 类型 | 必填 | 文档示例值 | 说明 |
|---|---|---|---|---|
languageId | string | 否 | zh | 多语言 默认zh |
teamId | int32 | 是 | 0 | No comments found. |
示例值用于说明字段;比赛、球队、联赛等 ID 应从实际接口取得,不能直接使用占位值。字段中的日期、枚举、分页范围与更新建议完整保留原始说明。
调用示例
替换 YOUR_MERCHANT_KEY、YOUR_MATCH_ID 等占位值后,在已授权的服务端调用。示例不会在本页面发起真实请求。
cURL
curl --get 'https://api.superscore.cn/basketball/statistics/team' \
--header 'token: YOUR_MERCHANT_KEY' \
--data-urlencode 'languageId=YOUR_LANGUAGE_ID' \
--data-urlencode 'teamId=YOUR_TEAM_ID'JavaScript / Node.js
// 仅在服务端保存商户密钥;替换示例占位值。
const url = new URL("https://api.superscore.cn/basketball/statistics/team");
url.search = new URLSearchParams({
"languageId": "YOUR_LANGUAGE_ID",
"teamId": "YOUR_TEAM_ID"
});
const response = await fetch(url, {
method: "GET",
headers: {
"token": "YOUR_MERCHANT_KEY"
}
});
if (!response.ok) throw new Error('HTTP ' + response.status);
const result = await response.json();
if (result.success !== true) throw new Error(String(result.message || result.code));
console.log(result.data);Python 标准库示例
# 标准库示例;商户密钥仅保存在服务端。
import json
from urllib.parse import urlencode
from urllib.request import Request, urlopen
parameters = {
"languageId": "YOUR_LANGUAGE_ID",
"teamId": "YOUR_TEAM_ID"
}
headers = {
"token": "YOUR_MERCHANT_KEY"
}
url = "https://api.superscore.cn/basketball/statistics/team"
if parameters:
url += '?' + urlencode(parameters)
with urlopen(Request(url, headers=headers, method="GET"), timeout=15) as response:
result = json.load(response)
if not result.get('success'):
raise RuntimeError(result.get('message') or result.get('code'))
print(result.get('data'))返回参数
字段路径保留完整层级;[] 表示数组元素,<key> 表示按数据内容变化的映射键。success、code、message 与 data 均按接口定义列出。
| 字段路径 | 类型 | 说明与枚举 |
|---|---|---|
success | boolean | 是否成功 |
message | string | 提示信息 |
data | object | 数据 |
data.teamId | int32 | 球队id |
data.gameList | array | 比赛统计 |
data.gameList[].playerId | int32 | 球员id |
data.gameList[].assistsPerGame | string | 场均助攻 |
data.gameList[].blocksPerGame | string | 场均盖帽 |
data.gameList[].fieldGoalsPct | string | 场均投篮命中率 |
data.gameList[].freeThrowsPct | string | 场均罚球占比 |
data.gameList[].gamesPlayed | string | 上场次数 |
data.gameList[].minutes | string | 上场时间 |
data.gameList[].pointsPerGame | string | 场均比赛得分 |
data.gameList[].rank | string | 排名 |
data.gameList[].reboundsPerGame | string | 场均篮板球 |
data.gameList[].stealsPerGame | string | 场均抢断 |
data.gameList[].threePointPct | string | 场均三分占比 |
data.gameList[].turnoversPerGame | string | 场均失误 |
data.gameList[].foulsPerGame | string | 场均犯规次数 |
data.gameList[].offensiveReboundsPerGame | string | 场均进攻篮板数 |
data.gameList[].efficiencyRating | string | 场均胜率 |
data.gameList[].defensiveReboundsPerGame | string | 场均防守篮板 |
data.gameList[].gamesStarted | string | 首发场数 |
data.shootingList | array | 投篮统计 |
data.shootingList[].playerId | int32 | 球员id |
data.shootingList[].assists | string | 助攻 |
data.shootingList[].blocks | string | 盖帽 |
data.shootingList[].defensiveRebounds | string | 防守篮板 |
data.shootingList[].fgAttempts | string | 投篮次数 |
data.shootingList[].fgMade | string | 投篮命中数 |
data.shootingList[].freeThrowsAttempts | string | 罚球次数 |
data.shootingList[].freeThrowsMade | string | 罚球命中数 |
data.shootingList[].minutes | string | 上场时间 |
data.shootingList[].offensiveRebounds | string | 进攻篮板 |
data.shootingList[].points | string | 得分 |
data.shootingList[].rank | string | 排名 |
data.shootingList[].rebounds | string | 篮板球 |
data.shootingList[].steals | string | 抢断 |
data.shootingList[].threePointAttempts | string | 三分球次数 |
data.shootingList[].threePointMade | string | 三分球命中次数 |
data.shootingList[].turnovers | string | 失误次数 |
data.shootingList[].twoPointMadePerGame | string | 场均两分 |
data.shootingList[].fgPct | string | 投篮占比 |
data.shootingList[].freeThrowsMadePerGame | string | 场均罚球次数 |
data.shootingList[].fieldGoalPctAvg | string | 平均投篮命中率 |
data.shootingList[].threePointAttemptsPerGame | string | 场均三分投篮次数 |
data.shootingList[].threePointPct | string | 场均三分占比 |
data.shootingList[].freeThrowsAttemptsPerGame | string | 场均比赛罚球次数 |
data.shootingList[].pointsPerShot | string | 场均得分 |
data.shootingList[].fgMadePerGame | string | 场均投篮 |
data.shootingList[].fgAttemptsPerGame | string | 场均投篮 |
data.shootingList[].threePointMadePerGame | string | 场均三分 |
data.shootingList[].freeThrowsPct | string | 罚球占比 |
data.shootingList[].twoPointPct | string | 两分投篮占比 |
data.shootingList[].twoPointAttempsPerGame | string | 两分投篮次数 |
code | string | 编码 |
timestamp | int64 | 时间 |
响应结构示例
下面的值仅展示字段类型,不是实时数据或真实调用结果。动态 map 的键取决于实际返回,不编造固定字段。
展开完整 JSON 结构
{
"success": false,
"message": "示例字符串",
"data": {
"teamId": 0,
"gameList": [
{
"playerId": 0,
"assistsPerGame": "示例字符串",
"blocksPerGame": "示例字符串",
"fieldGoalsPct": "示例字符串",
"freeThrowsPct": "示例字符串",
"gamesPlayed": "示例字符串",
"minutes": "示例字符串",
"pointsPerGame": "示例字符串",
"rank": "示例字符串",
"reboundsPerGame": "示例字符串",
"stealsPerGame": "示例字符串",
"threePointPct": "示例字符串",
"turnoversPerGame": "示例字符串",
"foulsPerGame": "示例字符串",
"offensiveReboundsPerGame": "示例字符串",
"efficiencyRating": "示例字符串",
"defensiveReboundsPerGame": "示例字符串",
"gamesStarted": "示例字符串"
}
],
"shootingList": [
{
"playerId": 0,
"assists": "示例字符串",
"blocks": "示例字符串",
"defensiveRebounds": "示例字符串",
"fgAttempts": "示例字符串",
"fgMade": "示例字符串",
"freeThrowsAttempts": "示例字符串",
"freeThrowsMade": "示例字符串",
"minutes": "示例字符串",
"offensiveRebounds": "示例字符串",
"points": "示例字符串",
"rank": "示例字符串",
"rebounds": "示例字符串",
"steals": "示例字符串",
"threePointAttempts": "示例字符串",
"threePointMade": "示例字符串",
"turnovers": "示例字符串",
"twoPointMadePerGame": "示例字符串",
"fgPct": "示例字符串",
"freeThrowsMadePerGame": "示例字符串",
"fieldGoalPctAvg": "示例字符串",
"threePointAttemptsPerGame": "示例字符串",
"threePointPct": "示例字符串",
"freeThrowsAttemptsPerGame": "示例字符串",
"pointsPerShot": "示例字符串",
"fgMadePerGame": "示例字符串",
"fgAttemptsPerGame": "示例字符串",
"threePointMadePerGame": "示例字符串",
"freeThrowsPct": "示例字符串",
"twoPointPct": "示例字符串",
"twoPointAttempsPerGame": "示例字符串"
}
]
},
"code": "示例字符串",
"timestamp": 0
}错误处理与使用说明
- 先检查 HTTP 状态,再解析 JSON;网络失败或非 JSON 响应不能当作成功。
- 业务响应 success 为 false 时,读取 code 和 message;不要把业务错误与 HTTP 状态混为一谈。
- 保存原始错误码、请求时间及接口路径用于排查,日志中移除商户密钥。
- 按该接口的数据更新建议、账户授权和调用频率请求;日期和时间戳单位以字段说明为准。
- 允许字段缺失或数据为空,按接口中的稳定 ID 关联资料,不依赖数组顺序。