Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
lolesports.com unofficial api docs

Unofficial documentation

This is an unofficial documentation for the internal lolesports.com api.

This documentation is uncomplete and currently only show all information I got so far. Please help me complete and correct this documentation.

Top level domain

The domain for the intern lolesports.com api is http://api.lolesports.com/api/.

There is also an api at http://na.lolesports.com/api/swagger#!/api/ but I feel like this is a bit outdated.

Api calls

leagues

Parameters:

  • id
  • slug

Example(s):

Top-level schema

{
  leagues: [
    leagues.0: {
      leagues.0.abouts: Object
      leagues.0.drupalId: Int
      leagues.0.region: Unknown
      leagues.0.updatedAt: String
      leagues.0.slug: String
      leagues.0.names: Object
      leagues.0.logoUrl: String
      leagues.0.id: Int
      leagues.0.createdAt: String
      leagues.0.name: String
    }
  ]
}

scheduleItems

Parameters:

  • leagueId (Required)

Example(s):

Top-level schema

{
  scheduleItems: [
    scheduleItems.0: {
      scheduleItems.0.league: String
      scheduleItems.0.tournament: String
      scheduleItems.0.tags: Object
      scheduleItems.0.scheduledTime: String
      scheduleItems.0.content: String
      scheduleItems.0.bracket: String
      scheduleItems.0.id: String
      scheduleItems.0.match: String
    }
  ]
  players: [
    players.??: Unknown
  ]
  highlanderTournaments: [
    highlanderTournaments.0: {
      highlanderTournaments.0.leagueReference: String
      highlanderTournaments.0.standings: Object
      highlanderTournaments.0.endDate: String
      highlanderTournaments.0.description: String
      highlanderTournaments.0.roles: Object
      highlanderTournaments.0.title: String
      highlanderTournaments.0.queues: Object
      highlanderTournaments.0.gameMode: Object
      highlanderTournaments.0.rosteringStrategy: Object
      highlanderTournaments.0.breakpoints: Object
      highlanderTournaments.0.league: String
      highlanderTournaments.0.liveMatches: List
      highlanderTournaments.0.rosters: Object
      highlanderTournaments.0.brackets: Object
      highlanderTournaments.0.matchType: Object
      highlanderTournaments.0.gameIds: List
      highlanderTournaments.0.startDate: String
      highlanderTournaments.0.id: String
      highlanderTournaments.0.platformIds: List
      highlanderTournaments.0.published: Boolean
    }
  ]
  teams: [
    teams.0: {
      teams.0.homeLeague: String
      teams.0.altLogoUrl: Unknown
      teams.0.name: String
      teams.0.players: List
      teams.0.acronym: String
      teams.0.updatedAt: String
      teams.0.teamPhotoUrl: String
      teams.0.slug: String
      teams.0.starters: List
      teams.0.bios: Object
      teams.0.logoUrl: String
      teams.0.foreignIds: Object
      teams.0.id: Int
      teams.0.createdAt: String
      teams.0.subs: List
    }
  ]
}

teams

Parameters:

  • slug (Required)
  • tournament (Required)

Example(s):

Top-level schema

