PitchAPIDocumentationAdvanced analytics

Advanced analytics API

The numbers behind the performance: per-match team and player rollups, and the passing network that produced them.

The advanced endpoints return typed numbers rather than display strings. GET /v1/matches/{id}/advanced gives one match's team rollups — possession value, passing, carrying, creation, defending, territory, tempo and goalkeeping — and the player endpoints return the same shape per player.

GET /v1/matches/{id}/advanced/network returns the passing network: who passed to whom, how often, and the value each connection carried. Pass networks are why the coordinates in this API are metres on a real pitch: distances, angles and progressive passes all come from the same frame.

A match that has not been rated answers 404 ANALYTICS_UNAVAILABLE, deliberately distinct from RESOURCE_NOT_FOUND. A rate with an empty denominator is null, never zero, and the metric catalogue documents each case. Heatmaps are on the match page, not here, because they are a count grid rather than a rollup.

API reference

Endpoints

Every request takes an X-API-KEY header and returns the JSON envelope described on the overview.

GET/v1/matches/{id}/advanced

Retrieve advanced team analytics

Team-level analytics derived from the raw event feed: possession value, passing, carrying, creation, defending, territory, and tempo. Exactly two objects, home first. Returns ANALYTICS_UNAVAILABLE for a match we hold but never rated.

Auth API keyResponse JSON
idstringrequired

Match ID, for example m_B8x2K9

curl https://api.pitchapi.dev/v1/matches/{id}/advanced \
  -H "X-API-KEY: $PITCH_KEY"
GET/v1/matches/{id}/advanced/players

List advanced player analytics

The same groups per player, minus the members that only exist for a team. Sorted by possession value descending, falling back to actions. goalkeeping is null for outfield players.

Auth API keyResponse JSON
idstringrequired

Match ID, for example m_B8x2K9

curl https://api.pitchapi.dev/v1/matches/{id}/advanced/players \
  -H "X-API-KEY: $PITCH_KEY"
GET/v1/matches/{id}/advanced/players/{player_id}

Retrieve one player's advanced analytics

The same player object as the list endpoint, unwrapped. The example below is a goalkeeper, so it carries the goalkeeping group; the passing, carrying, creation and defending groups are shortened here and hold exactly the fields shown in the list endpoint above. A player who took no part in a match we did rate returns RESOURCE_NOT_FOUND, which is distinct from ANALYTICS_UNAVAILABLE for a match that was never rated.

Auth API keyResponse JSON
idstringrequired

Match ID, for example m_B8x2K9

player_idstringrequired

Player ID, for example p_7YtX4q

curl https://api.pitchapi.dev/v1/matches/{id}/advanced/players/{player_id} \
  -H "X-API-KEY: $PITCH_KEY"
GET/v1/matches/{id}/advanced/network

Retrieve both teams' pass networks

The passing graph of each team as three layers: a per-team summary (window and centralization), one node per player, and one edge per ordered pair of teammates. Exactly two objects, home first. The window closes at the team's first substitution, so the numbers describe the starting eleven's circulation. Receivers are inferred, so edges can sum to less than nodes. Returns ANALYTICS_UNAVAILABLE for a match we hold but never rated.

Auth API keyResponse JSON
idstringrequired

Match ID, for example m_B8x2K9

curl https://api.pitchapi.dev/v1/matches/{id}/advanced/network \
  -H "X-API-KEY: $PITCH_KEY"
Questions

Common questions

Why does an existing match return ANALYTICS_UNAVAILABLE?
The match exists but has not been rated yet. That is a different condition from a missing match, which returns RESOURCE_NOT_FOUND, so a client can retry later instead of treating the ID as wrong.
Where are the metric definitions?
The metrics page documents all 88, each with its response path, published definition and null semantics. Every value here belongs to one of those entries.
Something missing or wrong? That is a bug in the docs.Get a free key
On this page