PitchAPIDocumentationLive

Live football API

One endpoint to poll, one stream to subscribe to, and a freshness block that tells you exactly how old the data is.

Polling is the default way to follow a match in play. GET /v1/matches/{id}/live returns a snapshot of the clock, the running score, both team sheets after substitutions and red cards, the events, the team stats and each player's line so far. Outside the live window the stored match comes back with live: false.

Every response reports its own freshness: fetched_at is when the snapshot was taken, age_seconds how old it is, and stale is true when a fresher snapshot is being fetched. A stale snapshot is still usable and never needs a retry.

The stream is the alternative: one request opens a server-sent event connection and each frame is the complete document, not a patch. It is available on Pro and Data. Poll the snapshot no faster than every 10 seconds — a tenth of the 60 live requests a minute a free key allows.

API reference

Endpoints

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

GET/v1/matches/{id}/live

Poll a live match

A live snapshot of one match: the clock, running score, both team sheets, the current XI after substitutions and red cards, events, team stats from possession and shots to pressing and duels, the team stats of each half, and each player's stat line so far. 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 endpoint is read-only: it never writes to the database.

Auth API keyResponse JSON
idstringrequired

Match ID, for example m_B8x2K9

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

Subscribe to a live match

Pro plan. The same document as the live snapshot, pushed as Server-Sent Events whenever it changes instead of polled: one `snapshot` event per change, each one complete rather than a delta, and an `end` event when the match reaches a final state.

Auth API keyResponse JSON
idstringrequired

Match ID, for example m_B8x2K9

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

Common questions

When should I start and stop polling?
Start once status is started, and stop when live is false and status is finished. Before kickoff and after full time the endpoint only returns the stored match, so polling gains nothing.
What does a 429 on the live endpoint mean?
The live allowance for that key is used up. Wait for Retry-After seconds, then resume at the normal cadence. The limit is separate from the key's overall request rate and applies only to the live route.
Something missing or wrong? That is a bug in the docs.Get a free key
On this page