League of Legends

Overview

This set of documentation will help you gain a better understanding of how to use the APIs and developer resources related to League of Legends. It is designed to help you begin developing your own tools and products for the League of Legends player community.

Getting Started

Before starting on a product for League of Legends, there are two requirements every developer must complete:

  1. Read the general policies
  2. Register your product

Only after developers have read the policies and registered their product on the Developer Portal are they granted a limited license to use Riot Games’ intellectual property (IP) outlined in the Legal Jibber Jabber.

Before you start reading this documentation you need to first login with your Riot Games account. Once you do, a Developer Portal account is created for you! This action also generates a basic development API key that is associated with your account. Parts of this documentation will reference trying things out in the API Reference page. While this documentation is by no means exhaustive we believe it will give you a great start toward building products in the League of Legends ecosystem. As always, if you run into any difficulties or are having technical issues please join Developer Discord for support.

Uptime

There is currently no service-level agreement (SLA) for the Riot Games API.

General

Game Constants

When looking up specific seasons, queues, maps and modes it is important to use the correct ids.

Seasons

Season ids are used in match history to indicate which season a match was played. A full list of season ids can be found in the file below.

seasons.json

[
    {
        "id": 0,
        "season": "PRESEASON 3"
    },
    ...
]

Queue Ids

Queue ids show up in several places throughout the API and are used to indicate which kind of match was played. A full list of queue ids can be found in the file below.

queues.json

[
    {
        "queueId": 0,
        "map": "Custom games",
        "description": null,
        "notes": null
    },
    ...
]

Maps

Map ids are used in match history to indicate which map a match was played. A full list of map ids can be found in the file below.

maps.json

[
    {
        "mapId": 1,
        "mapName": "Summoner's Rift",
        "notes": "Original Summer variant"
    },
    ...
]

Game Modes

A full list of game modes can be found in the file below.

gameModes.json

[
    {
        "gameMode": "CLASSIC",
        "description": "Classic Summoner's Rift and Twisted Treeline games"
    },
    ...
]

Game Types

A full list of game types can be found in the file below.

gameTypes.json

[
    {
        "gameType": "CUSTOM_GAME",
        "description": "Custom games"
    },
    ...
]

Ranked Info

Queue Types

The leagues endpoints return a field called queueType that will indicate what map/mode that player played. Depending on the queueType the highestTierAchieved field will return the highest ending tier for the previous season from a group of ranked queues.

Here is a list of all of the queueType and highestTierAchieved for each.

Summoner's Rift

Unranked
    RANKED_SOLO_5x5
    RANKED_TEAM_5x5
Ranked Solo/Duo
    RANKED_SOLO_5x5
Ranked Team 5x5
    RANKED_TEAM_5x5

Other Maps

If a match is not played on Summoner's Rift, the highestTierAchieved field will return the highest ending tier for the previous season from any ranked queue.

Icons and Emblems

The emblems and position assets for all ranks after Ranked Remastered update can be found below.

ranked-emblems.zip
ranked-positions.zip

The old tier icon assets from before the Ranked Remasted update can be found below.

tier-icons.zip

Data Dragon

Data Dragon is our way of centralizing League of Legends game data and assets, including champions, items, runes, summoner spells, and profile icons. All of which can be used by third-party developers. You can download a gzipped tar file (.tar.gz) for each patch which will contain all assets for that patch.

https://ddragon.leagueoflegends.com/cdn/dragontail-9.20.1.tgz

Please be aware that updating Data Dragon after each League of Legends patch is a manual process, so it is not always updated immediately after a patch. Your patience is appreciated.

Realms & Versions

Data Dragon versions aren't always equivalent to the League of Legends client version. You can find all valid Data Dragon versions and realms by using the following:

https://ddragon.leagueoflegends.com/realms/na.json
https://ddragon.leagueoflegends.com/api/versions.json

Data & Assets

Data Dragon provides two kinds of static data; data files and game assets. The data files provide raw static data on various components of the game such as summoner spells, champions, and items. The assets are images of the components described in the data files.

Data Files

The data file urls include both a version and language code. The examples in the documentation below use version 9.20.1 and the en_US language code. If you want to view assets released in other versions or languages you can replace the version or language code in the url.

