Live Lineup Queries

The live_lineup section of the LIVE Data API provides all the information StatsBomb captures for players, matches, teams, seasons and competitions.

live_lineup can be used to find identity information (match_id, player_id, team_id). Those identities can be used as values to filter queries in the live_match_events section of the LIVE Data API.

Use a match_id with live_lineup queries

Queries on live_lineup are more efficient when a match_id is specified

Search for a Player by name

Find the details of a player, including the player_id, using either their full name or a partial match for their name.

As there may be multiple results across match lineups, use limit condition to only return the first match.

query PlayerDetailsByFullName {
  live_lineup(
    limit: 1,
    where: { match_id: { _eq: 10101 },
             player_id: { _eq: 24 } })
  {
    player_id
    player_name
    player_nationality
    player_nickname
    player_preferred_foot
    player_weight
    team_name
    player_date_of_birth
    player_firstname
    player_lastname
  }
}

Example response

{
  "data": {
    "live_lineup": [
      {
        "player_id": 24,
        "player_name": "Alexandre Lacazette",
        "player_nationality": 6,
        "player_nickname": "A. Lacazette",
        "player_preferred_foot": "Right",
        "player_weight": 73,
        "team_name": "Arsenal",
        "player_date_of_birth": "1991-05-28",
        "player_firstname": "Alexandre",
        "player_lastname": "Lacazette"
      }
    ]
  }
}

Player details by id

Results from the live_match_events may include player identity as a value in player_id.

Use the player_id value with the where condition to find all the information about a player

query PlayerDetailsById {
  live_lineup(
    where: {  match_id: { _eq: 10101 },
              player_id: { _eq: 24 } },
    distinct_on: player_id)
  {
    player_id
    player_name
    player_nationality
    player_nickname
    player_preferred_foot
    player_weight
    team_name
    player_date_of_birth
    player_firstname
    player_lastname
  }
}

Use distinct when searching by id

A player id will appear in all the lineups captured by StatsBomb, therefore filtering by player id will return multiple records. Using distinct will return only the unique record for the player.

Example response

{
  "data": {
    "live_lineup": [
      {
        "player_id": 24,
        "player_name": "Alexandre Lacazette",
        "player_nationality": 6,
        "player_nickname": "A. Lacazette",
        "player_preferred_foot": "Right",
        "player_weight": 73,
        "team_name": "Arsenal",
        "player_date_of_birth": "1991-05-28",
        "player_firstname": "Alexandre",
        "player_lastname": "Lacazette"
      }
    ]
  }
}

Search for a team

Search for a team by name or partial name

query TeamBySimilarName {
  live_lineup(
    where: {  match_id: { _eq: 10101 },
             team_name: { _like: "%United%" } })
  {
    team_name
    team_id
  }
}

Example response

{
  "data": {
    "statsbomb_team": [
      {
        "team_id": 1,
        "team_name": "Tottenham Hotspur"
      }
    ]
  }
}

Team details by id

Search for a team by a team_id, such as that found in home_team_id or away_team_id in live_match_events.

query MyTeamQuery {
  statsbomb_team(
    where: { match_id: { _eq: 10101 },
             team_id: {_eq: 1}})
  {
    team_id
    team_name
  }
}

Example response

{
  "data": {
    "statsbomb_team": [
      {
        "team_id": 1,
        "team_name": "Tottenham Hotspur"
      }
    ]
  }
}

results matching ""

    No results matching ""