Lineups
What does the include do?
The lineups include allows you to retrieve comprehensive information about the players who participated in a fixture, including starting eleven, substitutes, formations, jersey numbers, and positions on the field. This is essential for displaying team sheets, analysing tactical formations, and tracking player participation.
Why use lineups?
The lineups include is crucial for:
Team sheet displays: Show starting XIs and substitutes
Formation visualisation: Display tactical formations (4-4-2, 4-3-3, etc.)
Player participation tracking: See who played and in what position
Tactical analysis: Analyse team formations and player positioning
Statistics context: Understand player roles for performance analysis
Fantasy football: Track player appearances and positions
Requesting lineups
To retrieve lineup information for a fixture, use the following include:
https://api.sportmonks.com/v3/football/fixtures/{fixture_id}
?api_token=YOUR_TOKEN&include=lineupsExample: Get lineups for a fixture (fixture ID: 18535517)
https://api.sportmonks.com/v3/football/fixtures/18535517
?api_token=YOUR_TOKEN&include=lineupsResponse structure
When you include lineups in your request, you'll receive an array of lineup objects for all players:
Field descriptions
id
integer
Unique identifier for this lineup entry
sport_id
integer
Sport type identifier (1 = football)
fixture_id
integer
Associated fixture ID
player_id
integer
Unique player identifier
team_id
integer
Team identifier
position_id
integer
Player's position type (use nested include for details)
formation_field
string/null
Player's position in formation (1-12), null if not in starting XI
type_id
integer
Player participation type (see below)
formation_position
integer/null
Additional formation position data
player_name
string
Player's name
jersey_number
integer
Jersey number worn in match
Type IDs - Player participation
11
Starting player (in the starting XI)
12
Substitute (on the bench)
Filter starters only:
Formation field numbering (1-12)
The formation_field represents a player's position in the formation, numbered 1-12. This field is null for players not in the starting XI.
The formation numbers follow a sequential pattern:
Formation starts at the defence on the right and goes to the left
Numbers then continue to the midfielders, also from right to left
Finally, numbers continue to the attackers from right to left
Position 12 (or sometimes 1 depending on data source) is the goalkeeper
Example: 4-4-2 Formation

Example: 4-3-3 Formation

Important: Always use formation_field for positioning, not player position IDs. The numbering may vary between matches and data sources.
Position IDs and nested includes
To get detailed position information, use nested includes rather than relying on position_id values:
General positions (use nested include):
Returns: Goalkeeper, Defender, Midfielder, Attacker
Detailed positions (use nested include):
Returns: Specific positions like Left Back, Center Forward, Defensive Midfielder, etc.
Nested includes
lineups.details.type
Get detailed statistics for each player's performance:
This returns player fixture statistics (shots, passes, tackles, etc.).
lineups.position
Get general position information:
Returns position data (Goalkeeper, Defender, Midfielder, Attacker).
lineups.player
Get complete player information:
Returns full player profile including country, height, weight, birth date.
lineups.type
Get participation type information:
Returns whether player is in starting lineup or on bench.
lineups.detailedPosition
Get specific position information:
Returns detailed position (Left Back, Center Forward, etc.).
Code examples
Python example
JavaScript example
Best practices
Always use type_id to filter: Use type_id 11 for starters and type_id 12 for substitutes.
Check formation_field before using: formation_field is null for bench players. Always validate.
Sort by formation_field: When displaying starting XI, sort by formation_field for positional order.
Use nested includes for position data: Always use
lineups.positionorlineups.detailedPositionfor reliable position information rather than hardcoding position IDs.Use nested includes for complete data: Include
lineups.playerto get full player data in one request.Cache completed matches: Lineups don't change after a match ends.
Always show jersey numbers: Jersey numbers are important for display and identification.
Handle null values gracefully: formation_field, formation_position, and other fields may be null. Always validate.
Related includes
Events - Cross-reference substitution events with lineup changes
Formations - Get team formation strings (4-4-2, 4-3-3, etc.)
Statistics - Get player performance statistics via
lineups.details.typeParticipants - Get team and player relationship data
Summary
The lineups include provides comprehensive player participation data including starting XIs, substitutes, formations, jersey numbers, and field positions. With type_id filtering (11 = starters, 12 = substitutes) and formation_field positioning (1-12 sequential formation positions), it enables building team sheets, formation visualisations, and tactical analysis. Always use nested includes like lineups.player and lineups.position for complete player information and reliable position data in a single API call.
Last updated
Was this helpful?