账户
浏览产品与网站导航

比赛-交战统计

GET https://api.superscore.cn/football/statistics/matchBattle

接口说明

按需请求

请求方式
GET
请求地址
https://api.superscore.cn/football/statistics/matchBattle
Content-Type
application/x-www-form-urlencoded;charset=UTF-8

请求头与鉴权

字段类型必填文档示例值说明
tokenstring是传商户KEYtoken(传商户KEY)仅供测试,正式站请设置IP

商户密钥仅保存在自己的服务端。测试 token 与正式 IP 授权的适用范围以本表及账户授权说明为准。

请求参数

Query 查询参数

字段类型必填文档示例值说明
matchIdint32是0比赛ID

示例值用于说明字段;比赛、球队、联赛等 ID 应从实际接口取得,不能直接使用占位值。字段中的日期、枚举、分页范围与更新建议完整保留原始说明。

调用示例

替换 YOUR_MERCHANT_KEY、YOUR_MATCH_ID 等占位值后,在已授权的服务端调用。示例不会在本页面发起真实请求。

cURL

curl --get 'https://api.superscore.cn/football/statistics/matchBattle' \
  --header 'token: YOUR_MERCHANT_KEY' \
  --data-urlencode 'matchId=YOUR_MATCH_ID'

JavaScript / Node.js