{
  scheduleItems: [
    scheduleItems.??: Unknown
  ]
  teamStatsHistories: [
    teamStatsHistories.0: {
      teamStatsHistories.0.kills: Int
      teamStatsHistories.0.deaths: Int
      teamStatsHistories.0.timestamp: Int
      teamStatsHistories.0.team: Int
      teamStatsHistories.0.game: String
      teamStatsHistories.0.championIds: List
      teamStatsHistories.0.assists: Int
      teamStatsHistories.0.win: Boolean
      teamStatsHistories.0.id: String
      teamStatsHistories.0.match: String
      teamStatsHistories.0.opponent: Int
    }
  ]
  teams: [
    teams.0: {
      teams.0.homeLeague: String
      teams.0.altLogoUrl: Unknown
      teams.0.name: String
      teams.0.players: List
      teams.0.acronym: String
      teams.0.updatedAt: String
      teams.0.teamPhotoUrl: String
      teams.0.slug: String
      teams.0.starters: List
      teams.0.bios: Object
      teams.0.logoUrl: String
      teams.0.foreignIds: Object
      teams.0.id: Int
      teams.0.createdAt: String
      teams.0.subs: List
    }
  ]
  players: [
    players.0: {
      players.0.roleSlug: String
      players.0.teamRosterStat: String
      players.0.name: String
      players.0.firstName: String
      players.0.photoUrl: String
      players.0.lastName: String
      players.0.region: String
      players.0.updatedAt: String
      players.0.birthdate: Unknown
      players.0.slug: String
      players.0.bios: Object
      players.0.socialNetworks: Object
      players.0.hometown: String
      players.0.champions: List
      players.0.foreignIds: Object
      players.0.id: Int
      players.0.createdAt: String
    }
  ]
  teamStatsSummaries: [
    teamStatsSummaries.0: {
      teamStatsSummaries.0.kdaRatio: Float
      teamStatsSummaries.0.averageWinLength: Int
      teamStatsSummaries.0.firstDragonKillRatioRank: Int
      teamStatsSummaries.0.averageWinLengthRank: Int
      teamStatsSummaries.0.teamId: String
      teamStatsSummaries.0.averageDamageByPosition: Object
      teamStatsSummaries.0.firstDragonKillRatio: Float
      teamStatsSummaries.0.firstTowerRatioRank: Int
      teamStatsSummaries.0.kdaRatioRank: Int
      teamStatsSummaries.0.firstTowerRatio: Float
    }
  ]
  teamRosterStats: [
    teamRosterStats.0: {
      teamRosterStats.0.averageKillParticipation: Float
      teamRosterStats.0.summonerName: String
      teamRosterStats.0.playerId: String
      teamRosterStats.0.averageAssists: Float
      teamRosterStats.0.championIds: List
      teamRosterStats.0.averageDeaths: Float
      teamRosterStats.0.averageKills: Float
      teamRosterStats.0.gamesPlayed: Int
    }
  ]
  highlanderTournaments: [
    highlanderTournaments.0: {
      highlanderTournaments.0.leagueReference: String
      highlanderTournaments.0.standings: Object
      highlanderTournaments.0.description: String
      highlanderTournaments.0.roles: Object
      highlanderTournaments.0.title: String
      highlanderTournaments.0.rosters: Object
      highlanderTournaments.0.queues: Object
      highlanderTournaments.0.gameMode: Object
      highlanderTournaments.0.rosteringStrategy: Object
      highlanderTournaments.0.seedingStrategy: Object
      highlanderTournaments.0.liveMatches: List
      highlanderTournaments.0.bracketType: Object
      highlanderTournaments.0.brackets: Object
      highlanderTournaments.0.matchType: Object
      highlanderTournaments.0.gameIds: List
      highlanderTournaments.0.id: String
      highlanderTournaments.0.platformIds: List
      highlanderTournaments.0.published: Boolean
    }
  ]
}

players

Parameters:

  • slug (Required)
  • tournament (Required)

Example(s):

Top-level schema

