League Of Legends Api

List of discipline features supported for League Of Legends

Platform(s) available: PC


League of Legends schedules, scores, odds, projections, stats, news, and images for all major USA sports. SportsDataIO provides sports API feed and database downloads to power your website and mobile applications. An all-inclusive Python framework for the Riot Games League of Legends API. We focus on making the data easy and fun to work with, while providing all the tools necessary to create a website or do data analysis.

League of legends api python

The Riot Games Tournaments Rest API endpoint is located at You can find the Riot Games portal / hompage here. If you need Riot Games Tournaments Rest API support, you can contact support directly at [email protected], or reach out to their Twitter account at @riotgames. The Riot Games Tournaments Rest API requires API Key authentication. Comprehensive League of Legends wiki with articles covering everything from champions, to strategies, to tournaments, to competitive players and teams. Lol-client-java-api - Java library for connecting to LCU through API and websocket. GlassLCU - C#.NET library that allows you to communicate with the LCU in a typed and always up-to-date manner. Lcu-sharp - An C# API wrapper for the League of Legends client. RiftExplorer - Electron application to explore the LCU API.

This documentation will walk you through the specifications of this discipline to leverage the Toornament LOL API.

Each discipline feature has a type that defines its options. Here is the list of available features for League Of Legends.



Game Player ID


League of Legends stats
League of Legends Tournament code

League Of Legends Api Data

League Of Legends Api


Feature(s) for Game Player ID

This feature is a game player Id type.

The game player id feature enables a player identifier custom field in the tournament. It adds the associated custom fields in the list of available custom fields, see Custom Fields - Games.

Feature nameGame player IDAdded by defaultDefault labelDefault requiredDefault public

Feature 'league_of_legends'

This feature is a League Of Legends stats type.

Exiftool pro apk

League Of Legends stats

Enables the recovery of statistics from the Riot League of Legends API.

Feature 'tournament_code'

This feature is a League Of Legends tournament code type.

League Of Legends Tournament code

Enables the Tournament Code system of League Of Legends.

16. August 2016

TL;DR In this post I show you how to get comfortable with Riot's League of Legends API. We'll build a script to query the outcome of a summoner's last game. You can see the final Ruby script here – download it, insert your API-key and and run it:

Yeah, I admit it, I enjoy playing League of Legends from time to time. In this realtime MMO gamers play together as team and try to overcome their opponents' base. Each game lasts for ~45 minutes and produces, in addition to a rollercoaster ride of emotions, also loads of data.

Because I'm also a developer I like to play with these data and build small scripts to get more information about me or fellow players. That's possible because Riot provides these data via a JSON-API that registered users have access to.

Many services have been created around this API, like lolking.net or champion.gg to provide players with additional stats and infos about themselves and their oponents. In this post I want to show you how you can access this API with a few lines of simple ruby code.

1. Find a use case

Before we start let's think about what we like to build.

In this post I'd like to build a simple cli Ruby script that shows basic infos about the last game of a specific player (also called 'summoner' in LoL-speak).

So if I want to know, how the last game of high elo player 'Imaqtpie' from North America (NA) went, I'd like to to do this:

2. Request an API-Key for the Riot Games API

Before we can start using the API, we have to request an access key, which Riot uses to prevent unauthorized or abusive usage.

Head over to Riot's developer page and sign in with your League of Legends account credentials. On the next page you should find a section 'MY DEVELOPMENT API KEY' already showing your personal API-Key (like 550e8400-e29b-11d4-a716-446655440000).

3. Build a simple Ruby script

Enough talking!

3.1 Basics

Before we start sending requests, let's set up some basics first:

At first we require some libraries we are going to rely on – don't worry, those are all standard libraries which every Ruby environment has installed by default.

Then the API-key we got from Riot earlier gets defined – please insert your own key you got earlier here.

Last but not least we set summoner name and region, the latter defaulting to West Europe (since I'm from Germany).

3.2 What we want

League Of Legends Api Key

Let's pretend for a second we already wrote the main logic and we just needed to invoke it – how would that look like? I went with this:

We instantiate an object called Summoner and tell it to print some infos.

Of course there is no Summoner class – yet!

3.3 The main logic

Now we have to create both, the Summoner class and the invoked method Summoner#print_recent_game_info. Let's do this:

The class descends from Struct.new which is a helper Ruby provides that enables us to initialize a Summoner with :name and :region without having to deal with cluttering #initialize code.

League of legends guilds

In #print_recent_game_info's first line we collect all data needed for the output. It calls Summoner#recent_game – another method which we have yet to define. We extract information from the API's response and format it, so we can output a nice date, or get an expressive answer for the game's outcome.

Then info gets mixed with a string template, which results in the final output we want.


3.3.1 #recent_game

Let's see what Summoner#recent_game does:

There are multiple things happening in one line here – let's start with this long string in line 8. It's the API's endpoint we need to call if we want information about a summoner's recent game. It has two dynamic components: The Summoner#region, which got set by the constructor, and Summoner#summoner_id, which needs to determine the ID Riot is using internally to identify Summoners and isn't implemented yet.

The endpoint-url-string gets passed into Summoner#get_from_api, which returns the games data hash from Riot's API. We immediately grab 'games' that contains an array of game-hashes (check the API-documentation for more info on the data structure), and return the first entry (which should be the youngest one).

3.3.2 #summoner_id

Before we can query for the summoner_id, we need to standardize the summoner name – we do that and store the result in standardized_summoner_name. Then we build the endpoint path, execute the request and fetch the id from the resulting hash. I use fetch here because it immediately complains if a key is missing.

3.4 The API call

Last but not least we need to make the actual API call:

At first we build an URI object containing host, path and the API key. We then build a new HTTP-object for the API, enable SSL, and do a JSON get request. http.request's response gets saved in, well, response. Last but not least we check for the response-type with a case statement to handle success or failure. If you, for example, mistype the summoner-name Riot will return a 404 – since that can happen more often than not we are going to handle that by checking for the response type Net::HTTPNotFound. Anything but success and not found will be put into a more generic error message and will help us debugging problems.

And that's it! Check the final script here and try it for yourself – with relatively low effort we can query League of Legends' API for all kinds of data. Check Riot's formidable documentation to learn what else can be done – you could for example build a Summoner#current_game that shows a summoner's live stats and items while he is in a game.

League Of Legends Api Javascript