Skip to main content
GET
/
athletes
/
games
/
lineups
Athlete Game Lineups
curl --request GET \
  --url https://v1.football.sportsapipro.com/athletes/games/lineups \
  --header 'x-api-key: <api-key>'
{
  "members": [
    {
      "status": 123,
      "statusText": "<string>",
      "position": {},
      "formation": {},
      "yardFormation": {
        "line": 123,
        "fieldPosition": 123,
        "fieldLine": 123,
        "fieldSide": 123
      },
      "ranking": 123,
      "hasHighestRanking": true,
      "hasStats": true,
      "stats": "<array>",
      "heatMap": "<string>",
      "hasShotChart": true,
      "athleteId": 123,
      "name": "<string>",
      "shortName": "<string>",
      "jerseyNumber": 123
    }
  ],
  "statsCategories": "<array>",
  "chartEvents": {},
  "sports": "<array>",
  "countries": "<array>",
  "competitions": "<array>",
  "competitors": "<array>",
  "games": "<array>"
}

Athlete Game Lineups

Retrieve comprehensive lineup information, statistics, heat maps, and shot chart data for a specific athlete’s performance in a particular game.

Endpoint

GET /athletes/games/lineups

Parameters

ParameterTypeRequiredDefaultDescription
athleteIdnumberYes-The unique identifier of the athlete
gameIdnumberYes-The unique identifier of the game
appTypeIdnumberNo5Application type identifier
langIdnumberNo1Language ID (1 = English)
timezoneNamestringNoAuto-resolvedTimezone for date/time values (auto-resolved, or specify e.g., America/New_York)
userCountryIdnumberNo65User’s country ID
All startTime fields in game data use ISO 8601 format with a dynamic timezone offset based on the resolved or specified timezone.

Example Request

curl -X GET "https://v1.football.sportsapipro.com/athletes/games/lineups?athleteId=80392&gameId=4609054" \
  -H "x-api-key: YOUR_API_KEY"
const response = await fetch(
  'https://v1.football.sportsapipro.com/athletes/games/lineups?athleteId=80392&gameId=4609054',
  {
    headers: {
      'x-api-key': 'YOUR_API_KEY'
    }
  }
);
const data = await response.json();

Response Structure

{
  "members": [
    {
      "status": 1,
      "statusText": "Starting",
      "position": {
        "id": 2,
        "name": "Defender"
      },
      "formation": {
        "id": 5,
        "name": "Centre Back",
        "shortName": "Centre Back"
      },
      "yardFormation": {
        "line": 2,
        "fieldPosition": 3,
        "fieldLine": 25,
        "fieldSide": 50
      },
      "ranking": 5.7,
      "hasHighestRanking": true,
      "hasStats": true,
      "stats": [...],
      "heatMap": "https://v1.football.sportsapipro.com/images/heatmaps/...",
      "competitorNum": 2,
      "hasShotChart": true,
      "id": 50800163,
      "athleteId": 80392,
      "name": "Maxence Lacroix",
      "shortName": "Lacroix",
      "jerseyNumber": 5,
      "nameForURL": "maxence-lacroix",
      "imageVersion": 27
    }
  ],
  "statsCategories": [...],
  "chartEvents": {...},
  "sports": [...],
  "countries": [...],
  "competitions": [...],
  "competitors": [...],
  "games": [...]
}

Response Fields

Member Object

FieldTypeDescription
statusnumberPlayer status (1 = Starting, 2 = Substitute, etc.)
statusTextstringHuman-readable status (“Starting”, “Substitute”)
positionobjectPlayer’s general position (Goalkeeper, Defender, Midfielder, Forward)
formationobjectSpecific formation role (e.g., Centre Back, Left Back, etc.)
yardFormationobjectField positioning data (see below)
rankingnumberPlayer’s match rating (1.0 - 10.0 scale)
hasHighestRankingbooleanWhether player has highest rating on team
hasStatsbooleanWhether detailed stats are available
statsarrayArray of performance statistics
heatMapstringURL to player’s heat map image (proxied through branded domain)
hasShotChartbooleanWhether shot chart data is available
athleteIdnumberUnique athlete identifier
namestringFull player name
shortNamestringShort/display name
jerseyNumbernumberPlayer’s shirt number
nameForURLstringURL-friendly name slug