{
  scheduleItems: [
    scheduleItems.??: Unknown
  ]
  playerStatsSummaries: [
    playerStatsSummaries.0: {
      playerStatsSummaries.0.csPerTenMinutes: Float
      playerStatsSummaries.0.killParticipationRank: Int
      playerStatsSummaries.0.playerId: String
      playerStatsSummaries.0.kdaRatio: Float
      playerStatsSummaries.0.killParticipation: Float
      playerStatsSummaries.0.mostPlayedChampions: List
      playerStatsSummaries.0.csPerTenMinutesRank: Int
      playerStatsSummaries.0.kdaRatioRank: Int
    }
  ]
  playerStatsHistories: [
    playerStatsHistories.0: {
      playerStatsHistories.0.championId: Int
      playerStatsHistories.0.kills: Int
      playerStatsHistories.0.deaths: Int
      playerStatsHistories.0.playerId: String
      playerStatsHistories.0.timestamp: Int
      playerStatsHistories.0.team: Int
      playerStatsHistories.0.kdaRatio: Int
      playerStatsHistories.0.game: String
      playerStatsHistories.0.killParticipation: Int
      playerStatsHistories.0.assists: Int
      playerStatsHistories.0.win: Boolean
      playerStatsHistories.0.csPerTenMin: Float
      playerStatsHistories.0.id: String
      playerStatsHistories.0.match: String
      playerStatsHistories.0.opponent: Int
    }
  ]
  teams: [
    teams.0: {
      teams.0.homeLeague: String
      teams.0.altLogoUrl: Unknown
      teams.0.name: String
      teams.0.players: List
      teams.0.acronym: String
      teams.0.updatedAt: String
      teams.0.teamPhotoUrl: String
      teams.0.slug: String
      teams.0.starters: List
      teams.0.bios: Object
      teams.0.logoUrl: String
      teams.0.foreignIds: Object
      teams.0.id: Int
      teams.0.createdAt: String
      teams.0.subs: List
    }
  ]
  players: [
    players.0: {
      players.0.photoUrl: String
      players.0.hometown: String
      players.0.playerStatsSummary: String
      players.0.updatedAt: String
      players.0.subOnTeams: List
      players.0.id: Int
      players.0.createdAt: String
      players.0.roleSlug: String
      players.0.champions: List
      players.0.bios: Object
      players.0.socialNetworks: Object
      players.0.scheduleItems: List
      players.0.playerStatsHistory: List
      players.0.photoInformation: Object
      players.0.foreignIds: Object
      players.0.slug: String
      players.0.name: String
      players.0.firstName: String
      players.0.lastName: String
      players.0.region: String
      players.0.birthdate: Unknown
      players.0.teams: List
      players.0.starterOnTeams: List
    }
  ]
  highlanderTournaments: [
    highlanderTournaments.0: {
      highlanderTournaments.0.leagueReference: String
      highlanderTournaments.0.description: String
      highlanderTournaments.0.roles: Object
      highlanderTournaments.0.title: String
      highlanderTournaments.0.rosters: Object
      highlanderTournaments.0.queues: Object
      highlanderTournaments.0.gameMode: Object
      highlanderTournaments.0.rosteringStrategy: Object
      highlanderTournaments.0.seedingStrategy: Object
      highlanderTournaments.0.liveMatches: List
      highlanderTournaments.0.bracketType: Object
      highlanderTournaments.0.brackets: Object
      highlanderTournaments.0.matchType: Object
      highlanderTournaments.0.gameIds: List
      highlanderTournaments.0.id: String
      highlanderTournaments.0.platformIds: List
      highlanderTournaments.0.published: Boolean
    }
  ]
}

highlanderTournaments

Parameters:

  • league (Required)

Example(s):

Top-level schema

{
  highlanderTournaments: [
    highlanderTournaments.0: {
      highlanderTournaments.0.leagueReference: String
      highlanderTournaments.0.standings: Object
      highlanderTournaments.0.endDate: String
      highlanderTournaments.0.description: String
      highlanderTournaments.0.roles: Object
      highlanderTournaments.0.title: String
      highlanderTournaments.0.queues: Object
      highlanderTournaments.0.gameMode: Object
      highlanderTournaments.0.rosteringStrategy: Object
      highlanderTournaments.0.breakpoints: Object
      highlanderTournaments.0.league: String
      highlanderTournaments.0.liveMatches: List
      highlanderTournaments.0.rosters: Object
      highlanderTournaments.0.brackets: Object
      highlanderTournaments.0.matchType: Object
      highlanderTournaments.0.gameIds: List
      highlanderTournaments.0.startDate: String
      highlanderTournaments.0.id: String
      highlanderTournaments.0.platformIds: List
      highlanderTournaments.0.published: Boolean
    }
  ]
}

highlanderMatchDetails

Parameters:

  • tournamentId (Required)
  • matchId (Required)

Example(s):

Top-level schema

