Skip to main content

EMH Data Format

EMH in Pro-match of the data portal gives access to the files with game data. These files contain timeline information of the events that happened in the game and stats for teams and players. EMH files are not as detailed as Live Data Messages, but they can give you a brief overview of the game or enough information to render a summarised game stats screen.

There are two types of EMH Data files:

Summary, a JSON file containing summarized team and player stats for the game.

Details, a JSON file containing timeline of events that happened in the game and interim stats for the players.

Summary

The summary file looks like this:

{
"gameCreation": 1642100066000,
"gameDuration": 2139,
"gameEndTimestamp": 1642102205000,
"gameId": 2991992,
"gameMode": "CLASSIC",
"gameName": "90476977477967409|game1",
"gameStartTimestamp": 1642098763654,
"gameType": "CUSTOM_GAME",
"gameVersion": "12.1.416.5961",
"mapId": 11,
"platformId": "ESPORTSTMNT01",
"queueId": 0,
"seasonId": 0,
"tournamentCode": "",
"participants": [...], // output truncated
"teams": [...] // output truncated
}

Most of the top-level fields contain meta information about the game: the Unix timestamp of when the game started (gameStartTimestamp), the version of the game that was being played (gameVersion), etc.

Of particular importance are the last two fields: participants and teams.

Participants

The participants field of the summary EMH file contains the final game stats for each player.

JSON example
{
"assists": 6,
"baronKills": 0,
"bountyLevel": 3,
"champExperience": 17678,
"champLevel": 17,
"championId": 126,
"championName": "Jayce",
"championTransform": 0,
"consumablesPurchased": 13,
"damageDealtToBuildings": 11734,
"damageDealtToObjectives": 36370,
"damageDealtToTurrets": 11734,
"damageSelfMitigated": 11680,
"deaths": 1,
"detectorWardsPlaced": 8,
"doubleKills": 0,
"dragonKills": 1,
"firstBloodAssist": false,
"firstBloodKill": false,
"firstTowerAssist": true,
"firstTowerKill": false,
"gameEndedInEarlySurrender": false,
"gameEndedInSurrender": false,
"goldEarned": 17739,
"goldSpent": 17250,
"individualPosition": "AFK",
"inhibitorKills": 0,
"inhibitorTakedowns": 1,
"inhibitorsLost": 0,
"item0": 6695,
"item1": 3158,
"item2": 3814,
"item3": 6694,
"item4": 6692,
"item5": 3042,
"item6": 3364,
"itemsPurchased": 33,
"killingSprees": 2,
"kills": 8,
"lane": "MIDDLE",
"largestCriticalStrike": 0,
"largestKillingSpree": 5,
"largestMultiKill": 1,
"longestTimeSpentLiving": 1221,
"magicDamageDealt": 18794,
"magicDamageDealtToChampions": 3159,
"magicDamageTaken": 5142,
"neutralMinionsKilled": 30,
"nexusKills": 1,
"nexusLost": 0,
"nexusTakedowns": 1,
"objectivesStolen": 0,
"objectivesStolenAssists": 0,
"participantId": 1,
"pentaKills": 0,
"perks": {
"statPerks": {
"defense": 5002,
"flex": 5008,
"offense": 5005
},
"styles": [{
"description": "primaryStyle",
"selections": [{
"perk": 8369,
"var1": 1649,
"var2": 1727,
"var3": 0
}, {
"perk": 8304,
"var1": 10,
"var2": 3,
"var3": 0
}, {
"perk": 8345,
"var1": 3,
"var2": 0,
"var3": 0
}, {
"perk": 8352,
"var1": 149,
"var2": 907,
"var3": 86
}],
"style": 8300
}, {
"description": "subStyle",
"selections": [{
"perk": 8226,
"var1": 250,
"var2": 1503,
"var3": 0
}, {
"perk": 8233,
"var1": 25,
"var2": 20,
"var3": 0
}],
"style": 8200
}]
},
"physicalDamageDealt": 225397,
"physicalDamageDealtToChampions": 24523,
"physicalDamageTaken": 8140,
"profileIcon": 1425,
"quadraKills": 0,
"riotIdName": "",
"riotIdTagline": "",
"role": "DUO",
"sightWardsBoughtInGame": 0,
"spell1Casts": 163,
"spell1Id": 4,
"spell2Casts": 111,
"spell2Id": 12,
"spell3Casts": 119,
"spell4Casts": 176,
"summoner1Casts": 3,
"summoner2Casts": 3,
"summonerId": 2658436812768992,
"summonerLevel": 30,
"summonerName": "player1",
"teamEarlySurrendered": false,
"teamId": 100,
"teamPosition": "AFK",
"timeCCingOthers": 9,
"timePlayed": 2107,
"totalDamageDealt": 259359,
"totalDamageDealtToChampions": 29235,
"totalDamageShieldedOnTeammates": 0,
"totalDamageTaken": 13798,
"totalHeal": 1870,
"totalHealsOnTeammates": 0,
"totalMinionsKilled": 253,
"totalTimeCCDealt": 170,
"totalTimeSpentDead": 41,
"totalUnitsHealed": 1,
"tripleKills": 0,
"trueDamageDealt": 15167,
"trueDamageDealtToChampions": 1552,
"trueDamageTaken": 515,
"turretKills": 5,
"turretTakedowns": 8,
"turretsLost": 5,
"unrealKills": 0,
"visionScore": 47,
"visionWardsBoughtInGame": 8,
"wardsKilled": 14,
"wardsPlaced": 12,
"win": true
}

