Entity Relationship Diagram

LOL esports data structure from Grid API

Back to Home

This diagram illustrates the data model used by the AI Drafting Assistant. Use it to understand how entities (Regions, Tournaments, Teams, Players, Series, Games) relate to each other. This is useful for developers extending the system or understanding the underlying data structure.

Data Source: Grid Esports API

Central Data API: https://api-op.grid.gg/central-data/graphql

Series State API: https://api-op.grid.gg/live-data-feed/series-state/graphql

Data Collection: All data downloaded directly from API without modification

API Coverage: 1,632 LOL series | Downloaded: 1,632 series + 1,488 state records (100%)

Hierarchy Data (Central Data API)
Region
Region
PKcodestring
namestring
fullNamestring
countrystring
1:N
Tournament
League
PKidstring
namestring
nameShortenedstring
FKparentTournament?
N:M
Team
Team
PKidstring
namestring
nameShortenedstring
logoUrlstring
1:N
Player
Player
PKidstring
nicknamestring
FKteamIdstring
Tournament.id = Series.tournament.id
Match Data (Central Data API + Series State API)
Series
Series
PKidstring
startTimeScheduleddatetime
format{name, nameShortened}
typestring
FKtournamentTournament
FKteamsTeam[2]
1:1
SeriesState
Series State
PKidstring
startedboolean
finishedboolean
formatstring
startedAtdatetime
teamsSeriesTeam[2]
gamesGame[]
SeriesTeam
Series Team Stats
FKidstring
namestring
scoreint
wonboolean
killsint
deathsint
playersPlayer[]
1:N
Game
Single Game
PKidstring
sequenceNumberint
startedboolean
finishedboolean
draftActionsDraftAction[]
teamsGameTeam[2]
1:2
GameTeamLol
Game Team Stats
FKidstring
namestring
sideblue|red
wonboolean
kills/deathsint
netWorthint
damageDealt*int
visionScore*float
objectivesObjective[]
playersGamePlayer[]
DraftAction
Draft Action
typeban|pick
sequenceNumberstring
drafter{id, type}
draftable{id, type, name}
1:10
GamePlayerLol
Game Player Stats
FKidstring
namestring
character{id, name}
kills/deaths/assistsint
netWorthint
damageDealt*int
visionScore*float
kdaRatio*float
objectivesObjective[]
inventory{items[]}

Legend

PKPrimary Key
FKForeign Key
1:NOne-to-Many
N:MMany-to-Many
1:1One-to-One
*LOL-specific extension (requires API v3.23+)

Data Download Process

  1. Call Central Data API to get all Series list
  2. For each Series, call Series State API to get detailed state
  3. Save raw data to data/lol/series.json and states.json
  4. Extract player-team relationships from state data to build hierarchy

Local Data Files

  • data/lol/series.json - Series list (1.69 MB, 1,632 series)
  • data/lol/states.json - State data (111.9 MB, 1,488 series)
  • data/lol/index.json - Index file (358 KB)

LOL-Specific Extension Fields (GameTeamStateLol / GamePlayerStateLol) - Complete List

Team Level (GameTeamStateLol) - 17 extension fields

  • damageDealt - Total damage dealt (int)
  • damageTaken - Total damage taken (int)
  • damagePerMinute - Damage per minute (float)
  • damagePerMoney - Damage per gold efficiency (float)
  • visionScore - Vision score (float)
  • visionScorePerMinute - Vision score per minute (float)
  • experiencePoints - Total experience (int)
  • baronPowerPlays - Baron power play data (array)
  • moneyDifference - Gold difference (int)
  • moneyPerMinute - Gold per minute (float)
  • totalMoneyEarned - Total gold earned (int)
  • majorMoneyLead - Maximum gold lead (float)
  • majorMoneyDeficit - Maximum gold deficit (float)
  • forwardPercentage - Forward percentage (float)
  • kdaRatio - Team KDA ratio (float)
  • killsAndAssists - Kills + assists (float)
  • firstKill - First blood (boolean)

Player Level (GamePlayerStateLol) - 19 extension fields

  • damageDealt - Damage dealt (int)
  • damageTaken - Damage taken (int)
  • damagePercentage - Damage share (float)
  • damagePerMinute - Damage per minute (float)
  • damagePerMoney - Damage per gold efficiency (float)
  • visionScore - Vision score (float)
  • visionScorePerMinute - Vision score per minute (float)
  • kdaRatio - KDA ratio (float)
  • killParticipation - Kill participation (float)
  • killsAndAssists - Kills + assists (float)
  • experiencePoints - Experience points (int)
  • moneyPercentage - Gold share (float)
  • moneyPerMinute - Gold per minute (float)
  • totalMoneyEarned - Total gold earned (int)
  • forwardPercentage - Forward percentage (float)
  • alive - Alive status (boolean)
  • currentHealth/maxHealth - Current/max health (int)
  • currentArmor - Current armor (int)
  • respawnClock - Respawn countdown (ClockState)

* These fields require API version 3.23+. Older match data may not have them. Use GraphQL fragment: ... on GameTeamStateLol

Other Available API Fields (Currently Not Downloaded)

SeriesState Extensions

  • version - API version number
  • title - Game title info
  • forfeited - Forfeit status
  • duration - Match duration
  • draftActions - Series draft

GameState Extensions

  • titleVersion - Game version
  • type - Match type
  • startedAt - Start time
  • duration - Game duration
  • structures - Structure status
  • nonPlayerCharacters - NPC status
  • segments - Match phases
  • externalLinks - External links

Player Extensions

  • roles - Position roles
  • position - Map coordinates
  • abilities - Ability status
  • statusEffects - Status effects
  • unitKills - Unit kills
  • firstKill - First blood
  • structuresDestroyed - Structures destroyed

These fields are supported by the API but not currently fetched by the download script. Can be extended as needed.