GET /v1/matches/{id}/lineups returns both sides: the formation, the starting XI, the bench, the coach and each player's shirt number. It answers before kickoff as well as after, which is why every side carries a confirmed flag.
A predicted lineup is published up to about 48 hours before kickoff. confirmed: false means the sheet is a prediction, and lineup_type names it. Near kickoff the confirmed sheet replaces it and the flag flips; once the match is played the same endpoint returns the actual lineup.
Lineup pitch coordinates are normalised 0 to 1, unlike shot coordinates, which are metres. position_id also means different things for starters and substitutes. Both are documented in the field table below because both are the kind of detail a client gets wrong once and then remembers.
Lineups
Formations, starters, and benches for both sides. Two fields trip people up: pitch coordinates (normalised 0 to 1, not metres) and position_id (different meaning for starters versus substitutes).
formation- Formation at kick-off (e.g. 4-2-3-1).
confirmed- False while the lineup is a pre-match prediction (available up to 48h before kickoff), true once confirmed near kickoff and for the actual lineup of a played match.
lineup_type- Label for a predicted lineup (e.g. lastStarting11). Omitted once the lineup is confirmed.
pitch_x / pitch_y0 to 1- Position in the formation, normalised to 0 to 1. Both are 0 for every substitute.
position_id- For a starter, a slot in the formation grid. For a substitute, a positional category: 0 goalkeeper, 1 defender, 2 midfielder, 3 attacker, -1 unclassified.
is_captain- Whether the player was captain at kick-off.
coach- The coach (name). Omitted when unavailable.
Endpoint
Every request takes an X-API-KEY header and returns the JSON envelope described on the overview.
Retrieve lineups
Formations, starters, and benches for both sides. Starters carry normalised coordinates for drawing the formation; subs are always zero. For a fixture that has not kicked off the sides may still be a pre-match prediction, so check `confirmed` before trusting the XI; `lineup_type` names the prediction and is omitted once the lineup is confirmed.
idstringrequiredMatch ID, for example m_B8x2K9
curl https://api.pitchapi.dev/v1/matches/{id}/lineups \
-H "X-API-KEY: $PITCH_KEY"Common questions
- How do I know a lineup is official?
- Check
confirmedon the side. False means a prediction; true means the sheet published near kickoff or the actual lineup after the match. Do not infer it from the time alone. - Why are lineup coordinates 0 to 1?
- Lineups describe a position on a schematic pitch, so they are normalised. Shots and advanced analytics use metres on a 105 x 68 pitch. Mixing the two is the most common coordinate mistake.