Pro Data

几分钟内将模型数据接入您的代码

156,421

数据点

13 个数据集共 13,507 条记录, 每条最多 148 个字段: 每个值由模型生成或人工整理, 每天从源数据重建。可在此免费浏览; 使用免费 API 密钥即可全部拉取。

48 nations1,215 players8,964 player-seasons958 match results

48支球队和104场比赛的全部概率、预测大名单、逐赛季球员生涯数据、近期战绩以及模型所用的历史数据: 以 JSON 或 CSV 格式提供, 也可作为您的 AI 助手可调用的 MCP 工具。面向研究人员、幻想联赛玩家、记者和分析团队, 让模型输出进入数据管道而非仅限网页。下面试运行一个实时端点, 只需一条命令, 无需注册。

抢先体验, 现已上线· 批量压缩包 + 历史切片已上线 · 可复现 notebook 和 WC2018/WC2022 回填输出将在开赛前推出

快速开始

现在试用: 无需注册

运行此命令。它将直接从实时模型返回最可能的五支夺冠球队: 无需账户, 无需 API 密钥。添加 ?format=csv 获取表格格式。

curl "https://onthepitch.now/api/v1/sample/"

想要完整数据: 全部48支球队、每场比赛、球员、大名单?请登录, 生成 API 密钥 (10 免费调用次数), 并将其作为 Bearer token 传入任何端点:

curl -H "Authorization: Bearer otp_live_…" \
  "https://onthepitch.now/api/v1/forecast/"

免费试用: 10 次调用

登录并 生成 API 密钥 10 免费编程调用次数, 在 REST 端点和托管 MCP 服务器之间共享: 足以将数据接入 notebook 或 AI 助手并验证效果。MCP 握手不计入次数, 仅计数据调用。Pro Pass 不限调用次数。

13 个数据集, 均可通过以下路径访问 /api/v1/ as JSON or — with ?format=csv — a flat table. /api/v1/sample/ is public; the rest are gated (a Bearer API key or a Pro session cookie). Below is exactly what each one returns. Full schemas live in the interactive reference (OpenAPI 3.0 spec at /api/v1/openapi.json).

  • Tournament forecast

    48 nations

    /api/v1/forecast/

    Each nation's probability of lifting the trophy and of reaching every stage.

    返回内容 · 17 fields Tournament-win probability · advance from group · reach R16 / QF / SF / final · win-group probability · P(finish 1st–4th in group) · confederation · FIFA rank · group

  • Team forecast trajectory

    480 snapshots

    /api/v1/team-history/

    How each team's forecast has moved over time — one row per daily build.

    返回内容 · 7 fields Team · build timestamp · Elo rating · tournament-win probability · 90% CI band (low & high)

  • Match forecast

    104 matches

    /api/v1/fixtures/

    Win / draw / win plus match-event probabilities for every fixture in the bracket.

    返回内容 · 25 fields P(home / draw / away) · expected goals each side · over 0.5 / 1.5 / 2.5 / 3.5 goals · both teams to score · clean-sheet probability each side · kickoff, venue & city · stage & group

  • Predicted squads

    1,246 players

    /api/v1/predicted-squads/

    Projected 26-man squad for every nation, one row per player.

    返回内容 · 13 fields Starting-XI vs bench slot · position · jersey number · captain flag · international caps & goals · composite rating · rank within position

  • Player index

    1,215 players

    /api/v1/players/

    Career profile for every player in the modelling pool.

    返回内容 · 9 fields Name · nation · position · current club & league · birth year · career goals & assists

  • Player season history

    8,964 player-seasons

    /api/v1/player-history/

    Season-by-season career record for every player — one row per player-season.

    返回内容 · 12 fields Player · season · team & league · position · matches & minutes · goals & assists · xG & xAG

  • Anytime scorer

    50 ranked scorers

    /api/v1/anytime-scorer/

    Tournament scoring probabilities for the most likely goalscorers.

    返回内容 · 15 fields P(scores ≥1 in the tournament) · expected matches played · per-stage scoring probability (group → final) · rank

  • Recent match results

    958 matches

    /api/v1/results/

    Every team's recent senior-international results — last 24 months, their POV.

    返回内容 · 10 fields Date · opponent · home / away / neutral · goals for & against · result · competition

  • Head-to-head records

    144 pairings

    /api/v1/h2h/

    All-time record between each nation and its group-stage opponents.

    返回内容 · 12 fields Meetings · wins / draws / losses · last-meeting date, score, tournament & winner

  • Major-tournament history

    106 tournament rows

    /api/v1/majors/

    Each nation's most-recent run at every major, with squad and coach continuity.

    返回内容 · 15 fields Tournament & year · matches · W-D-L · goals for / against · bracket finish · coach (name, year appointed, still in charge) · squad-pool continuity · ?tournament=&year= slicing

  • Group schedule

    144 team-matchdays

    /api/v1/schedule/

    Every nation's three group-stage fixtures.

    返回内容 · 7 fields Matchday · date · opponent · host city & country

  • Team list

    48 nations

    /api/v1/teams/

    The tournament field — the lookup table to join everything else on team_id.

    返回内容 · 6 fields team_id · name · confederation · FIFA rank · host flag · group

  • Bulk snapshot

    One zip · ~3–5 MB

    /api/v1/bulk/snapshot/

    Every source file the site renders from, in a single download, with checksums.

    返回内容 11 source JSONs + manifest (size, sha256 & built_at per file) · includes the deep fixture-enrichment blobs the per-endpoint variants flatten away