The participants list mainly holds the player stats like how much damage did they deal throughout the game (physicalDamageDealt, magicDamageDealt) or how many minions did they kill (totalMinionsKilled). It also contains some extra info like the player's items (item0, item1, ...), spells (spell1Id, spell2Id, ...) or runes (perks).

The participantId field holds the internal player's ID. These IDs are consistent between Summary and Details files, so you can connect the data between them.

Teams

The teams field of the summary EMH file contains the final game stats for both teams.

{
"bans": [
{
"championId": 134,
"pickTurn": 1
}, ... // output truncated
],
"objectives": {
"baron": {
"first": true,
"kills": 1
},
"champion": {
"first": true,
"kills": 23
},
"dragon": {
"first": true,
"kills": 4
},
"inhibitor": {
"first": true,
"kills": 2
},
"riftHerald": {
"first": true,
"kills": 1
},
"tower": {
"first": true,
"kills": 10
}
},
"teamId": 100,
"win": true
}

The bans field holds information about the champions, that this team banned during the draft phase.

The objectives field holds such team stats like how many towers did they destroy (towers.kills) or how many times they killed Baron (baron.kills).

Details

The details file contains information about all events that happened during the game. Its structure looks like this:

{
"frameInterval": 60000,
"gameId": 2991992,
"frames": [...] // output truncated
"participants": [{"participantId": 1}, {"participantId": 2}, ...] // output truncated
}

The main field is frames, it holds the list of game frames. Frame is a snapshot containing interim player stats and list of events that happened since the previous frame. The interval between each frame is stated in milliseconds in the frameInterval field.

Each frame consists of three top-level fields:

{
"events": [...],
"participantFrames": [...],
"timestamp": 60000
}
  • events holds list of game events that happened since the previous frame.
  • participantFrames contains current info and interim stats for each player.
  • timestamp indicates time in milliseconds that passed since the game start.

Let's take a closer look at the events field.

Events

The events field holds a list of game events. Game event objects have different structure depending on the event type. type is the only field that's guarantied to be present in each item.

Here's an example event:

  {
"levelUpType": "NORMAL",
"participantId": 6,
"skillSlot": 3,
"timestamp": 180174,
"type": "SKILL_LEVEL_UP"
},

By reading the type field, you can determine that this event denotes a champion's ability level-up. Knowing the event type you, or the processing function in your code, can make sense of the other event fields.

Also note the participantId field. This ID denotes the player, involved in the event. Participant IDs are consistent between Summary and Details data files. It means that you can connect data between them. For example, to get the name of the player from the event above, look for a record with "participantId": 6 in the Summary data file.

Event Types

All possible event types with examples.

