GET /v1/matches/{id}/events returns the timeline: goals, cards, substitutions and penalties, in order, with the minute and the players involved. It is the endpoint for a match report, a commentary feed or a timeline widget.
Shots are deliberately not events. A shot is a data point with coordinates and a model value, and it lives on the shots endpoint; this one is the story around it. Building a timeline of attempts from events will not work, and building a shot map from events will not either.
The period field is derived from the minute rather than reported by the source. Treat it as a convenience around half time, not as an authority on stoppage time.
Events
The match timeline with four event types: goals, cards, substitutions, and penalties. Shots are not here — use the shots endpoint for shot data and this one for the narrative.
The period field is derived from the minute, not reported by upstream. Treat it as a convenience around half time.
| goal | A goal, with the running score and own-goal / penalty flags. |
| substitution | A substitution. player comes off, sub_in_player comes on. |
| yellowcard | A yellow card. |
| redcard | A red card (straight red or second yellow). |
Endpoint
Every request takes an X-API-KEY header and returns the JSON envelope described on the overview.
List events
Goals, cards, subs, and penalties in order, each with the running score at that moment. `period` is inferred from the minute, not reported by upstream, so treat it as a convenience.
idstringrequiredMatch ID, for example m_B8x2K9
curl https://api.pitchapi.dev/v1/matches/{id}/events \
-H "X-API-KEY: $PITCH_KEY"Common questions
- Why are shots missing from the events list?
- Shots are a separate resource with their own coordinates and xG. Use
/v1/matches/{id}/shotsfor attempts and this endpoint for goals, cards, substitutions and penalties. - Is the period reliable in stoppage time?
- It is derived from the minute, so treat it as a convenience. The minute and the added time are the fields to display; the period is for grouping.