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.
Endpoints
Every request takes an X-API-KEY header and returns the JSON envelope described on the overview.
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.
idstringrequiredMatch ID, for example m_B8x2K9
curl https://api.pitchapi.dev/v1/matches/{id}/live \
-H "X-API-KEY: $PITCH_KEY"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.
idstringrequiredMatch ID, for example m_B8x2K9
curl https://api.pitchapi.dev/v1/matches/{id}/live/stream \
-H "X-API-KEY: $PITCH_KEY"Common questions
- When should I start and stop polling?
- Start once
statusisstarted, and stop whenliveis false andstatusisfinished. 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-Afterseconds, then resume at the normal cadence. The limit is separate from the key's overall request rate and applies only to the live route.