// 仅在服务端保存商户密钥;替换示例占位值。
const url = new URL("https://api.superscore.cn/football/statistics/matchBattle");
url.search = new URLSearchParams({
  "matchId": "YOUR_MATCH_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 = {
  "matchId": "YOUR_MATCH_ID"
}
headers = {
  "token": "YOUR_MERCHANT_KEY"
}
url = "https://api.superscore.cn/football/statistics/matchBattle"
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 均按接口定义列出。

字段路径类型说明与枚举
successboolean状态码
codestring状态编号
messagestring描述
dataobject数据
data.matchIdint32比赛ID
data.homeIdint32主队ID
data.awayIdint32客队ID
data.homeTeamobject主队数据
data.homeTeam.teamIdint32球队ID
data.homeTeam.typeint32类型:0俱乐部,1国家队
data.homeTeam.nameEnstring球队名称(英文)
data.homeTeam.nameShortEnstring球队短名称(英文)
data.homeTeam.nameZhstring球队名称(中文)
data.homeTeam.nameShortZhstring球队短名称(中文)
data.homeTeam.nameZhtstring球队名称(繁体中文)
data.homeTeam.nameShortZhtstring球队短名称(繁体中文)
data.homeTeam.countryIdstring国家ID
data.homeTeam.foundedstring成立时间
data.homeTeam.venueIdint32球场ID
data.homeTeam.imagestring球队图片
data.homeTeam.coachIdint32教练ID
data.awayTeamobject客队数据
data.awayTeam.teamIdint32球队ID
data.awayTeam.typeint32类型:0俱乐部,1国家队
data.awayTeam.nameEnstring球队名称(英文)
data.awayTeam.nameShortEnstring球队短名称(英文)
data.awayTeam.nameZhstring球队名称(中文)
data.awayTeam.nameShortZhstring球队短名称(中文)
data.awayTeam.nameZhtstring球队名称(繁体中文)
data.awayTeam.nameShortZhtstring球队短名称(繁体中文)
data.awayTeam.countryIdstring国家ID
data.awayTeam.foundedstring成立时间
data.awayTeam.venueIdint32球场ID
data.awayTeam.imagestring球队图片
data.awayTeam.coachIdint32教练ID
data.h2hMatchesarray交战历史
data.h2hMatches[].matchIdint32比赛ID
data.h2hMatches[].timeint32比赛时间
data.h2hMatches[].leagueobject联赛数据
data.h2hMatches[].league.leagueIdint32联赛ID
data.h2hMatches[].league.nameEnstring联赛名称(英文)
data.h2hMatches[].league.nameShortEnstring联赛短名称(英文)
data.h2hMatches[].league.nameZhstring联赛名称(中文)
data.h2hMatches[].league.nameShortZhstring联赛短名称(中文)
data.h2hMatches[].league.nameZhtstring联赛名称(繁体中文)
data.h2hMatches[].league.nameShortZhtstring联赛短名称(繁体中文)
data.h2hMatches[].league.countryIdstring国家ID
data.h2hMatches[].league.seasonstring当前赛季
data.h2hMatches[].league.dateStartstring开始时间
data.h2hMatches[].league.dateEndstring结束时间
data.h2hMatches[].league.isCupint32赛事类型:联赛0,杯赛1
data.h2hMatches[].league.liveLineupsint32是否有阵容
data.h2hMatches[].league.liveStatsint32是否有球员统计
data.h2hMatches[].league.imagestring联赛图片
data.h2hMatches[].league.colorstring颜色
data.h2hMatches[].homeIdint32主队ID
data.h2hMatches[].awayIdint32客队ID
data.h2hMatches[].homeTeamobject主队数据
data.h2hMatches[].homeTeam.teamIdint32球队ID
data.h2hMatches[].homeTeam.typeint32类型:0俱乐部,1国家队
data.h2hMatches[].homeTeam.nameEnstring球队名称(英文)
data.h2hMatches[].homeTeam.nameShortEnstring球队短名称(英文)
data.h2hMatches[].homeTeam.nameZhstring球队名称(中文)
data.h2hMatches[].homeTeam.nameShortZhstring球队短名称(中文)
data.h2hMatches[].homeTeam.nameZhtstring球队名称(繁体中文)
data.h2hMatches[].homeTeam.nameShortZhtstring球队短名称(繁体中文)
data.h2hMatches[].homeTeam.countryIdstring国家ID
data.h2hMatches[].homeTeam.foundedstring成立时间
data.h2hMatches[].homeTeam.venueIdint32球场ID
data.h2hMatches[].homeTeam.imagestring球队图片
data.h2hMatches[].homeTeam.coachIdint32教练ID
data.h2hMatches[].awayTeamobject客队数据
data.h2hMatches[].awayTeam.teamIdint32球队ID
data.h2hMatches[].awayTeam.typeint32类型:0俱乐部,1国家队
data.h2hMatches[].awayTeam.nameEnstring球队名称(英文)
data.h2hMatches[].awayTeam.nameShortEnstring球队短名称(英文)
data.h2hMatches[].awayTeam.nameZhstring球队名称(中文)
data.h2hMatches[].awayTeam.nameShortZhstring球队短名称(中文)
data.h2hMatches[].awayTeam.nameZhtstring球队名称(繁体中文)
data.h2hMatches[].awayTeam.nameShortZhtstring球队短名称(繁体中文)
data.h2hMatches[].awayTeam.countryIdstring国家ID
data.h2hMatches[].awayTeam.foundedstring成立时间
data.h2hMatches[].awayTeam.venueIdint32球场ID
data.h2hMatches[].awayTeam.imagestring球队图片
data.h2hMatches[].awayTeam.coachIdint32教练ID
data.h2hMatches[].homeScorestring主队比分
data.h2hMatches[].awayScorestring客队比分
data.h2hMatches[].statusint32比赛状态
data.homeRecentMatchesarray主队近期比赛
data.homeRecentMatches[].matchIdint32比赛ID
data.homeRecentMatches[].timeint32比赛时间
data.homeRecentMatches[].leagueobject联赛数据
data.homeRecentMatches[].league.leagueIdint32联赛ID
data.homeRecentMatches[].league.nameEnstring联赛名称(英文)
data.homeRecentMatches[].league.nameShortEnstring联赛短名称(英文)
data.homeRecentMatches[].league.nameZhstring联赛名称(中文)
data.homeRecentMatches[].league.nameShortZhstring联赛短名称(中文)
data.homeRecentMatches[].league.nameZhtstring联赛名称(繁体中文)
data.homeRecentMatches[].league.nameShortZhtstring联赛短名称(繁体中文)
data.homeRecentMatches[].league.countryIdstring国家ID
data.homeRecentMatches[].league.seasonstring当前赛季
data.homeRecentMatches[].league.dateStartstring开始时间
data.homeRecentMatches[].league.dateEndstring结束时间
data.homeRecentMatches[].league.isCupint32赛事类型:联赛0,杯赛1
data.homeRecentMatches[].league.liveLineupsint32是否有阵容
data.homeRecentMatches[].league.liveStatsint32是否有球员统计
data.homeRecentMatches[].league.imagestring联赛图片
data.homeRecentMatches[].league.colorstring颜色
data.homeRecentMatches[].homeIdint32主队ID
data.homeRecentMatches[].awayIdint32客队ID
data.homeRecentMatches[].homeTeamobject主队数据
data.homeRecentMatches[].homeTeam.teamIdint32球队ID
data.homeRecentMatches[].homeTeam.typeint32类型:0俱乐部,1国家队
data.homeRecentMatches[].homeTeam.nameEnstring球队名称(英文)
data.homeRecentMatches[].homeTeam.nameShortEnstring球队短名称(英文)
data.homeRecentMatches[].homeTeam.nameZhstring球队名称(中文)
data.homeRecentMatches[].homeTeam.nameShortZhstring球队短名称(中文)
data.homeRecentMatches[].homeTeam.nameZhtstring球队名称(繁体中文)
data.homeRecentMatches[].homeTeam.nameShortZhtstring球队短名称(繁体中文)
data.homeRecentMatches[].homeTeam.countryIdstring国家ID
data.homeRecentMatches[].homeTeam.foundedstring成立时间
data.homeRecentMatches[].homeTeam.venueIdint32球场ID
data.homeRecentMatches[].homeTeam.imagestring球队图片
data.homeRecentMatches[].homeTeam.coachIdint32教练ID
data.homeRecentMatches[].awayTeamobject客队数据
data.homeRecentMatches[].awayTeam.teamIdint32球队ID
data.homeRecentMatches[].awayTeam.typeint32类型:0俱乐部,1国家队
data.homeRecentMatches[].awayTeam.nameEnstring球队名称(英文)
data.homeRecentMatches[].awayTeam.nameShortEnstring球队短名称(英文)
data.homeRecentMatches[].awayTeam.nameZhstring球队名称(中文)
data.homeRecentMatches[].awayTeam.nameShortZhstring球队短名称(中文)
data.homeRecentMatches[].awayTeam.nameZhtstring球队名称(繁体中文)
data.homeRecentMatches[].awayTeam.nameShortZhtstring球队短名称(繁体中文)
data.homeRecentMatches[].awayTeam.countryIdstring国家ID
data.homeRecentMatches[].awayTeam.foundedstring成立时间
data.homeRecentMatches[].awayTeam.venueIdint32球场ID
data.homeRecentMatches[].awayTeam.imagestring球队图片
data.homeRecentMatches[].awayTeam.coachIdint32教练ID
data.homeRecentMatches[].homeScorestring主队比分
data.homeRecentMatches[].awayScorestring客队比分
data.homeRecentMatches[].statusint32比赛状态
data.awayRecentMatchesarray客队近期比赛
data.awayRecentMatches[].matchIdint32比赛ID
data.awayRecentMatches[].timeint32比赛时间
data.awayRecentMatches[].leagueobject联赛数据
data.awayRecentMatches[].league.leagueIdint32联赛ID
data.awayRecentMatches[].league.nameEnstring联赛名称(英文)
data.awayRecentMatches[].league.nameShortEnstring联赛短名称(英文)
data.awayRecentMatches[].league.nameZhstring联赛名称(中文)
data.awayRecentMatches[].league.nameShortZhstring联赛短名称(中文)
data.awayRecentMatches[].league.nameZhtstring联赛名称(繁体中文)
data.awayRecentMatches[].league.nameShortZhtstring联赛短名称(繁体中文)
data.awayRecentMatches[].league.countryIdstring国家ID
data.awayRecentMatches[].league.seasonstring当前赛季
data.awayRecentMatches[].league.dateStartstring开始时间
data.awayRecentMatches[].league.dateEndstring结束时间
data.awayRecentMatches[].league.isCupint32赛事类型:联赛0,杯赛1
data.awayRecentMatches[].league.liveLineupsint32是否有阵容
data.awayRecentMatches[].league.liveStatsint32是否有球员统计
data.awayRecentMatches[].league.imagestring联赛图片
data.awayRecentMatches[].league.colorstring颜色
data.awayRecentMatches[].homeIdint32主队ID
data.awayRecentMatches[].awayIdint32客队ID
data.awayRecentMatches[].homeTeamobject主队数据
data.awayRecentMatches[].homeTeam.teamIdint32球队ID
data.awayRecentMatches[].homeTeam.typeint32类型:0俱乐部,1国家队
data.awayRecentMatches[].homeTeam.nameEnstring球队名称(英文)
data.awayRecentMatches[].homeTeam.nameShortEnstring球队短名称(英文)
data.awayRecentMatches[].homeTeam.nameZhstring球队名称(中文)
data.awayRecentMatches[].homeTeam.nameShortZhstring球队短名称(中文)
data.awayRecentMatches[].homeTeam.nameZhtstring球队名称(繁体中文)
data.awayRecentMatches[].homeTeam.nameShortZhtstring球队短名称(繁体中文)
data.awayRecentMatches[].homeTeam.countryIdstring国家ID
data.awayRecentMatches[].homeTeam.foundedstring成立时间
data.awayRecentMatches[].homeTeam.venueIdint32球场ID
data.awayRecentMatches[].homeTeam.imagestring球队图片
data.awayRecentMatches[].homeTeam.coachIdint32教练ID
data.awayRecentMatches[].awayTeamobject客队数据
data.awayRecentMatches[].awayTeam.teamIdint32球队ID
data.awayRecentMatches[].awayTeam.typeint32类型:0俱乐部,1国家队
data.awayRecentMatches[].awayTeam.nameEnstring球队名称(英文)
data.awayRecentMatches[].awayTeam.nameShortEnstring球队短名称(英文)
data.awayRecentMatches[].awayTeam.nameZhstring球队名称(中文)
data.awayRecentMatches[].awayTeam.nameShortZhstring球队短名称(中文)
data.awayRecentMatches[].awayTeam.nameZhtstring球队名称(繁体中文)
data.awayRecentMatches[].awayTeam.nameShortZhtstring球队短名称(繁体中文)
data.awayRecentMatches[].awayTeam.countryIdstring国家ID
data.awayRecentMatches[].awayTeam.foundedstring成立时间
data.awayRecentMatches[].awayTeam.venueIdint32球场ID
data.awayRecentMatches[].awayTeam.imagestring球队图片
data.awayRecentMatches[].awayTeam.coachIdint32教练ID
data.awayRecentMatches[].homeScorestring主队比分
data.awayRecentMatches[].awayScorestring客队比分
data.awayRecentMatches[].statusint32比赛状态
data.statsobject统计对比
data.stats.homeWinsint32主队胜
data.stats.drawsint32平局
data.stats.awayWinsint32客队胜
data.stats.homeGoalsint32主队进球
data.stats.awayGoalsint32客队进球
data.stats.totalMatchesint32场次

响应结构示例

下面的值仅展示字段类型,不是实时数据或真实调用结果。动态 map 的键取决于实际返回,不编造固定字段。

展开完整 JSON 结构
{
  "success": false,
  "code": "示例字符串",
  "message": "示例字符串",
  "data": {
    "matchId": 0,
    "homeId": 0,
    "awayId": 0,
    "homeTeam": {
      "teamId": 0,
      "type": 0,
      "nameEn": "示例字符串",
      "nameShortEn": "示例字符串",
      "nameZh": "示例字符串",
      "nameShortZh": "示例字符串",
      "nameZht": "示例字符串",
      "nameShortZht": "示例字符串",
      "countryId": "示例字符串",
      "founded": "示例字符串",
      "venueId": 0,
      "image": "示例字符串",
      "coachId": 0
    },
    "awayTeam": {
      "teamId": 0,
      "type": 0,
      "nameEn": "示例字符串",
      "nameShortEn": "示例字符串",
      "nameZh": "示例字符串",
      "nameShortZh": "示例字符串",
      "nameZht": "示例字符串",
      "nameShortZht": "示例字符串",
      "countryId": "示例字符串",
      "founded": "示例字符串",
      "venueId": 0,
      "image": "示例字符串",
      "coachId": 0
    },
    "h2hMatches": [
      {
        "matchId": 0,
        "time": 0,
        "league": {
          "leagueId": 0,
          "nameEn": "示例字符串",
          "nameShortEn": "示例字符串",
          "nameZh": "示例字符串",
          "nameShortZh": "示例字符串",
          "nameZht": "示例字符串",
          "nameShortZht": "示例字符串",
          "countryId": "示例字符串",
          "season": "示例字符串",
          "dateStart": "示例字符串",
          "dateEnd": "示例字符串",
          "isCup": 0,
          "liveLineups": 0,
          "liveStats": 0,
          "image": "示例字符串",
          "color": "示例字符串"
        },
        "homeId": 0,
        "awayId": 0,
        "homeTeam": {
          "teamId": 0,
          "type": 0,
          "nameEn": "示例字符串",
          "nameShortEn": "示例字符串",
          "nameZh": "示例字符串",
          "nameShortZh": "示例字符串",
          "nameZht": "示例字符串",
          "nameShortZht": "示例字符串",
          "countryId": "示例字符串",
          "founded": "示例字符串",
          "venueId": 0,
          "image": "示例字符串",
          "coachId": 0
        },
        "awayTeam": {
          "teamId": 0,
          "type": 0,
          "nameEn": "示例字符串",
          "nameShortEn": "示例字符串",
          "nameZh": "示例字符串",
          "nameShortZh": "示例字符串",
          "nameZht": "示例字符串",
          "nameShortZht": "示例字符串",
          "countryId": "示例字符串",
          "founded": "示例字符串",
          "venueId": 0,
          "image": "示例字符串",
          "coachId": 0
        },
        "homeScore": "示例字符串",
        "awayScore": "示例字符串",
        "status": 0
      }
    ],
    "homeRecentMatches": [
      {
        "matchId": 0,
        "time": 0,
        "league": {
          "leagueId": 0,
          "nameEn": "示例字符串",
          "nameShortEn": "示例字符串",
          "nameZh": "示例字符串",
          "nameShortZh": "示例字符串",
          "nameZht": "示例字符串",
          "nameShortZht": "示例字符串",
          "countryId": "示例字符串",
          "season": "示例字符串",
          "dateStart": "示例字符串",
          "dateEnd": "示例字符串",
          "isCup": 0,
          "liveLineups": 0,
          "liveStats": 0,
          "image": "示例字符串",
          "color": "示例字符串"
        },
        "homeId": 0,
        "awayId": 0,
        "homeTeam": {
          "teamId": 0,
          "type": 0,
          "nameEn": "示例字符串",
          "nameShortEn": "示例字符串",
          "nameZh": "示例字符串",
          "nameShortZh": "示例字符串",
          "nameZht": "示例字符串",
          "nameShortZht": "示例字符串",
          "countryId": "示例字符串",
          "founded": "示例字符串",
          "venueId": 0,
          "image": "示例字符串",
          "coachId": 0
        },
        "awayTeam": {
          "teamId": 0,
          "type": 0,
          "nameEn": "示例字符串",
          "nameShortEn": "示例字符串",
          "nameZh": "示例字符串",
          "nameShortZh": "示例字符串",
          "nameZht": "示例字符串",
          "nameShortZht": "示例字符串",
          "countryId": "示例字符串",
          "founded": "示例字符串",
          "venueId": 0,
          "image": "示例字符串",
          "coachId": 0
        },
        "homeScore": "示例字符串",
        "awayScore": "示例字符串",
        "status": 0
      }
    ],
    "awayRecentMatches": [
      {
        "matchId": 0,
        "time": 0,
        "league": {
          "leagueId": 0,
          "nameEn": "示例字符串",
          "nameShortEn": "示例字符串",
          "nameZh": "示例字符串",
          "nameShortZh": "示例字符串",
          "nameZht": "示例字符串",
          "nameShortZht": "示例字符串",
          "countryId": "示例字符串",
          "season": "示例字符串",
          "dateStart": "示例字符串",
          "dateEnd": "示例字符串",
          "isCup": 0,
          "liveLineups": 0,
          "liveStats": 0,
          "image": "示例字符串",
          "color": "示例字符串"
        },
        "homeId": 0,
        "awayId": 0,
        "homeTeam": {
          "teamId": 0,
          "type": 0,
          "nameEn": "示例字符串",
          "nameShortEn": "示例字符串",
          "nameZh": "示例字符串",
          "nameShortZh": "示例字符串",
          "nameZht": "示例字符串",
          "nameShortZht": "示例字符串",
          "countryId": "示例字符串",
          "founded": "示例字符串",
          "venueId": 0,
          "image": "示例字符串",
          "coachId": 0
        },
        "awayTeam": {
          "teamId": 0,
          "type": 0,
          "nameEn": "示例字符串",
          "nameShortEn": "示例字符串",
          "nameZh": "示例字符串",
          "nameShortZh": "示例字符串",
          "nameZht": "示例字符串",
          "nameShortZht": "示例字符串",
          "countryId": "示例字符串",
          "founded": "示例字符串",
          "venueId": 0,
          "image": "示例字符串",
          "coachId": 0
        },
        "homeScore": "示例字符串",
        "awayScore": "示例字符串",
        "status": 0
      }
    ],
    "stats": {
      "homeWins": 0,
      "draws": 0,
      "awayWins": 0,
      "homeGoals": 0,
      "awayGoals": 0,
      "totalMatches": 0
    }
  }
}

错误处理与使用说明

  1. 先检查 HTTP 状态,再解析 JSON;网络失败或非 JSON 响应不能当作成功。
  2. 业务响应 success 为 false 时,读取 code 和 message;不要把业务错误与 HTTP 状态混为一谈。
  3. 保存原始错误码、请求时间及接口路径用于排查,日志中移除商户密钥。
  4. 按该接口的数据更新建议、账户授权和调用频率请求;日期和时间戳单位以字段说明为准。
  5. 允许字段缺失或数据为空,按接口中的稳定 ID 关联资料,不依赖数组顺序。