{
  scheduleItems: [
    scheduleItems.0: {
      scheduleItems.0.league: String
      scheduleItems.0.tournament: String
      scheduleItems.0.tags: Object
      scheduleItems.0.scheduledTime: String
      scheduleItems.0.content: String
      scheduleItems.0.bracket: String
      scheduleItems.0.id: String
      scheduleItems.0.match: String
    }
  ]
  videos: [
    videos.0: {
      videos.0.slug: Unknown
      videos.0.reference: String
      videos.0.locale: String
      videos.0.label: Unknown
      videos.0.source: String
      videos.0.game: String
      videos.0.updatedAt: String
      videos.0.id: Int
      videos.0.createdAt: String
    }
  ]
  htmlBlocks: [
    htmlBlocks.??: Unknown
  ]
  gameIdMappings: [
    gameIdMappings.0: {
      gameIdMappings.0.gameHash: String
      gameIdMappings.0.id: String
    }
  ]
  teams: [
    teams.0: {
      teams.0.homeLeague: String
      teams.0.altLogoUrl: Unknown
      teams.0.name: String
      teams.0.players: List
      teams.0.acronym: String
      teams.0.updatedAt: String
      teams.0.teamPhotoUrl: String
      teams.0.slug: String
      teams.0.starters: List
      teams.0.bios: Object
      teams.0.logoUrl: String
      teams.0.foreignIds: Object
      teams.0.id: Int
      teams.0.createdAt: String
      teams.0.subs: List
    }
  ]
  players: [
    players.0: {
      players.0.roleSlug: String
      players.0.name: String
      players.0.firstName: String
      players.0.photoUrl: String
      players.0.lastName: String
      players.0.region: String
      players.0.updatedAt: String
      players.0.birthdate: Unknown
      players.0.slug: String
      players.0.bios: Object
      players.0.socialNetworks: Object
      players.0.hometown: String
      players.0.champions: List
      players.0.liveGameTeam: Int
      players.0.foreignIds: Object
      players.0.id: Int
      players.0.createdAt: String
    }
  ]
}

tournamentPlayerStats

Parameters:

  • tournamentId (Required)

Example(s):

Top-level schema

{
  stats: [
    stats.0: {
      stats.0.teamSlug: String
      stats.0.name: String
      stats.0.kills: Int
      stats.0.deaths: Int
      stats.0.kda: Float
      stats.0.csPerMin: Float
      stats.0.playerSlug: String
      stats.0.killParticipation: Float
      stats.0.assists: Int
      stats.0.team: String
      stats.0.cs: Int
      stats.0.position: String
      stats.0.gamesPlayed: Int
      stats.0.id: Int
      stats.0.minutesPlayed: Int
    }
  ]
}

articles

Parameters:

  • language
  • from

Example(s):

Top-level schema

{
  articles: [
    articles.0: {
      articles.0.author: String
      articles.0.locale: String
      articles.0.externalScripts: List
      articles.0.bodySmall: Unknown
      articles.0.customTemplate: String
      articles.0.category: Object
      articles.0.uuid: String
      articles.0.title: String
      articles.0.tuuid: String
      articles.0.media: Object
      articles.0.comments: Object
      articles.0.type: String
      articles.0.status: Int
      articles.0.redirect: Unknown
      articles.0.tags: Unknown
      articles.0.nid: String
      articles.0.path: Object
      articles.0.bodyFull: String
      articles.0.shortTitle: String
      articles.0.language: String
      articles.0.created: String
      articles.0.showIn: Unknown
      articles.0.region: String
      articles.0.changed: String
      articles.0.published: String
      articles.0.bodyMedium: Unknown
      articles.0.backdrop: List
    }
  ]
}

marquees

Parameters:

  • locale (Required)

Example(s):

Top-level schema

{
  marqueeItems: [
    marqueeItems.0: {
      marqueeItems.0.priority: Int
      marqueeItems.0.marqueeId: Int
      marqueeItems.0.updatedAt: String
      marqueeItems.0.tier: Int
      marqueeItems.0.article: String
      marqueeItems.0.id: Int
      marqueeItems.0.createdAt: String
    }
  ]
  articles: [
    articles.0: {
      articles.0.author: String
      articles.0.locale: String
      articles.0.externalScripts: List
      articles.0.bodySmall: Unknown
      articles.0.customTemplate: String
      articles.0.category: Object
      articles.0.uuid: String
      articles.0.title: String
      articles.0.tuuid: String
      articles.0.media: Object
      articles.0.comments: Object
      articles.0.type: String
      articles.0.status: Int
      articles.0.redirect: Unknown
      articles.0.tags: Unknown
      articles.0.nid: String
      articles.0.path: Object
      articles.0.bodyFull: String
      articles.0.shortTitle: String
      articles.0.language: String
      articles.0.created: String
      articles.0.showIn: Unknown
      articles.0.region: String
      articles.0.changed: String
      articles.0.published: String
      articles.0.bodyMedium: Unknown
      articles.0.backdrop: List
    }
  ]
  marquees: [
    marquees.0: {
      marquees.0.marqueeItems: List
      marquees.0.locale: String
      marquees.0.publishDate: String
      marquees.0.id: Int
      marquees.0.updatedAt: String
      marquees.0.slug: String
      marquees.0.createdAt: String
    }
  ]
}