Languages

Data Dragon provides localized versions of each of the data files in languages supported by the client. Below is a list of the languages supported by Data Dragon, which you can also retrieved from the Data Dragon languages file.

https://ddragon.leagueoflegends.com/cdn/languages.json

CODE LANGUAGE
cs_CZ Czech (Czech Republic)
el_GR Greek (Greece)
pl_PL Polish (Poland)
ro_RO Romanian (Romania)
hu_HU Hungarian (Hungary)
en_GB English (United Kingdom)
de_DE German (Germany)
es_ES Spanish (Spain)
it_IT Italian (Italy)
fr_FR French (France)
ja_JP Japanese (Japan)
ko_KR Korean (Korea)
es_MX Spanish (Mexico)
es_AR Spanish (Argentina)
pt_BR Portuguese (Brazil)
en_US English (United States)
en_AU English (Australia)
ru_RU Russian (Russia)
tr_TR Turkish (Turkey)
ms_MY Malay (Malaysia)
en_PH English (Republic of the Philippines)
en_SG English (Singapore)
th_TH Thai (Thailand)
vn_VN Vietnamese (Viet Nam)
id_ID Indonesian (Indonesia)
zh_MY Chinese (Malaysia)
zh_CN Chinese (China)
zh_TW Chinese (Taiwan)

Champions

There are two kinds of data files for champions. The champion.json data file returns a list of champions with a brief summary. The individual champion JSON files contain additional data for each champion.

http://ddragon.leagueoflegends.com/cdn/9.20.1/data/en_US/champion.json
http://ddragon.leagueoflegends.com/cdn/9.20.1/data/en_US/champion/Aatrox.json

Interpreting Spell Text

Lore, tips, stats, spells, and even recommended items are all part of the data available for every champion. Champion spell tooltips often have placeholders for variables which are signified by double curly brackets. Below are some tips about interpreting these placeholders:

{{ eN }} placeholders
Placeholders are replaced by the corresponding item in the array given in the effectBurn field (e.g., {{ eN }} is a placeholder for spell["effectBurn"]["1"]).

/* Amumu's Bandage Toss */
"tooltip": "Launches a bandage in a direction. If it hits an enemy unit, Amumu pulls himself to them, dealing {{ e1 }} <scaleAP>(+{{ a1 }})</scaleAP> magic damage and stunning for {{ e2 }} second.",
"effectBurn": [
  null,
  "80/130/180/230/280",
  "1",
  "1350",
  ...
]

{{ aN }} or {{ fN }} placeholders
These placeholders are slightly more complicated. Their values can be found in the vars field. First, find the object in the vars array whose key matches the variable (e.g., for {{ a1 }}, find the object in the vars array whose key field has the value a1). The value for this variable is the coeff field in that same object.

/* Amumu's Bandage Toss */
"tooltip": "Launches a bandage in a direction. If it hits an enemy unit, Amumu pulls himself to them, dealing {{ e1 }} <scaleAP>(+{{ a1 }})</scaleAP> magic damage and stunning for {{ e2 }} second.",
"vars": [
  {
    "key": "a1",
    "link": "spelldamage",
    "coeff": [
      0.7
    ]
  }
]

Under a champions spells there are two fields effect and effectBurneffect contains an array of an ability's values per level where, in contrast, effectBurn contains a string of all the values at every level. (e.g., "effect": [30,60,90,120,150] vs "effectBurn": "30/60/90/120/150"). You might notice how the effect and effectBurn arrays have a null value in the 0 index. This is because those values are taken from designer-facing files where arrays are 1-based. JSON is 0-based so a null is inserted to make it easier to verify the JSON files are correct.

"effect": [
  null,
  [ 120, 150, 180, 210, 240 ],
  [ 50, 70, 90, 110, 130 ],
  [ 25, 35, 45, 55, 65 ],
  [ 0.2, 0.2, 0.2, 0.2, 0.2 ],
  [ 50, 60, 70, 80, 90 ]
],
"effectBurn": [
  "",
  "120/150/180/210/240",
  "50/70/90/110/130",
  "25/35/45/55/65",
  "0.2",
  "50/60/70/80/90"
]