Formation vs YardFormation (Important Distinction)

The API provides two positioning fields with different purposes:
FieldPurposeAccuracy
formationGeneral role label (e.g., “Left Back”, “Centre Back”)Generalized - may group similar positions
yardFormationPrecise field coordinatesAuthoritative - use this for accurate positioning
Note: The formation.name field represents a generalized tactical role and may show the same label for players in adjacent positions. For precise positioning (e.g., distinguishing a Left Back from a Left Centre Back), always use the yardFormation data.

Formation Object

The formation object provides a labeled tactical role:
FieldTypeDescription
idnumberFormation position ID (see table below)
namestringFull position name
shortNamestringAbbreviated position name

Formation ID Reference

IDNamePosition Group
1GoalkeeperGoalkeeper
2Left BackDefender
3Right BackDefender
4Left Wing BackDefender
5Centre BackDefender
6Right Wing BackDefender
7SweeperDefender
8Left MidfielderMidfielder
9Right MidfielderMidfielder
10Defensive MidfielderMidfielder
11Central MidfielderMidfielder
12Attacking MidfielderMidfielder
13Left WingerMidfielder
14Right WingerMidfielder
15Second StrikerForward
16Centre ForwardForward
17StrikerForward
18Left Centre BackDefender
19Right Centre BackDefender
20Left Defensive MidfielderMidfielder
21Right Defensive MidfielderMidfielder
22Left Central MidfielderMidfielder
23Right Central MidfielderMidfielder
24Left Attacking MidfielderMidfielder
25Right Attacking MidfielderMidfielder
Note: Formation IDs provide categorical position labels. For rendering players on a pitch diagram, use yardFormation coordinates instead.

YardFormation Object (Authoritative Field Positioning)

The yardFormation object describes the player’s exact position on a virtual pitch grid. This is the authoritative source for player positioning.
FieldTypeDescription
linenumberDefensive depth line (1 = GK, 2 = Defense, 3 = Midfield, 4 = Attack)
fieldPositionnumberPosition number within the line (1-5, ordered by horizontal position)
fieldLinenumberVertical position as percentage (0 = own goal line, 100 = opponent goal)
fieldSidenumberHorizontal position as percentage (0 = left touchline, 100 = right touchline, 50 = center)

FieldSide Values (Horizontal Position)

fieldSidePosition Description
0Left touchline (Left Back)
25-33Left-center (Left Centre Back)
50Center (Centre Back / Central Midfielder)
66-75Right-center (Right Centre Back)
100Right touchline (Right Back)

Line Values (Depth)

linePosition Group
1Goalkeeper
2Defenders
3Midfielders
4Forwards/Attackers

FieldLine Values (Vertical Position)

fieldLineTypical Position
0-10Goalkeeper area
20-35Defensive line
40-60Midfield
70-90Attacking positions
90+Striker/Forward positions
Example positions:
  • Goalkeeper: line: 1, fieldPosition: 1, fieldLine: 0, fieldSide: 50
  • Left Back: line: 2, fieldPosition: 2, fieldLine: 33, fieldSide: 0
  • Left Centre Back: line: 2, fieldPosition: 3, fieldLine: 33, fieldSide: 33
  • Centre Back: line: 2, fieldPosition: 3, fieldLine: 25, fieldSide: 50
  • Right Back: line: 2, fieldPosition: 1, fieldLine: 33, fieldSide: 100
  • Central Midfielder: line: 3, fieldPosition: 2, fieldLine: 50, fieldSide: 50
  • Left Winger: line: 4, fieldPosition: 2, fieldLine: 75, fieldSide: 15
  • Centre Forward: line: 4, fieldPosition: 1, fieldLine: 85, fieldSide: 50