htmlBlocks

Parameters:

  • None

Example(s):

Top-level schema

{
  htmlBlocks: [
    htmlBlocks.0: {
      htmlBlocks.0.locale: String
      htmlBlocks.0.content: String
      htmlBlocks.0.contentType: String
      htmlBlocks.0.compositeId: String
    }
  ]
}

videos

Paramters:

  • None

Example(s):

Top-level schema

{
  videos: [
    videos.0: {
      videos.0.slug: Unknown
      videos.0.reference: String
      videos.0.locale: String
      videos.0.label: Unknown
      videos.0.source: String
      videos.0.game: String
      videos.0.updatedAt: String
      videos.0.id: Int
      videos.0.createdAt: String
    }
  ]
}

streamgroups

Parameters:

  • None

Example(s):

Top-level schema

{
  streams: [
    streams.??: Unknown
  ]
  highlanderTournaments: [
    highlanderTournaments.??: Unknown
  ]
  streamgroups: [
    streamgroups.0: {
      streamgroups.0.showAd: Boolean
      streamgroups.0.showBanner: Boolean
      streamgroups.0.showSchedule: Boolean
      streamgroups.0.title: String
      streamgroups.0.nowPlaying: String
      streamgroups.0.adLargeImage: Unknown
      streamgroups.0.slug: String
      streamgroups.0.showStat: Boolean
      streamgroups.0.live: Boolean
      streamgroups.0.streams: List
      streamgroups.0.updatedAt: String
      streamgroups.0.showSocial: Boolean
      streamgroups.0.bannerId: Unknown
      streamgroups.0.regionPriority: Unknown
      streamgroups.0.adSmallImage: Unknown
      streamgroups.0.id: Int
      streamgroups.0.createdAt: String
      streamgroups.0.adUrl: Unknown
    }
  ]
  players: [
    players.??: Unknown
  ]
  teams: [
    teams.??: Unknown
  ]
}
# Helper functions to generate a schema from an input json file.
# Sample usage:
# >>> x = json.load(open('path/to/json_file.json', 'r')
# >>> jschema(x)
def jschema(json_obj, max_depth=3):
'''Takes a json object and returns a schema with type information.'''
def rgt(json_obj, level, field_name):
if level > max_depth:
return
elif level == max_depth:
term_print(field_name, json_obj, level)
return
if isinstance(json_obj, types.ListType):
lprint('{}: ['.format(field_name), level)
if len(json_obj) == 0:
term_print(field_name + '.??', None, level + 1)
else:
rgt(json_obj[0], level + 1, field_name + '.0')
lprint(']', level)
elif isinstance(json_obj, types.DictType):
lprint('{}: {{'.format(field_name), level)
if len(json_obj.keys()) == 0:
term_print(field_name + '.??', None, level)
for k in json_obj.keys():
rgt(json_obj[k], level + 1, field_name + '.' + k)
lprint('}', level)
else:
term_print(field_name, json_obj, level)
rgt(json_obj, 0, '')
def lprint(string_to_print, level):
print('{}{}'.format(' ' * level, string_to_print))
def term_print(field_name, json_obj, level):
pretty_types = {
types.BooleanType: 'Boolean',
types.IntType: 'Int',
types.UnicodeType: 'String',
types.StringType: 'String',
types.DictType: 'Object',
types.ListType: 'List',
types.NoneType: 'Unknown',
}
lprint('{}: {}'.format(field_name, pretty_types[type(json_obj)]), level)
@Deivos

This comment has been minimized.

Copy link

@Deivos Deivos commented Mar 6, 2016