Calculating Spell Costs

In most cases a spell costs mana or energy, you'll find those related costs under the cost and costBurn fields. When a spell costs health, the cost will be found in the effect and effectBurn fields. You should always be able to determine how to calculate the cost of a spell by looking at the resource field which should point you to the variable being used to display the cost of a spell.

/* Soraka's Astral Infusion */
"resource": "10% Max Health, {{ cost }} Mana",
"cost": [ 20, 25, 30, 35, 40 ],
"costBurn": "20/25/30/35/40"
/* Shen's Vorpal Blade */
"resource": "{{ cost }} Energy",
"cost": [ 60, 60, 60, 60, 60 ],
"costBurn": "60"
/* Dr. Mundo's Infected Cleaver */
"resource": "{{ e3 }} Health",
"cost": [ 0, 0, 0, 0, 0 ],
"costBurn": "0",
"effect": [
  null,
  [ 80, 130, 180, 230, 280 ],
  [ 15, 18, 21, 23, 25 ],
  [ 50, 60, 70, 80, 90 ],
  [ 40, 40, 40, 40, 40 ],
  [ 2, 2, 2, 2, 2 ]
],
"effectBurn": [
  "",
  "80/130/180/230/280",
  "15/18/21/23/25",
  "50/60/70/80/90",
  "40",
  "2"
]

Champion Splash Assets

http://ddragon.leagueoflegends.com/cdn/img/champion/splash/Aatrox_0.jpg

The number at the end of the filename corresponds to the skin number. You can find the skin number for each skin in the file for each individual champion in Data Dragon. Each champion contains a skins field and the skin number is indicated by the num field.

/* Aatrox (id: 266) */
"skins": [
  {
    "id": 266000,
    "name": "default",
    "num": 0
  },
  {
    "id": 266001,
    "name": "Justicar Aatrox",
    "num": 1
  },
  {
    "id": 266002,
    "name": "Mecha Aatrox",
    "num": 2
  }
]

Champion Loading Screen Assets

http://ddragon.leagueoflegends.com/cdn/img/champion/loading/Aatrox_0.jpg
The number at the end of the filename follows the same convention described in the Champion Splash Art.

Champion Square Assets

http://ddragon.leagueoflegends.com/cdn/9.20.1/img/champion/Aatrox.png

Champion Passive Assets

http://ddragon.leagueoflegends.com/cdn/9.20.1/img/passive/Anivia_P.png

You can find the filename for each champion's passive in the individual champion Data Dragon file. The JSON contains a passive field with image data. The filename is indicated by the full field.

/* Anivia (id: 34) */
"passive": {
  "name": "Rebirth",
  "description": "Upon dying, Anivia will revert into an egg. If the egg can survive for six seconds, she is gloriously reborn.",
  "sanitizedDescription": "Upon dying, Anivia will revert into an egg. If the egg can survive for six seconds, she is gloriously reborn.",
  "image": {
    "full": "Anivia_P.png",
    "sprite": "passive0.png",
    "group": "passive",
    "x": 240,
    "y": 0,
    "w": 48,
    "h": 48
    }
  }
} 

Champion Ability Assets

http://ddragon.leagueoflegends.com/cdn/9.20.1/img/spell/FlashFrost.png

You can find the filename for each champion's abilities in the individual champion Data Dragon file. The spells field contains an array of objects which includes image data. The filename is indicated by the full field.

/* Anivia (id: 34) */
"spells": [
  {
    "name": "Flash Frost",
    "key": "FlashFrost",
    "description": "Anivia brings her wings together and summons a sphere of ice that flies towards her opponents, chilling and damaging anyone in its path. When the sphere explodes it does moderate damage in a radius, stunning anyone in the area.",
    "sanitizedDescription": "Anivia brings her wings together and summons a sphere of ice that flies towards her opponents, chilling and damaging anyone in its path. When the sphere explodes it does moderate damage in a radius, stunning anyone in the area.",
    "image": {
      "full": "FlashFrost.png",
      "sprite": "spell0.png",
      "group": "spell",
      "x": 192,
      "y": 144,
      "w": 48,
      "h": 48
    }
  },
  ...
]