Deriving True Position from YardFormation

To determine a player’s actual position, combine line and fieldSide:
function getTruePosition(yardFormation) {
  const { line, fieldSide } = yardFormation;
  
  if (line === 1) return 'Goalkeeper';
  
  if (line === 2) { // Defenders
    if (fieldSide <= 15) return 'Left Back';
    if (fieldSide <= 40) return 'Left Centre Back';
    if (fieldSide <= 60) return 'Centre Back';
    if (fieldSide <= 85) return 'Right Centre Back';
    return 'Right Back';
  }
  
  if (line === 3) { // Midfielders
    if (fieldSide <= 20) return 'Left Midfielder';
    if (fieldSide <= 40) return 'Left Central Midfielder';
    if (fieldSide <= 60) return 'Central Midfielder';
    if (fieldSide <= 80) return 'Right Central Midfielder';
    return 'Right Midfielder';
  }
  
  if (line === 4) { // Attackers
    if (fieldSide <= 25) return 'Left Winger';
    if (fieldSide <= 75) return 'Striker';
    return 'Right Winger';
  }
}

Stats Array

Each stat object contains:
FieldTypeDescription
typenumberStat type identifier
valuestringStat value (may include formatting like “23/29 (79%)“)
isTopbooleanWhether this is a key/top stat
categoryIdnumberCategory (2 = Attacking, 3 = Defending)
namestringFull stat name
shortNamestringAbbreviated stat name
ordernumberDisplay order
imageIdnumberIcon identifier
Common stat types:
TypeName
3Total Shots
19Passes Completed
23Goalkeeper Saves
26Assists
27Goals
30Minutes
37Was Fouled
39Tackles Won
40Clearances
41Interceptions
42Fouls Made
45Touches
46Key Passes
53Long Passes Completed
54Successful Dribbles
55Ground Duels Won
56Aerial Duels Won
73Possession Lost
76Expected Goals (xG)
78Expected Assists (xA)
86Ball Recovery

ChartEvents Object (Shot Chart)

Contains shot/goal events for the game:
FieldTypeDescription
xgstringExpected Goals value for the shot
xgotstringExpected Goals on Target
bodyPartstringBody part used (“Left foot”, “Right Foot”, “Header”)
goalDescriptionstringShot placement (“Low Centre”, “High Left”, etc.)
timestringMinute of the event
playerIdnumberID of the player who took the shot
linenumberVertical position on pitch (%)
sidenumberHorizontal position on pitch (%)
outcomeobjectResult of the shot (Goal, Saved, Missed, Blocked)

Stats Categories

IDName
2Attacking
3Defending

Use Cases

  1. Player Match Analysis: Get detailed performance metrics for a player in a specific match
  2. Heat Map Visualization: Display player movement patterns during the game
  3. Shot Chart Display: Visualize all shots taken in the match with xG data
  4. Player Comparison: Compare performances of players in the same match

Notes

  • The yardFormation data helps accurately position players on a pitch visualization
  • Heat map URLs are ready-to-use image URLs with WebP format
  • Shot chart events include xG (Expected Goals) for quality analysis
  • Stats are categorized into Attacking (categoryId: 2) and Defending (categoryId: 3)
  • This endpoint provides more detailed player data than the general /game endpoint

Authorizations

x-api-key
string
header
required

Your SportsAPI Pro API key

Query Parameters

athleteId
integer
required

The unique identifier of the athlete

Example:

80392

gameId
integer
required

The unique identifier of the game

Example:

4609054

Response

Athlete lineup data retrieved successfully

members
object[]

Lineup member data with stats and positioning

statsCategories
array
chartEvents
object

Shot chart data with xG

sports
array
countries
array
competitions
array
competitors
array
games
array