You can find all the stats from a match in particular.

  1. Find the id from the highlander match tournament and the matches id found in the brackets also take note of the gameRealm and gameID.
  2. Use those ids in the highlanderMatchDetail and locate the gameHash.
  3. Using this https://acs.leagueoflegends.com/v1/stats/game/{gameRealm}/{gameID}?gameHash={gameHash} replace the info and now you got all the info you need.

you can also get all the timeline of the game by using this link.
https://acs.leagueoflegends.com/v1/stats/game/{gameRealm}/{gameID}/timeline?gameHash={gameHash}

@Zeychiel

This comment has been minimized.

Copy link

@Zeychiel Zeychiel commented Mar 12, 2016

@Many thanks for the timeline !

Here is my event type in go, listing all event possibilities.
Please feel free to reuse and/or complete :

// Event Types : ITEM_PURCHASED, SKILL_LEVEL_UP, WARD_PLACED, ITEM_DESTROYED, ITEM_SOLD, WARD_KILL, CHAMPION_KILL, BUILDING_KILL, ELITE_MONSTER_KILL
//
type Event struct {
    Type                    string   `json:"type,omitempty" bson:"type,omitempty"`                                       // ALL
    Timestamp               int      `json:"timestamp,omitempty" bson:"timestamp,omitempty"`                             // ALL
    ParticipantId           int      `json:"participantId,omitempty" bson:"participantId,omitempty"`                     // ITEM_PURCHASED SKILL_LEVEL_UP
    ItemId                  int      `json:"itemId,omitempty" bson:"itemId,omitempty"`                                   // ITEM_PURCHASED
    WardType                string   `json:"wardType,omitempty" bson:"wardType,omitempty"`                               // WARD_PLACED, WARD_KILL
    CreatorId               int      `json:"creatorId,omitempty" bson:"creatorId,omitempty"`                             // WARD_PLACED
    SkillSlot               int      `json:"skillSlot,omitempty" bson:"skillSlot,omitempty"`                             // SKILL_LEVEL_UP
    LevelUpType             string   `json:"levelUpType,omitempty" bson:"levelUpType,omitempty"`                         // SKILL_LEVEL_UP
    KillerId                int      `json:"killerId,omitempty" bson:"killerId,omitempty"`                               // WARD_KILL CHAMPION_KILL BUILDING_KILL ELITE_MONSTER_KILL
    Position                Position `json:"position,omitempty" bson:"position,omitempty"`                               // CHAMPION_KILL BUILDING_KILL ELITE_MONSTER_KILL
    VictimId                int      `json:"victimId,omitempty" bson:"victimId,omitempty"`                               // CHAMPION_KILL
    AssistingParticipantIds []int    `json:"assistingParticipantIds,omitempty" bson:"assistingParticipantIds,omitempty"` // CHAMPION_KILL
    TeamId                  int      `json:"teamId,omitempty" bson:"teamId,omitempty"`                                   // BUILDING_KILL
    BuildingType            string   `json:"buildingType,omitempty" bson:"buildingType,omitempty"`                       // BUILDING_KILL
    LaneType                string   `json:"laneType,omitempty" bson:"laneType,omitempty"`                               // BUILDING_KILL
    TowerType               string   `json:"towerType,omitempty" bson:"towerType,omitempty"`                             // BUILDING_KILL
    MonsterType             string   `json:"monsterType,omitempty" bson:"monsterType,omitempty"`                         // BUILDING_KILL
}
@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Jun 27, 2016

http://api.lolesports.com/api/v1/leagues not working anymore, didn't find a replacement for now. The others seems to work properly.

@Holgrabus

This comment has been minimized.

Copy link

@Holgrabus Holgrabus commented Aug 2, 2016

Leagues seems only working correctly with slugs. However, you did a very nice work, how did you find these paths ?

@Neuron64

This comment has been minimized.

Copy link

@Neuron64 Neuron64 commented Aug 21, 2016

@Holgrabus
For G Chrome:
Developer tools > network > name response > preview

@Holgrabus

This comment has been minimized.

Copy link

@Holgrabus Holgrabus commented Aug 23, 2016

@Neuron-Light
Thanks !

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Aug 30, 2016

Anybody know how to get stats for LPL games? I know the match history pages are hosted on lol.qq.com and maintained internally by Tencent, but am not sure of a way to access this data.

@Zeychiel

This comment has been minimized.

Copy link

