Lineups
The lineups
include allows you to retrieve information about the different players in the lineup for each team in a fixture. This includes, the players name, their jersey number, their positition on the field and much more.
How to use this include
You can use the lineups
include by adding the &include=
parameter to your request and setting it to lineups
. For a GET Fixture by ID request, that would look like this:
How does it work?
The lineups
include provides detailed information about a player's participation in a specific fixture.
id: The unique identifier for the lineup entry.
sport_id: The identifier indicating the sport type. In this case, "1" represents football.
fixture_id: The unique identifier for the fixture (i.e., match) associated with this lineup.
player_id: The unique identifier for the player.
team_id: The unique identifier for the team to which the player belongs.
position_id: The unique identifier representing the player's position in the lineup.
formation_field: This field is nullable and typically represents additional information about the player's position within the formation. It might be null if not applicable.
type_id: The unique identifier representing the type of participation.
formation_position: This field is nullable and might contain additional information about the player's position within the formation if applicable.
player_name: The name of the player.
jersey_number: The jersey number worn by the player during the match.
Determining the starting lineup
To determine the starting lineup, you would have to look at the "type_id"
field in the response. Type ID 11 refers to a player starting the match and type ID 12 refers to a player being on the bench for that match. In the response below, you can check that Aaron Ramsdale was benched for that match and William Saliba started in that particular fixture.
Determining the player's position
To determine the position the player plays in for that fixture you need to look at the "formation_field"
field in the response. This field will show you a number between 1 and 12. This number refers to the position in relation the the formation of the team. The formation numbers start at the defence on the right and go to the left from there. After that, the numbers will continue to the midfielders, also from the right to the left. Last but not least, the numbers for the attackers will continue from right to left. You can find more information about this in the following tutorial:
Other include options
In addition to the lineups
include, you can use nested includes to retrieve even more detailed data. You can find more information about our nested includes on this page. The following includes are used the most for lineups
:
lineups.details.type
gives the statistics for each player in the lineup. You can find more information on this page: Player Fixture statistics.lineups.position
gives the general position the player usually plays in (e.g. Goalkeeper, Defender, Midfielder, Attacker).lineups.player
gives additional information about each player.lineups.type
gives information about whether the player is in the starting lineup or on the bench.
Last updated