PitchAPIDocumentationChangelog

Changelog

What changed, when, and what a caller has to do about it.

Only caller-visible changes belong here: a new endpoint, a new field, a new parameter, a changed default, a new client. Deploys and internal work do not. Newest entries come first.

If an addition is backward compatible it is still listed, because a client that validates responses strictly will notice. Removals and renames are called out explicitly with the migration.

Changelog

Changelog

Notable, caller-visible changes — new endpoints, fields, parameters and clients. Newest first.

  1. December 2, 2026

    MCP server for Claude, Cursor and VS Code

    npx -y pitchapi-mcp runs the API inside an assistant as a Model Context Protocol server. It is nine read-only tools — a league search, fixtures by date or by season, a match, its box score, its shotmap, its analytics, its lineups and the live snapshot — plus pitchapi://metrics, the metric glossary as markdown. Each tool is coarse on purpose: the model picks between a shotmap and an analytics rollup, not between sixteen endpoints it has to already understand.

    The server runs on your machine, so there is no hosted endpoint and no second authorisation: it takes the same X-API-KEYand calls the same routes. Every payload is trimmed on the way through — a live snapshot goes from about 50 kB to under 3 kB once the per-player stat lines and the duplicate lineup object are gone — and nothing is recalculated, so the numbers are the pipeline’s.

    Claude Desktop, Cursor and VS Code
    {
      "mcpServers": {
        "pitchapi": {
          "command": "npx",
          "args": ["-y", "pitchapi-mcp"],
          "env": { "PITCHAPI_API_KEY": "pk_live_..." }
        }
      }
    }

    Included with Pro and Data. A request from the server on a free key answers 403 PLAN_UPGRADE_REQUIRED naming the feature, on the first call rather than at the model. It is listed in the official MCP registry as dev.pitchapi/mcp. The raw event feed and the heatmaps are deliberately not exposed: both are large, and a finished match has no minute-by-minute timeline for the model to read anyway.

  2. November 29, 2026

    Live streaming and analytics exports

    GET /v1/matches/{id}/live/stream pushes the live snapshot as Server-Sent Events, on the Pro and Data plans. Each frame is the complete document, the first one arrives immediately, and the stream ends with an end event once the match is finished. One poll per match serves every subscriber, so opening a stream costs one request against the live allowance and its frames cost nothing. The key travels in X-API-KEY like every other route, which means server-side clients and curl -Nrather than a browser’s EventSource.

    Live stream
    # Live snapshots as Server-Sent Events (Pro)
    curl -N https://api.pitchapi.dev/v1/matches/m_B8x2K9/live/stream   -H "X-API-KEY: $PITCH_KEY"
    
    # event: snapshot   the full document, again on every change
    # : keepalive       every 15s, ignore it
    # event: end        the match reached a final state

    Bulk exports also grew from eight datasets to sixteen: the advanced analytics (advanced_teams, advanced_players), player_halves, momentum, heatmaps and the three pass_network_* tables are now downloadable as NDJSON or Parquet under the same filters. The metrics the API serves are no longer the one thing a warehouse could not have.

  3. November 14, 2026

    Live match endpoint

    GET /v1/matches/{id}/live returns a live snapshot of one match: the clock, running score, both team sheets, the current XI after substitutions and red cards, events, team stats, each half’s team stats and each player’s stat line. Poll it no faster than every 10 seconds; every response carries fetched_at, age_seconds and stale.

    Poll a live match
    # Poll a match in progress
    curl -s "https://api.pitchapi.dev/v1/matches/m_B8x2K9/live" \
      -H "X-API-KEY: $PITCH_KEY"
    
    # poll no faster than every 10s; the response reports its own freshness

    Outside the live window the stored match is returned with live: false. If fresh data cannot be fetched, the last snapshot is served with stale: true instead of an error. The route has its own allowance of 60 requests a minute per key and answers 429 with Retry-After when it is used up. The endpoint is read-only.

  4. October 24, 2026

    TypeScript SDK

    An official TypeScript client, npm install pitchapi, joins the Python one. It covers every endpoint under the same five namespaces, has no dependencies, runs anywhere with fetch, and its response types are generated from the OpenAPI description. The SDKs section now switches between the two languages.

  5. September 30, 2026

    Player stats per half

    Two new endpoints, GET /v1/matches/{id}/players/halves and GET /v1/matches/{id}/players/{player_id}/halves, return each player's stat line for the first and the second half, the way match stats already come per half for teams. Each half has the grouped shape of the match player stats, and a player lists only the halves they took part in.

    Fetch player halves
    # Every player's stats for each half
    curl -s "https://api.pitchapi.dev/v1/matches/m_B8x2K9/players/halves" \
      -H "X-API-KEY: $PITCH_KEY"
    
    # One player's halves
    curl -s "https://api.pitchapi.dev/v1/matches/m_B8x2K9/players/p_7YtX4q/halves" \
      -H "X-API-KEY: $PITCH_KEY"

    Not every stat splits. Some stats, the rating among them, are match-level only, and the halves need not add up exactly to the match line. A match without per-half stats returns HALVES_UNAVAILABLE. The existing player endpoints are unchanged.

  6. September 19, 2026

    26 leagues are back

    The 26 leagues added on September 11 — among them the Eerste Divisie, HNL, Czech 1. Liga, MLS Next Pro, the USL Championship and League One, Brasileirão Série B and the Qatar, UAE, Colombian and Peruvian top flights — were withdrawn while we rebuilt them from a new event feed. They are served again, from the 2024 seasons on, with every played match carrying lineups, events, shots with xG, team and player stats and advanced analytics.

    Ids changed. Matches of these leagues, and the teams and players that appear only in them, have new ids. An id stored between September 11 and the withdrawal now answers 404; look the match up again by date or league. Clubs and players that also play in the other 44 leagues keep the ids they had.

    What differs from the other leagues:

    • /momentum returns an empty points array.
    • Player stat lines carry no rating.
    • Lineups are confirmed ones only, published about 30 minutes before kickoff; there is no predicted lineup.
    • Many teams and players have no image yet.
    • For Latvia's Virsliga and Venezuela's Primera División, match and player stats are derived from the match events, and the few that events cannot reproduce (big chances, chances created) are left out.
  7. September 6, 2026

    Heatmaps: choose the frame, and read the side

    Heatmap cells are stored with every team attacking towards cell_x 15 in its own frame. That is right for a player — it is what lets you compare them home and away — but it means the two grids are not on a shared pitch, and plotting them together drew one side backwards with nothing obviously wrong.

    ?frame=home_ltr now returns both teams on one pitch, the away side already turned. The default, acting_ltr, is unchanged, so existing calls return exactly what they did before; grid.frame echoes whichever you got.

    Pick a frame
    # Each team in its own attacking frame (the default).
    # Good for a player: they read the same way home and away.
    curl -s "https://api.pitchapi.dev/v1/matches/m_B8x2K9/heatmaps" \
      -H "X-API-KEY: $PITCH_KEY"
    
    # Both teams on one pitch, for a match view.
    # The away side is turned server-side; nothing to mirror yourself.
    curl -s "https://api.pitchapi.dev/v1/matches/m_B8x2K9/heatmaps?frame=home_ltr" \
      -H "X-API-KEY: $PITCH_KEY"

    Every team and player also carries side, "home" or "away", so a single grid can be oriented without a second call.

  8. September 5, 2026

    Team and player heatmaps

    A new endpoint, GET /v1/matches/{id}/heatmaps, returns where each side and each player acted, binned onto a 16 x 12 grid of the pitch. Two team grids, home first, then one grid per player who touched the ball, busiest first.

    Cells are sparse [cell_x, cell_y, actions] triples: a cell with no activity is absent rather than zero, which is most of the 192. Read grid.frame before plotting — in acting_ltr, cell_x0 is the acting team's own goal line and 15 the opponent's, for both teams and in both halves, so a client that assumes cell_x 0 is the left touchline draws one side mirrored.

    Fetch match heatmaps
    # Team and player heatmaps for a match
    curl -s "https://api.pitchapi.dev/v1/matches/m_B8x2K9/heatmaps" \
      -H "X-API-KEY: $PITCH_KEY"
    
    # cells are sparse [cell_x, cell_y, actions] triples on a 16 x 12 grid:
    #   [[3, 6, 14], [4, 6, 11]]  -> 14 actions in cell (3,6), 11 in cell (4,6)
    #   a cell with no activity is absent, not zero

    Match level only. There is no season or cross-match aggregate behind this, and actionsis a raw count rather than per-90 — a substitute's grid is thinner than a starter's for reasons that are about minutes, not involvement.

  9. August 31, 2026

    Predicted lineups for upcoming matches

    The lineups endpoint now answers before a match is played. For a fixture kicking off within 48 hours, GET /v1/matches/{id}/lineups returns each side's predicted lineup — formation, starting eleven, bench, and coach — instead of an empty result.

    Every side now carries a confirmed boolean. false marks a prediction (with a lineup_type such as "lastStarting11"); it flips to true when the confirmed lineup is published near kickoff, and stays the actual lineup once the match is played. The match ID is stable throughout, so the same request follows a lineup from prediction to result.

    Fetch a predicted lineup
    # Predicted lineup for an upcoming match
    curl -s "https://api.pitchapi.dev/v1/matches/m_9Xk2Qv/lineups" \
      -H "X-API-KEY: $PITCH_KEY"
    
    # each side carries a "confirmed" flag:
    #   "confirmed": false  -> predicted lineup (up to 48h before kickoff)
    #   "confirmed": true   -> confirmed lineup near kickoff, or the actual lineup once played

    Backward compatible. Played matches are unchanged, and confirmed reads true for every lineup returned before this change.

  10. August 31, 2026

    Upcoming fixtures and schedules

    You can now read matches before they are played. The date listing and the league-matches listing accept a status filter:

    • played — the default, settled results only.
    • upcoming — fixtures not yet played. These carry status: "not_started" and a null score until the match is played.
    • all — both together.

    Fixtures cover the whole current season for every league in the catalogue, and their kickoff times are kept in sync daily — a match the source reschedules updates in place. Once a match is played it fills in with the full result and analytics, so a match ID is stable from fixture to result.

    Fetch upcoming fixtures
    # Today's upcoming fixtures
    curl -s "https://api.pitchapi.dev/v1/date/$(date -u +%Y-%m-%d)?status=upcoming" \
      -H "X-API-KEY: $PITCH_KEY"
    
    # Upcoming fixtures for a league
    curl -s "https://api.pitchapi.dev/v1/leagues/l_3v84VE/matches?status=upcoming" \
      -H "X-API-KEY: $PITCH_KEY"

    Backward compatible. The default is played, so a request that omits status returns exactly what it returned before. Opt in only where you want the fixtures.

Something missing or wrong? That is a bug in the docs.Get a free key
On this page