BUILDING_KILL
{
"type": "BUILDING_KILL",
"timestamp": 836246,
"position": {
"x": 4318,
"y": 13875
},
"killerId": 4,
"assistingParticipantIds": [],
"teamId": 200,
"buildingType": "TOWER_BUILDING",
"laneType": "TOP_LANE",
"towerType": "OUTER_TURRET" // optional, only if tower
}
CHAMPION_KILL
{
"type": "CHAMPION_KILL",
"timestamp": 124548,
"position": {
"x": 13218,
"y": 3838
},
"killerId": 2,
"victimId": 7,
"assistingParticipantIds": [5], // optional, only if not empty
"bounty": 219,
"killStreakLength": 4,
"victimDamageReceived": [ // optional, only if not empty
{
"participantId": 2,
"type": "OTHER",
"name": "string",
"spellSlot": 0,
"spellName": "string",
"basic": false,
"physicalDamage": 165,
"magicDamage": 0,
"trueDamage": 0
},
{
"participantId": 2,
// Possible types: MINION, MONSTER, TOWER, OTHER
"type": "OTHER",
"name": "string",
"spellSlot": 0,
"spellName": "string",
"basic": false,
"physicalDamage": 0,
"magicDamage": 250,
"trueDamage": 0
},
{
"participantId": 5,
"type": "OTHER",
"name": "string",
"spellSlot": 0,
"spellName": "string",
"basic": true,
"physicalDamage": 310,
"magicDamage": 0,
"trueDamage": 0
}
],
"victimDamageDealt": [ // optional, only if not empty
{
"participantId": 2,
"type": "OTHER",
"name": "string",
"spellSlot": 0,
"spellName": "string",
"basic": false,
"physicalDamage": 0,
"magicDamage": 95,
"trueDamage": 0
},
{
"participantId": 5,
"type": "OTHER",
"name": "string",
"spellSlot": 0,
"spellName": "string",
"basic": true,
"physicalDamage": 120,
"magicDamage": 0,
"trueDamage": 0
}
]
}
CHAMPION_SPECIAL_KILL
{
"type": "CHAMPION_SPECIAL_KILL",
"timestamp": 1326584,
"killerId": 9,
"position": {
"x": 9664,
"z": 5525
},
"killType": "KILL_MULTI",
"multiKillLength": 2 // optional, only if multikill
}
CHAMPION_TRANSFORM
{
"type": "CHAMPION_TRANSFORM",
"timestamp": 54321,
"participantId": 2,
// Possible tytransform types: NONE, ASSASSIN, SLAYER, UNDEFINED
"transformType": "SLAYER"
}
DRAGON_SOUL_GIVEN
{
"type": "DRAGON_SOUL_GIVEN",
"timestamp": 54321,
"teamId": 200,
"name": "string"
}
ELITE_MONSTER_KILL
{
"killerId": 7,
"killerTeamId": 200,
"monsterType": "RIFTHERALD",
"position": {
"x": 4842,
"y": 9878
},
"timestamp": 908396,
"type": "ELITE_MONSTER_KILL"
}
GAME_END
{
"type": "GAME_END",
"timestamp": 1491192,
"realTimestamp": 1601618212866,
"gameId": 3599847858,
"winningTeam": 100
}
ITEM_DESTROYED
{
"type": "ITEM_DESTROYED",
"timestamp": 124251,
"participantId": 1,
"itemId": 2010
}
ITEM_PURCHASED
{
"type": "ITEM_PURCHASED",
"timestamp": 5191,
"participantId": 8,
"itemId": 2003
}
ITEM_SOLD
{
"type": "ITEM_SOLD",
"timestamp": 1173228,
"participantId": 4,
"itemId": 1055
}
ITEM_UNDO
{
"type": "ITEM_UNDO",
"timestamp": 325065,
"participantId": 7,
"afterId": 0,
"beforeId": 2003
}
LEVEL_UP
{
"type": "LEVEL_UP",
"timestamp": 104015,
"participantId": 2,
"level": 2
}
PAUSE_END
{
"type": "PAUSE_END",
"timestamp": 0,
"realTimestamp": 1579902096313
}
PAUSE_START
{
"type": "PAUSE_START",
"timestamp": 0,
"realTimestamp": 1579902096313
}
SKILL_LEVEL_UP
{
"type": "SKILL_LEVEL_UP",
"timestamp": 2614,
"participantId": 8,
"skillSlot": 1,
"levelUpType": "NORMAL"
}
TURRET_PLATE_DESTROYED
{
"type": "TURRET_PLATE_DESTROYED",
"timestamp": 697175,
"killerId": 0,
"position": {
"x": 8955,
"z": 8510
},
"laneType": "MID_LANE",
"teamId": 200
}
WARD_KILL
{
"type": "WARD_KILL",
"timestamp": 346638,
"wardType": "YELLOW_TRINKET",
"killerId": 5
}
WARD_PLACED
{
"type": "WARD_PLACED",
"timestamp": 186652,
"wardType": "YELLOW_TRINKET",
"creatorId": 5
}