@Zeychiel Zeychiel commented Jan 14, 2017

Hi, does anyone know how to get the GameHash for the the All-Stars games, for which the GameIdMappings is not populated ?
Thanks,

@Lauler

This comment has been minimized.

Copy link

@Lauler Lauler commented Oct 28, 2017

@Deivos How do you guys match the gameRealm and gameID to a gameHash? When I grab the highlandertournaments for Worlds, the platformIDs (gameRealm and gameID) are of a different length than gameIds?

How do you match a matchID to a gameID?

@jhardia

This comment has been minimized.

Copy link

@jhardia jhardia commented Dec 22, 2017

@Lauler , @Zeychiel
You can get gameHash by hitting match details api.

E.g. http://api.lolesports.com/api/v2/highlanderMatchDetails?tournamentId=91be3d78-874a-44e0-943f-073d4c9d7bf6&matchId=22851f97-7555-494d-b234-1e4bbeaf8dd5
By this api , you will get "gameHash" under "gameIdMappings" node.

Then you can hit api for match stats like below

https://acs.leagueoflegends.com/v1/stats/game/TRLH3/1001380191?gameHash=43a46f49938bacca

Regards
Jay Hardia

@tuxin

This comment has been minimized.

Copy link

@tuxin tuxin commented Jan 28, 2018

gameHash doesn't exist for LPL games http://api.lolesports.com/api/v1/leagues?slug=lpl-china

Somebody has solution ?

@pquadri

This comment has been minimized.

Copy link

@pquadri pquadri commented Mar 6, 2018

@tuxin did you find anything for china?

@lmiller1990

This comment has been minimized.

Copy link

@lmiller1990 lmiller1990 commented Aug 21, 2018

Hey, gonna try this out tonight. Is it still the same?

@pquadri @tuxin LPL takes place on another tournament real which Riot does have access to (offline + diff servers). The data is not available for the LPL. The results on the lol esports page are manually entered (read on the lol boards from an employee somewhere).

@CyberKronos

This comment has been minimized.

Copy link

@CyberKronos CyberKronos commented Sep 15, 2018

Is it just me or the highlanderMatchDetails endpoint doesn't populate the gameHash until a game is over? Still unable to get the data actually live.

@cstwing

This comment has been minimized.

Copy link

@cstwing cstwing commented Mar 1, 2019

Hi, @jhardia @Deivos
How can i get the gameRealm and gameID? I found a gameRealm & gameID list in the highlandertournament "platformIDs".

and is there a way to get the statistics data of a live game ?

@CyberKronos

This comment has been minimized.

Copy link

@CyberKronos CyberKronos commented Mar 27, 2019

Hi, does anyone know if there is a game status flag in the API? I know there is a match status flag, however I couldn't find anything at the game level.

@xaxaxa111111

This comment has been minimized.

Copy link

@xaxaxa111111 xaxaxa111111 commented May 3, 2019

Hi Guys, I'm confused why some Tournaments are not covered here like LVP. Also, why some Leagues here doesn't have current Tournament? Example Challengers Korea are empty. do you have any workaround for this?

@tsevenhuysen

This comment has been minimized.

Copy link

@tsevenhuysen tsevenhuysen commented Aug 22, 2019

Hi Guys, I'm confused why some Tournaments are not covered here like LVP. Also, why some Leagues here doesn't have current Tournament? Example Challengers Korea are empty. do you have any workaround for this?

This API has always been only partially supported by Riot, and they seem to be moving further away from it this year. For example, they didn't add the Summer NA Academy split at all, even though they had the Spring NA Academy split on the API. It's unclear what their reasoning is, or whether they are going to do something drastic like replace the whole system.

@wyatt-p

This comment has been minimized.

Copy link

@wyatt-p wyatt-p commented Jan 2, 2020

Does anyone know the limitations of the api in terms of request limits?

@SeanDrum

This comment has been minimized.

Copy link

@SeanDrum SeanDrum commented Jan 26, 2020

Has Riot changed scheduleItems? I try to hit

http://api.lolesports.com/api/v1/scheduleItems?leagueId=2 (LCS)
or
http://api.lolesports.com/api/v1/scheduleItems?leagueId=3 (LEC)

