Skip to content

Player IDs

How players are identified in AIB Insight.

Format

{team}-{jersey}
Component Values Description
team 0 or 1 Team identifier
jersey Number or GK Jersey number, or GK for goalkeepers when the jersey number could not be detected

Examples

Player ID Meaning
0-10 Team 0, jersey #10
1-7 Team 1, jersey #7
0-1 Team 0, jersey #1 (usually goalkeeper)
1-99 Team 1, jersey #99
0-GK Team 0, goalkeeper (jersey number unknown)
1-GK Team 1, goalkeeper (jersey number unknown)

Note

The GK suffix appears when the system detects a goalkeeper but cannot read their jersey number. When filtering by player, use the exact ID as returned by the API (e.g. 0-GK, not 0-1).

Team Assignment

Team Starting Position Typical
team_0 Left side of pitch Home team
team_1 Right side of pitch Away team

Note

Team assignment is based on starting position, not home/away status. The team that starts on the left is always team_0.

Getting Player Information

Summary Endpoint

response = requests.get(f'/api/v1/analyses/{id}/summary', headers=headers)
summary = response.json()

# Player list with IDs and names
for player in summary['players']:
    print(f"{player['player_id']}: {player['name']}")
# Result:
# 0-1: FC Example #1
# 0-10: FC Example #10
# 1-7: Opponent FC #7

Summary Endpoint

response = requests.get(f'/api/v1/analyses/{id}/summary', headers=headers)
summary = response.json()

for player in summary['players']:
    print(f"{player['name']}: {player['stats']['total_distance_m']}m")

Using Player IDs

In Filters

{
  "type": "player_possession",
  "players": ["0-10"]
}
{
  "type": "player_ball_proximity",
  "players": ["0-10", "0-7"],
  "threshold": 5
}

Building a Player Selector

const { players } = await fetch(`/api/v1/analyses/${id}/summary`).then(r => r.json());

const options = players.map(p => ({
  value: p.player_id,
  label: p.name
}));

options.sort((a, b) => {
  const [teamA, jerseyA] = a.value.split('-').map(Number);
  const [teamB, jerseyB] = b.value.split('-').map(Number);
  return teamA - teamB || jerseyA - jerseyB;
});

Filter by Team

summary = requests.get(f'/api/v1/analyses/{id}/summary', headers=headers).json()

team_0_players = [p['player_id'] for p in summary['players'] if p['team_id'] == 'team_0']
team_1_players = [p['player_id'] for p in summary['players'] if p['team_id'] == 'team_1']

Detection Confidence

In tracking data, player_id_conf indicates confidence of identification:

Confidence Interpretation
> 0.8 High confidence
0.5 - 0.8 Medium confidence
< 0.5 Low confidence
null Player detected but jersey not readable

Common Player Roles

Jersey Range Typical Role
1 Goalkeeper
2-5 Defenders
6-8 Midfielders
9-11 Forwards
12+ Substitutes

Note

Jersey numbers vary by team. Use the display names from the summary endpoint for accurate player identification.