Items

Data Dragon also provides the same level of detail for every item in the game. Within Data Dragon you can find info such as the item's description, purchase value, sell value, items it builds from, items it builds into, and stats granted from the item.

http://ddragon.leagueoflegends.com/cdn/9.20.1/data/en_US/item.json

There is a field called effect which holds an array of variables used extra scripts. As an example, on Doran's shield you see the following data in the effect field, which corresponds to the 8 damage that is blocked from champion attacks.

"effect": {
  "Effect1Amount": "8"
}

Stat Naming Conventions

A list of possible stats that you gain from items, runes, or masteries can also be found in Data Dragon. You can find a list of stats gained by the item, rune, or mastery by searching for the stats field. Below are some tips when it comes to understanding what a stat means and how they are calculated:

  • Mod stands for modifier.
  • An "r" at the beginning of the stat means those stats can be found on runes.
  • Displaying flat vs. percentage vs. per 5 etc. is unfortunately case by case. For a given stat, though, it will always be the same. (e.g., PercentAttackSpeedMod you always multiply by 100 and display it as a percentage)
  • Stats are called flat if you add them together, and percent if you multiply them together.
  • Tenacity from an item does NOT stack but tenacity from a rune DOES stack.

Item Assets

http://ddragon.leagueoflegends.com/cdn/9.20.1/img/item/1001.png
The number appended to the item filename corresponds to the item id. You can find a list of the items ids in the item data file.

Other

Summoner Spells

http://ddragon.leagueoflegends.com/cdn/9.20.1/data/en_US/summoner.json
http://ddragon.leagueoflegends.com/cdn/9.20.1/img/spell/SummonerFlash.png

Profile Icons

http://ddragon.leagueoflegends.com/cdn/9.20.1/data/en_US/profileicon.json
http://ddragon.leagueoflegends.com/cdn/9.20.1/img/profileicon/685.png

Minimaps

http://ddragon.leagueoflegends.com/cdn/6.8.1/img/map/map11.png
The number appended to the map filename corresponds to the map id. You can find a list of the map ids in the Map Names section of Game Constants.

Sprites

http://ddragon.leagueoflegends.com/cdn/9.20.1/img/sprite/spell0.png

Scoreboard Icons (version 5.5.1)

http://ddragon.leagueoflegends.com/cdn/5.5.1/img/ui/champion.png
http://ddragon.leagueoflegends.com/cdn/5.5.1/img/ui/items.png
http://ddragon.leagueoflegends.com/cdn/5.5.1/img/ui/minion.png
http://ddragon.leagueoflegends.com/cdn/5.5.1/img/ui/score.png
http://ddragon.leagueoflegends.com/cdn/5.5.1/img/ui/spells.png

Riot Games API

Tournament API

League of Legends leverages custom game lobbies to support developers that want to build Tournaments for players. Custom games can utilize Tournament Codes that help you quickly and easily get players into private custom game lobbies with preset game settings (map, pick type, etc). At the completion of each Tournament Code enabled game the results will be forwarded automatically (HTTP POST) to a URL specified by the tournament developer.

When getting started with the Tournaments API it is important to understand what you can do with it:

  1. Register tournament providers and tournaments in a specific region/shard and its callback URL.
  2. Generate tournament codes for a given tournament.
  3. Receive game results in the form of an automatic callback (HTTP POST) from League of Legends servers whenever a game created using tournament code has been completed.
  4. Use match identifier (matchID) received in the callback to pull full stats data for the given match.
  5. Pull end of game data based on given tournament code in case the callback is never received.
  6. Query pre-game lobby player activity events for a given tournament code.

Tournament API Notes

  • Tournament providers are strongly associated with API keys, regenerating an API key will require a new provider.
  • Though tournament codes can be re-used to generate additional lobbies. For best results with callbacks and Match-v4 lookups, we recommend only creating a single match with a tournament code.
  • Lobby events should only be used to audit Tournament matches as needed. In rare cases lobby events may get dropped. Using lobby events to programmatically progress a tournament or to forfeit participants is not advised.
  • Tournaments will expire if there are no active codes associated with the tournament. Tournament codes are eligible for expiration three months after they're generated. Because tournaments and their codes can expire, creating them as close to the event as possible ensures no disruptions. For the best results we suggest the following:
    • Create a tournament no more than a week before the start of the first match.
    • Upon creation of the tournament, generate a code to ensure the tournament has an active tournament code associated with it (thereby making ineligible for cleanup).
    • Tournament codes should be generated as needed, not all at once at the start of the event.

Tournaments API Structure

The Tournaments API introduces a simple parent-child data structure to ensure data model consistency:

Tournaments API Methods

Access to the Tournaments API provides several new methods that can be viewed on the API Reference page. We suggest exploring every method to get more information on actual usage including the format and description of parameters you can supply.

Full overview of all methods and their functionality is provided in the diagram below:

Best Practices

To preserve the quality of the tournaments service, your Tournaments API Key may be revoked if you do not adhere to the following best practices:

  • Respect the rate limit for your Tournament API Key and implement logic that considers the headers returned from a 429 Rate Limit Exceeded response.
  • Implement logic to detect unsuccessful API calls and back off accordingly. Please notify us if you believe your application is working correctly and you are receiving errors, but don't continue to slam the tournaments service with repeatedly unsuccessful calls.
  • Generate tournaments and tournament codes only as needed in production and development. Please don't create 1,000 tournament codes for a 10 game tournament. As a reminder, you can always create additional tournament codes as your tournament grows.
  • Tournaments and tournament codes should be generated within a reasonable time in relation to the event. Don't pre-create tournaments and tournament codes at the start of the year and use them as the year progresses, but rather generate the tournament and codes as the event is announced and participants sign up.

Use Case Example

Presume there is a tournament website created for League of Legends players that does the following:

  • Announces tournament and rules
  • Registers players/teams
  • Generates/renders tournament brackets
  • Seeds registered teams across the brackets
  • Sends invites for matched teams to play their games
  • Collects end of game results from team captains
  • Provides new matches for teams that advance
  • Officiates for situations when something goes wrong (no show, etc)

The Tournaments API is designed to help automate the last four mentioned functions of tournament websites.

It is recommended to register a tournament provider (specifying region/shard and URL for results) well in advance and do a full loop testing to ensure everything is setup properly for your web service.

GENERATING TOURNAMENT CODES

To generate actual tournament codes follow the steps below:

  1. Use /lol/tournament/v4/providers API endpoint to register as a provider in specific region while also setting a URL to be used for receiving game results notifications (HTTP POST). Returns providerID.
  2. Use providerID to register a tournament for given Tournament Provider. Receive tournamentID in return.
  3. Use tournamentID to generate one or more tournament codes for a given tournament using specific game settings (map, spectator rules, pick type etc).
    • A tournament code should only be used to create a single match. If you reuse a tournament code the server callback will not return stats for each match.
    • The method to generate tournament codes will return up to 1,000 tournament codes at a time. If needed, additional calls to this method can be made to create additional tournament codes.
    • Stale or unused tournament codes may be purged after a period of inactivity.

Tournament organizers can generate all the tournament codes they need in advance or generate them as necessary per each phase as shown below:

SERVER CALLBACK

When a game created using tournament code has completed, the League of Legends servers will automatically make a callback to the tournament provider's registered URL via HTTP POST. Below are a couple notes about how the server callback works.

The provider registration and callback mechanism are relatively inflexible. For best results, use one of the valid generic top level domains (gTLDs) listed below and use http over https for your callback url while using the metaData field to validate callbacks.