But I don't see the latest tournaments added for Spring 2020. If you can't get this data you can't get the match list and that's the top of the stack for extracting data as far as I can tell.

@tsevenhuysen

This comment has been minimized.

Copy link

@tsevenhuysen tsevenhuysen commented Jan 27, 2020

The lolesports API is no longer being maintained as of 2020. Sorry!

I've been speaking with people at Riot about alternatives but so far the only thing you can do is find match histories on a wiki.

I might start posting links of MH URLs on Oracle's Elixir if I won't get in trouble for it.

@SeanDrum

This comment has been minimized.

Copy link

@SeanDrum SeanDrum commented Jan 27, 2020

[EDIT after you edited your response - I know the MHs are already hosted on Leaguepedia's Runes page https://lol.gamepedia.com/LCS/2020_Season/Spring_Season/Runes so unless they have a special get out of jail free card I think this is admissable]

Tim, thanks so much for your response. Big fan of your work, btw.

I know there's still bits of the public APIs that work because the matchhistory pages are still active. Could you clue me in to how so many folks still getting this data seemingly programmatically (Oracle's Elixir, Leaguepedia, E1 Fantasy). Any insight into how the new API works (if publicly available) would be absolutely wonderful. Otherwise, I have to assume the "big players" have exclusive access through an agreement with Riot?

@tsevenhuysen

This comment has been minimized.

Copy link

@tsevenhuysen tsevenhuysen commented Jan 27, 2020

Basically, any commercial use (such as E1 Fantasy) is coming through a new paid API.

Any community access (OE, GoL.gg, wikis) is coming directly from contacts at Riot, who are doing the best they can to help out in the absence of an official community-facing solution.

So for non-commercial/community projects there is no programmatic solution at the moment. I hope there will be soon!

@xaxaxa111111

This comment has been minimized.

Copy link

@xaxaxa111111 xaxaxa111111 commented Mar 15, 2020

Hi Tim, have you found any resources for lpl with play-by-play matches? Thanks :) I saw your website and it's cool you offer free match data. great work!

@SeanDrum

This comment has been minimized.

Copy link

@SeanDrum SeanDrum commented Mar 15, 2020

My understanding is at least LCS and LEC are hosted on a completely different cluster of servers than the infrastructure that hosts regular SoloQ etc. data and stats. I think Riot refers to them as "realms" but I'm not sure. That's why you can't just access esports data the same way you can any other account, the server cluster is different. LPL is a completely different infrastructure still, hosted by Tencent and not Riot. Last I checked (about 6 months ago) the official LPL website has a JSON-based RESTful API to power the stats on their pages. You could figure out how that works and get the data specifically for the LPL that way. Most of the fields are in Chinese so that's fun. :-)

As to how Tim manages to get that data? My guess it's a combination of manual and tapping the official LPL page.

I took a quick list in my bookmarks and I found these notes:
LPL Search by Year
http://apps.game.qq.com/lol/match/apis/searchBMatchInfo_bak.php?p8=5&p1=&p9=2017-07-06%2000:00:00&p10=2018-07-13%2023:59:59&p6=3&page=1&pagesize=100&r1=retObj&_=1530899983861

API Search for matches (bMatchId)
http://apps.game.qq.com/lol/match/apis/searchBMatchInfo_bak.php?p8=&p1=&p9=2018-07-06%2000:00:00&p10=2018-07-13%2023:59:59&p6=3&page=1&pagesize=10&r1=retObj&_=1530899983861

Get a list of games in this series
http://apps.game.qq.com/lol/match/apis/searchSMatchList.php?p0=3563

The actual data you want:
http://apps.game.qq.com/lol/match/apis/searchMatchInfo_s.php?p0=4390&r1=MatchInfo&_=1530896680313

@tsevenhuysen

This comment has been minimized.

Copy link

@tsevenhuysen tsevenhuysen commented Mar 16, 2020

@xaxaxa111111 You can use the info SeanDrum shared if you have any programming familiarity. :)

@xaxaxa111111

This comment has been minimized.

Copy link

@xaxaxa111111 xaxaxa111111 commented Mar 19, 2020

wow great find @SeanDrum. I will check it. Thanks for the information. Btw, I found this website thought you might get interested. https://www.wanplus.com/event/907.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment