该 实时比分 API 从 SofaScore 和 FlashScore 提供足球的 JSON 数据:进行中的比赛、按日期的赛程、比赛详情、统计数据以及进球、黄牌和换人的时间线。获取实时列表或赛程中的比赛 ID,然后加载详情。覆盖范围仅限于足球。没有投注赔率。
Zyla API Hub 列出了 超过 10,000 个公共 API。您可以按列表订阅(按月或按年,包含配额)。没有免费计划。您的 第一个 Hub API 包括 7 天免费试用(最多 50 次请求)。一级支持与提供商进行中介。未通过持续监控的列表将被取消。
用例
- 实时记分板。 轮询 SofaScore 或 FlashScore 实时列表并呈现
home、away、score和status。官方 SofaScore 示例:莫桑比克 U20 3–0 毛里求斯 U20,状态1st half,source_event_id17068223。 - 比赛中心。 将该
source_event_id传入详情、统计和事件。官方 SofaScore 详情:皇家奥维耶多 0–0 奥萨苏纳,西甲,状态Ended,事件14083104。 - 推送/编辑警报。 按
type(goal、card、substitution、period)过滤事件。同样的奥维耶多赛程打印 16 个事件,包括 90'FT时段标记和晚些时候的换人。 - 赛程规划器。 列出类别,然后是锦标赛,再按日期列出赛程。官方英超示例对于
unique_tournament_id=17在2026-09-21包括伯恩茅斯 0–1 利物浦 FC,source_event_id16363648。 - 两个数据源,一个订阅。 SofaScore ID 是整数。FlashScore ID 是字符串,例如
2DZAXwBl。不要将 SofaScore 事件 ID 传入 FlashScore 路径,反之亦然。
1. 实时板 — SofaScore
SofaScore 足球实时比赛 需要 sport=football。
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://zylalabs.com/api/13865/live+scores+api/31890/sofascore+football+live+matches?sport=football"
官方文档示例(第一场比赛,选定字段):
{
"source": "sofascore",
"count": 38,
"matches": [
{
"source": "sofascore",
"source_event_id": 17068223,
"sport": "football",
"status": "1st half",
"status_code": 6,
"start_timestamp": 1790082000,
"home": { "id": 336931, "name": "Mozambique U20", "short_name": "Mozambique U20" },
"away": { "id": 273621, "name": "Mauritius U20", "short_name": null },
"score": { "home": 3, "away": 0, "period": null },
"tournament": {
"id": 139176,
"unique_tournament_id": 23669,
"name": "COSAFA U20 Championship, Group A",
"country": "Africa"
}
}
]
}
2. 比赛中心 — 详情、统计、事件
官方文档示例事件:14083104。Hub 列表生成的 curl 有时会写 &event_id=Required;有效查询是 ?event_id=14083104。
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://zylalabs.com/api/13865/live+scores+api/31895/sofascore+match+detail+by+event+id?event_id=14083104"
SofaScore 事件 ID 的比赛详情 官方示例:
{
"source": "sofascore",
"source_event_id": 14083104,
"sport": "football",
"status": "Ended",
"status_code": 100,
"start_timestamp": 1762200000,
"home": { "id": 2851, "name": "Real Oviedo", "short_name": "Oviedo" },
"away": { "id": 2820, "name": "Osasuna", "short_name": "Osasuna" },
"score": { "home": 0, "away": 0, "period": null },
"tournament": {
"id": 36,
"unique_tournament_id": 8,
"name": "LaLiga",
"country": "Spain"
}
}
SofaScore 事件 ID 的比赛统计 在同一事件上(比赛概述,选定项目):
{
"source": "sofascore",
"source_event_id": 14083104,
"statistics": [
{
"period": "ALL",
"group": "Match overview",
"items": [
{ "name": "Ball possession", "home": "53%", "away": "47%", "key": "ballPossession" },
{ "name": "Expected goals", "home": "0.96", "away": "0.82", "key": "expectedGoals" },
{ "name": "Total shots", "home": "8", "away": "11", "key": "totalShotsOnGoal" },
{ "name": "Corner kicks", "home": "4", "away": "2", "key": "cornerKicks" }
]
}
]
}
SofaScore 事件 ID 的比赛事件 官方示例(count 16;前两行):
{
"source": "sofascore",
"source_event_id": 14083104,
"count": 16,
"incidents": [
{
"time": 90,
"added_time": 999,
"type": "period",
"text": "FT",
"home_score": 0,
"away_score": 0
},
{
"id": 125073971,
"time": 86,
"type": "substitution",
"player": null
}
]
}
该比赛以 0–0 结束,因此打印的类型是时段标记和换人,而不是进球。实时调用替换事件。
3. 按联赛的赛程 — 英超
访问 SofaScore 列表足球类别 → 按类别列出锦标赛 → 按日期和联赛列出赛程。没有“完整世界”赛程调用:您必须传递 category_id 或 unique_tournament_id。
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://zylalabs.com/api/13865/live+scores+api/31894/sofascore+fixtures+by+date+and+league?date=2026-09-21&unique_tournament_id=17"
官方文档示例(第一场比赛):
{
"source": "sofascore",
"count": 13,
"matches": [
{
"source_event_id": 16363648,
"status": "Ended",
"home": { "name": "Bournemouth" },
"away": { "name": "Liverpool FC" },
"score": { "home": 0, "away": 1 },
"tournament": {
"unique_tournament_id": 17,
"name": "Premier League",
"country": "England"
}
}
]
}
4. FlashScore 实时 — 相同的工作,不同的 ID
FlashScore 足球实时比赛 不需要 sport 查询。官方示例 count 211。进行中的一行带有分数(slug vietnam / uzbekistan):
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://zylalabs.com/api/13865/live+scores+api/31898/flashscore+football+live+matches"
{
"source": "flashscore",
"count": 211,
"matches": [
{
"source_event_id": "2DZAXwBl",
"sport": "football",
"status_code": 3,
"is_live": true,
"home": { "id": "pp1OoFY8", "short_code": "VIE", "slug": "vietnam" },
"away": { "id": "bJcArLW4", "short_code": "UZB", "slug": "uzbekistan" },
"score": { "home": 0, "away": 2 }
}
]
}
官方 FlashScore 显示名称在该转储中可以使用馈送语言环境。如果您需要稳定的拉丁键,请使用 slug / short_code。然后调用 FlashScore 比赛详情、比赛统计,或 比赛摘要,使用来自 source_event_id 的 match_id。官方摘要赛程:zs3PZaZa(15 个事件;标签在馈送语言环境中)。
此 API 不返回的内容
- 投注赔率、动量跟踪器、网球、NBA 或其他运动。
- 在两个数据源上都有效的单一 ID。SofaScore
14083104不是 FlashScorematch_id。
MCP
连接 https://mcp.zylalabs.com/mcp。get_api_info 和 call_api 需要该 API 的 Hub 列表编号(13865)和一个端点 ID(实时 SofaScore 是 31890)。这是唯一需要该编号的地方。计费仍然是 Hub 订阅加配额,而不是按调用计费。
上线
1. 注册 — 第一个 Hub API 的 7 天试用(或 50 次请求)。
2. 在 实时比分 API 页面上订阅。
3. 使用 sport=football(SofaScore)或 FlashScore 实时路径进行 GET 请求。
4. 重用 source_event_id 用于同一数据源的详情、统计和事件。
Hub 计费是按调用计费吗?
不是。Hub 计费是每个 API 的 订阅加配额。MCP call_api 使用相同的订阅。