Port Restrictions
The server callback supports http (port 80) and https (port 443) however Certificate Authorities (CA) approved after Jan 29, 2012 aren't supported. The callback server won't perform a callback if it is unable to validate an SSL cert issued by an unknown CA (and therefore doesn't trust).

Domain Restrictions
Only valid gTLDs approved by ICANN before March 2011 are considered valid. This excludes newer gTLDs such as (.mail, .xxx, .xyz, etc.)

Valid gTLDs (approved before March 2011)
aero, asia, biz, cat, com, coop, info, jobs, mobi, museum, name, net, org, pro, tel, travel, gov, edu, mil, int

Valid Country Code TLDs
ac, ad, ae, af, ag, ai, al, am, an, ao, aq, ar, as, at, au, aw, ax, az, ba, bb, bd, be, bf, bg, bh, bi, bj, bm, bn, bo, br, bs, bt, bv, bw, by, bz, ca, cc, cd, cf, cg, ch, ci, ck, cl, cm, cn, co, cr, cu, cv, cx, cy, cz, de, dj, dk, dm, do, dz, ec, ee, eg, er, es, et, eu, fi, fj, fk, fm, fo, fr, ga, gb, gd, ge, gf, gg, gh, gi, gl, gm, gn, gp, gq, gr, gs, gt, gu, gw, gy, hk, hm, hn, hr, ht, hu, id, ie, il, im, in, io, iq, ir, is, it, je, jm, jo, jp, ke, kg, kh, ki, km, kn, kp, kr, kw, ky, kz, la, lb, lc, li, lk, lr, ls, lt, lu, lv, ly, ma, mc, md, me, mg, mh, mk, ml, mm, mn, mo, mp, mq, mr, ms, mt, mu, mv, mw, mx, my, mz, na, nc, ne, nf, ng, ni, nl, no, np, nr, nu, nz, om, pa, pe, pf, pg, ph, pk, pl, pm, pn, pr, ps, pt, pw, py, qa, re, ro, rs, ru, rw, sa, sb, sc, sd, se, sg, sh, si, sj, sk, sl, sm, sn, so, sr, st, su, sv, sy, sz, tc, td, tf, tg, th, tj, tk, tl, tm, tn, to, tp, tr, tt, tv, tw, tz, ua, ug, uk, um, us, uy, uz, va, vc, ve, vg, vi, vn, vu, wf, ws, ye, yt, yu, za, zm, zw

  • The callback from the League of Legends server relies on a successful response from the provider's registered URL. If a 200 response is not detected, there is a retry mechanism that will make additional attempts. In the rare occasion that a callback is not received within 5 minutes, you can assume the callback failed.
  • If you need to change your provider callback URL, you can register a new provider but remember tournaments generated with the old provider will continue to make callbacks to the old provider callback URL.

When a game created using Tournament Code has completed, the League of Legends servers will automatically make a callback to the tournament provider's registered URL via HTTP POST. Below are a couple notes about how the server callback works.

If you're having trouble debugging your logic, use the following cURL to mimic the behavior of the callback.

curl <callback_url> -X POST -H "Content-Type: application/json" -d '<response_body>'

Below is a sample JSON response returned by the League of Legends servers when a callback is made.

{
  "startTime": 1234567890000,
  "winningTeam": [
    {
      "summonerName": "Summoner Name"
    },
    {
      "summonerName": "Summoner Name"
    },
    {
      "summonerName": "Summoner Name"
    },
    {
      "summonerName": "Summoner Name"
    },
    {
      "summonerName": "Summoner Name"
    }
  ],
  "losingTeam": [
    {
      "summonerName": "Summoner Name"
    },
    {
      "summonerName": "Summoner Name"
    },
    {
      "summonerName": "Summoner Name"
    },
    {
      "summonerName": "Summoner Name"
    },
    {
      "summonerName": "Summoner Name"
    }
  ],
  "shortCode": "NA1234a-1a23b456-a1b2-1abc-ab12-1234567890ab",
  "metaData": "{\"title\":\"Game 42 - Finals\"}",
  "gameId": 1234567890,
  "gameName": "a123bc45-ab1c-1a23-ab12-12345a67b89c",
  "gameType": "Practice",
  "gameMap": 11,
  "gameMode": "CLASSIC",
  "region": "NA1"
}

LOBBY EVENTS

In addition to game stats related methods, the lobby-events/by-code/{tournamentCode} method that can help query pre-game lobby events. This is useful for building tournament administration system and be able to detect whether a game for a given tournament code started normally. This call can be made both after the match for the full timeline, and anytime during the lobby phase for a timeline of events up to that moment. Below is an example of the JSON returned for lobby events:

{
  "eventList": [
    {
      "timestamp": "1234567890000",
      "eventType": "PracticeGameCreatedEvent", //Lobby Created
      "summonerId": "12345678"
    },
    {
      "timestamp": "1234567890000",
      "eventType": "PlayerJoinedGameEvent", //Player Joins Lobby
      "summonerId": "12345678"
    },
    {
      "timestamp": "1234567890000",
      "eventType": "PlayerSwitchedTeamEvent", //Player Switches Teams
      "summonerId": "12345678"
    },
    {
      "timestamp": "1234567890000",
      "eventType": "PlayerQuitGameEvent", //Player Leaves Lobby
      "summonerId": "12345678"
    },
    {
      "timestamp": "1234567890000",
      "eventType": "ChampSelectStartedEvent"  //Champ Select Begins
    },
    {
      "timestamp": "1234567890000",
      "eventType": "GameAllocationStartedEvent"  //Loading Screen Begins
    },
    {
      "timestamp": "1234567890000",
      "eventType": "GameAllocatedToLsmEvent"  //Game Begins
    }
  ]
}

League Client

What is the League Client API?

In an article on the Riot Games Engineering Blog, there's an image that is useful for defining what we're classifying as "League Client APIs".

Specifically, we're referring to a set of protocols that the Chromium Embedded Framework (CEF) uses to communicate with a C++ Library that in turn communicates with the League of Legends platform. As you'll notice, the communications between the C++ library and the CEF all occur locally on your desktop. This is the League Client API. This service is not officially supported for use with third party applications.

NOTE: We provide no guarantees of full documentation, service uptime, or change communication for unsupported services. This team does not own any components of the underlying services, and will not offer additional support related to them.

What's next

Whether you're combining the Riot Games API and League Client API, or doing something by only using the League Client endpoints, we need to know about it. Either create a new application or leave a note on your existing application in the Developer Portal. We need to know which endpoints you're using and how you're using them in order to expand on current or future feature sets. If you have any questions please join the discord for help.

Game Client

Replay API

What is the Replay API?

The Replay API is a game client API that allows developers to adjust the in-game camera during replays. We have also released League Director, an open source tool which uses these APIs and will give a good jumping off point for any development.

Getting Started

By default the Replay API is disabled. To get started using the Replay API you will first need to enable the Replay API in the game client config. To do so you will need to locate where your game is installed and add the following lines to the game.cfg file:

Example file location:

C:\Riot Games\League of Legends\Config\game.cfg

Once you have enabled the Replay API, the game client will generate the Swagger v2 and OpenAPI v3 specs for the Replay API. At this point the Replay API is usable, but you'll receive an SSL cert error when making requests to the game client. You can ignore these errors or use the following root certificate authority to validate the game client's SSL cert.

ROOT CERTIFICATE LINK
OPENAPI LINK
SWAGGER LINK

Endpoints

  • GET /replay/game
    Information about the game client process.
  • GET /replay/playback
    Returns the current replay playback state such as pause and current time.
  • POST /replay/playback
    Allows modifying the playback state such as play / pause and the game time to seek to. All values are optional.
  • GET /replay/render
    Returns the current render properties.
  • POST /replay/render
    Allows modifying the current render properties. All values are optional.
  • GET /replay/recording
    Returns the current status of video recording. Poll this resource for progress on the output.
  • POST /replay/recording
    Post to begin a recording specifying the codec and output filepath. Subsequent GET requests to this resource will update the status.
  • GET /replay/sequence
    Returns the sequence currently being applied.
  • POST /replay/sequence
    Post to apply a sequence of keyframes that the replay should play. Post an empty object to remove the sequence.

Please keep in mind that the Replay API is only enabled on HTTPS when playing replays.

Here are some sample URLs

https://127.0.0.1:2999/replay/game
https://127.0.0.1:2999/replay/playback
https://127.0.0.1:2999/replay/render
https://127.0.0.1:2999/replay/recording
https://127.0.0.1:2999/replay/sequence
https://127.0.0.1:2999/swagger/v2/swagger.json
https://127.0.0.1:2999/swagger/v3/openapi.json