访问方式

除公开的 /api/v1/sample/ 预览外, 以上所有数据集均需认证。使用 Bearer API 密钥或 Pro 会话 cookie 进行认证; 数据获取的其他详情如下。

  • CSV variant on every endpoint

    已上线

    Pass ?format=csv on any endpoint for a tabular response, RFC-4180 quoted, suitable for spreadsheet or notebook import. All row types are flat — no nested JSON in CSV cells.

  • Daily refresh + provenance metadata

    已上线

    Every response carries the upstream snapshot's built_at timestamp in the envelope (JSON) or X-OnThePitch-Generated-At header (CSV). Pipeline refits daily; cache is private 1h.

  • Bulk snapshot download (zip)

    已上线

    GET /api/v1/bulk/snapshot/ returns one DEFLATE-compressed archive with the 11 source JSONs + a manifest (per-file size + sha256 + built_at). Includes the deep fixture enrichment blobs the per-endpoint variants flatten away. ~3–5 MB on the wire.

  • Historical tournament slicing

    已上线

    Pass ?tournament=&year= on /api/v1/majors/ to extract a single tournament-year — e.g. every WC2026 team's WC2022 row in one call. The dataset stores each team's most-recent appearance per tournament, so WC2022 covers most qualifiers; WC2018 only covers teams that haven't been at a WC since.

  • Long-lived API keys

    已上线

    Generate a Bearer key at /account/api-key/ and pass it as Authorization: Bearer otp_live_… on any endpoint — no cookie juggling for headless / CI / scheduled jobs. One key per account; reset it any time if it leaks.

  • MCP server — connect Claude / Cursor

    已上线

    A hosted Model Context Protocol server at /api/mcp exposes every endpoint as an MCP tool. Add it to Claude Code, Claude Desktop, or Cursor with one command and ask questions against the live model — no install, no glue code.

  • Backfilled model outputs — WC2018, WC2022

    即将推出

    Pre-tournament model probabilities for the last two World Cups, replayed against frozen inputs so you can backtest the model end-to-end against known outcomes. Requires re-pulling historical FBref / Wikipedia snapshots; tracked as a separate research initiative.

  • Reproducible notebooks

    即将推出

    Jupyter notebooks that fit the model end-to-end from the public data files and reproduce the website's outputs. Run locally with the published datasets.

示例

今天就能做的三件事

Set OTP_KEY to the API key you generate here (export OTP_KEY=otp_live_…) — one token, no cookie juggling, works the same from a shell, a notebook, or a scheduled job. (Signed in already? A Pro session cookie works too, but the key is the friendlier path.)

Full forecast as CSV

curl -H "Authorization: Bearer $OTP_KEY" \
  "https://onthepitch.now/api/v1/forecast/?format=csv" \
  -o forecast.csv

WC2022 historical slice

curl -H "Authorization: Bearer $OTP_KEY" \
  "https://onthepitch.now/api/v1/majors/?tournament=FIFA%20World%20Cup&year=2022" \
  -o wc2022.json

Bulk snapshot as a single zip

curl -H "Authorization: Bearer $OTP_KEY" \
  "https://onthepitch.now/api/v1/bulk/snapshot/" \
  -o onthepitch-snapshot-v1.zip

基于数据构建

拉取快照, 拟合您自己的模型

批量压缩包包含公开站点渲染所用的全部数据: 预测、赛程、预测大名单、历史交锋、国际大赛历史记录。三个入门方案, 帮助您将数据导入 notebook 并运行自己的分析。

1 · 将快照加载到 pandas

拉取压缩包, 解压一次, 然后将每个文件读取为 DataFrame。预测信封每支球队嵌套一行: 使用以下方法展平 pd.json_normalize.

import io, json, os, zipfile, requests, pandas as pd

z = zipfile.ZipFile(io.BytesIO(requests.get(
    "https://onthepitch.now/api/v1/bulk/snapshot/",
    headers={"Authorization": f"Bearer {os.environ['OTP_KEY']}"},
).content))

forecast = pd.json_normalize(
    json.loads(z.read("data.json"))["teams"],
)
fixtures = pd.json_normalize(
    json.loads(z.read("fixtures.json"))["fixtures"],
)
squads = pd.json_normalize(
    json.loads(z.read("predicted_squads.json"))["squads"],
    record_path="players",
    meta=["team_id"],
)

2 · 拟合基准胜负概率模型

基于预测大名单和球队预测数据构建您自己的主/平/客模型。综合评分加上阵容实力总和是合理的初始特征集; 与已发布的概率进行比较, 观察您的模型在哪些方面一致或存在分歧。

from sklearn.linear_model import LogisticRegression

# Aggregate predicted-XI composite to a team strength score.
xi = squads.query("slot == 'xi'")
strength = xi.groupby("team_id")["composite"].sum().rename("strength")

# Join strength onto fixtures and fit a logistic on prior tournament
# results (intl_majors.json has W/D/L from previous WCs + qualifiers).
intl = pd.json_normalize(
    json.loads(z.read("intl_majors.json"))["rows"],
)
features = intl.merge(strength, left_on="team_id", right_index=True)
X = features[["strength", "fifa_rank"]]
y = (features["finish"] >= 9).astype(int)  # 1 = quarter-final or better

clf = LogisticRegression().fit(X, y)
print(clf.coef_)

3 · 将您的模型与已发布的预测进行校准对比

一旦您的模型产出了球队级别的夺冠概率, 通过 Brier score 和可靠性图与我们的概率进行比较: 与方法论文档中使用的指标相同。

from sklearn.metrics import brier_score_loss

merged = forecast.merge(
    pd.Series(my_probs, name="my_p_win"),
    left_on="team_id", right_index=True,
)
print("OnThePitch Brier:", brier_score_loss(merged["won"], merged["p_win"]))
print("Yours        Brier:", brier_score_loss(merged["won"], merged["my_p_win"]))

Pass 许可为研究用途: 拟合、回测、发布您的研究成果。注明来源为 方法论文档 。我们欢迎但不强制要求。

AI 代理

连接 Claude、Cursor 或任何 MCP 客户端

托管的 Model Context Protocol 服务器位于 /api/mcp 将每个端点暴露为 MCP 工具, 您可以直接在 AI 助手中查询实时模型数据: 无需安装, 无需编写胶水代码。使用 API 密钥 进行认证, 任何已登录账户均可生成, 前 10 次工具调用免费。

添加到 Claude Code

claude mcp add --transport http onthepitch \
  https://onthepitch.now/api/mcp \
  --header "Authorization: Bearer otp_live_…"

Then prompt naturally — “which team is most likely to win the group?”, “compare the projected XIs for France and England”, “how did Brazil do at WC2022?” — and the assistant calls the matching tool (get_forecast, get_predicted_squads, get_majors) and answers from the live data.

Pro Pass

获取 Pro Pass 享受不限量访问

每个账户均可获得 10 次免费调用试用 API + MCP。Pro Pass 为一次性购买, $35, 享受不限量访问: Standard Pass 的全部权益加上数据端点、批量压缩包下载和历史赛事切片。可复现 notebook 将在开赛前上线。已持有 Standard Pass?$20 差价升级。

24h self-service refund·No subscription, no auto-renewal·Access through 31 Dec 2026. See refund policy.