Skip to content

Developing with the Community: The Riot API

Riot··1 votes·14,767 views

We recently announced the winners of our 2nd API challenge, and the dev community continues to grow. Read about the origin of the API below.

Almost two years ago, we opened the digital floodgates and sent League data rushing out into the community via a new application programming interface (API). Requests (known as “calls”) through the API went directly into our game servers, offering up terabytes of juicy data for community devs to devour. What began as a weapon against unauthorized attempts to siphon raw data from live servers (known as scraping) became a powerful collaborative tool for devs both inside and outside of Riot.

Riot’s Developer Relations team works with the League community’s creators and purveyors of third-party apps, features, and other programming wizardry. But, “It was a fight against scraping before it was about the community,” David Pritchett, Developer Relations specialist, admits. Developer Relations and Third Party Ecosystem manager J Eckert adds, “It was about protecting the player experience by protecting the platform. We needed to find a way to discourage third parties from scraping live servers and impacting server performance as a result.”

Back in 2011 and 2012, server platforms like Europe West were scaling at a rate none of our platform engineers had ever encountered before, and our old tech suffered stability issues. A few Rioters felt websites harvesting League data from our live servers could contribute to the problems we were seeing.

Sites would fake client sessions in order to scrape the servers -- they needed accounts to do that. So site owners and devs created bot accounts to send thousands of requests for game-related information. Eckert says, “The biggest negative impact players could feel was on log-in queues, because as soon as we would bring the servers back up, all of the bots would try and reconnect and clog the queue.” Normally there’s spacing between real players connecting, even if it’s just milliseconds, but with bots, they all log in at the same exact instant the servers return.

In addition to the potential stability problems and the definite log-in issues, “Scraping was, at least, white noise when we were troubleshooting,” explains Eckert. “There were a lot of connections and we didn’t know which ones were hurting us, and it was impossible to tell with all of the static, so we decided to try and get rid of some of it.” Cutting down on the thousands of extra requests for game data would either make things better, or we’d at least be closer to figuring out what was happening.

Pritchett points out, “There was never a smoking gun pointing back to scraping definitively [as the cause for service instability], but we knew it was happening, and it was happening on significant scale.”

Fan art by SizoW

Developing an official API wasn’t the first thing we tried in order to cut down on the rampant automated requests for large volumes of data. Pritchett points out, “Ban waves of accounts we knew were scraping did have at least some positive impact, but it wasn’t much.”

Enter a small group of Rioters who had it in their heart to get more data out to players. “There was a side project started by a Rioter who wrote the code basically overnight, like over a weekend, and that was the very, very early inception of [the API],” says Pritchett.

Teams working to maintain service stability realized that providing sites with official data would cut down on extraneous calls. Pritchett emphasizes, “The point was that we had a bunch of players with very valuable skillsets, who were using those skillsets to help other players, even if it was in ways that we might not have been fully comfortable with. By working with them to build this API (and the community around it), we could address player feedback and concerns in ways that are meaningful and faster to market than a big dev can usually provide.”

It wasn’t perfect. Pritchett is candid about the limitations of early implementations: “When we were first shopping around the API to a smaller group of sites, we were getting a ton of reasonable questions.” They would ask if the service was as stable, as data-heavy, or as useful as the scraping methods they were using before. Pritchett says, “We had to admit that in most cases the answer was, ‘Not yet.’”

Having identified those shortcomings , we took notes on what devs needed and what they expected from the API. Pritchett finishes, “We tried to tailor the service to fit those specifications to fully get those devs on-board with the project.” Eckert adds, “We’ve since been able to hit parity with the methods they were using to get data before.”

To the Developer Relations team, it all comes down to a really big carrot and a really small stick. Eckert describes the carrot, “We’re trying to make as many incentives as possible to work with us: sign up, get access to the API, get a lot more support, gain access to the community, talk to us one on one. It’s designed to be a huge bonus to be part of this.” As for the stick, he adds: “It’s not about punishments or penalties for coloring outside the lines, devs who choose to ignore the community just don’t receive the same resources and support.”

We love sharing our data and we’re excited every time someone finds a new use for the firehose of numbers gushing from of our servers. Now the API lives in three data centers around the world, servicing millions of calls to game servers in every Riot region for over a thousand independent devs. All the while protecting players from slowdown, disconnects, or other stability issues that might have otherwise been related to that kind of call volume.

In hindsight, the decision to start developing with the community through an official API was obvious, J Eckert concludes. “Passionate people who love the game and who know how to code are going to make stuff,” he says. “We just want to help them do it in a positive way.”

31 Comments

S H A Y C 019 votes

Please relase the MMR data so we can have that back now.

Sincerely, All of League

ph1234k3 votes

ESPECIALLY because other tools which guess MMR are going to be rendered ineffective by the encouragement of team play in ranked now. Playing games with friends and then analyzing the game results skews the analysis towards the group and not the individual.

Please please please, let our MMR go

BlackTecno4 votes

I would like to know if there would be a way to divide the neutral monster camps into sections rather than it just being simply "neutral monsters you've killed." I've started on an API recently for junglers (since that's my main) and wanted to utilize it so that it can show you what camps you clear the most, general patterns, ect. I know that's a bit much to ask, but I wanted to know if there was any way to draw lines between what monster camps are what?

Also if there was a way to show the positions of champions more frequently than every minute, then that would be really cool too!

RiotSargonas8 votes

{quoted}

I would like to know if there would be a way to divide the neutral monster camps into sections rather than it just being simply "neutral monsters you've killed." I've started on an API recently for junglers (since that's my main) and wanted to utilize it so that it can show you what camps you clear the most, general patterns, ect. I know that's a bit much to ask, but I wanted to know if there was any way to draw lines between what monster camps are what?

Also if there was a way to show the positions of champions more frequently than every minute, then that would be really cool too!

That's actually a pretty reasonable request, on the jungle champs. We've actually "grouped" the jungle information intentionally however. Jungle paths is a pretty specific play pattern for junglers, and if you have a uniquely identifiable jungle path you take on, say Jarvan when starting Blue team, then your opponents might be able to look that up and use it against you. Since this isn't the kind of information that would be available in the game through other methods, we would prefer to not make it available via the API either since it could provide an unfair advantage in knowledge.

As to champion positions, to the best of my knowledge 60 seconds is the rate at which we capture the data to the match stats database by design, so I'm not sure it's something we can easily increase.

BlackTecno4 votes

I wanted to give junglers something like "Krugs are your least cleared camp so you can try and give it to your top laner" I can see how it would affect you if an enemy were to look it up, but if it's a post game request (just showing you how many times you cleared the camp) then I don't see how that would show jungle pathing at all, since Gromp and Krugs are the usual starting camps, but are also one of the least cleared camps.

And if that's not possible I would at the very least like to see how much gold is earned from those neutral monster clears. I know it's a bit much to ask, but I want to see how much information I can relay to people to improve their gameplay.

MadManApocalypse2 votes

The argument that "unfair advantage in knowledge" is absolutely invalid in every way shape and form. You represent LoL as a competitive esport. Want to know what people do in other sports? They STUDY the enemy. To know what possible paths people take is actually fair. But if you do some simple thinking you'll realize this.

If Party A (Jungler) looks up his common paths, where junglers tend to die most, where fights break out. Then you will try to avoid it.

If Party B (Ganker) Looks up his enemies common paths, death locations and where fights break out, then you will try to go to it.

Now if parties A and B both have this information it does nothing but skew data more, creating an ever shifting change. What you're essentially saying is "Jungle path knowledge would be unfair." But the truth of the matter it would be such useless information because of how frequently it changes.

The only way this knowledge would be unfair is if only ONE party had the knowledge.

Rant over.

TL:DR The argument of unfair knowledge is invalid. There is intelligence, then counterintelligence. To not use the available knowledge is ignorance, and ignorance is death.

(Edit due to a very poor and misleading sentence in beginning)

BlackTecno5 votes

I actually agree with Riot Sargonas in the information of what camps are cleared and when would give a great amount of advantage. I personally don't enjoy the level 1 or 2 invade from a Lee Sin, and if they know my jungle path to say, "he always starts blue, let's take his red or kill their bot lane" would end up being more unfair than not. However what I was actually asking for was a little different. I wanted to be able to tally what camps you clear and how often you do so. I don't think it would show a path, but would give insight to what camps teammates can take without worrying if their actions would upset their jungler.

Although since position of every champ on the map is given every minute, I could easily figure out jungle pathing as well as first gank and clear speed. I don't know any jungler who can clear in less than 30 seconds. But oh well, I'll work with what they give me. It's their game after all.

Swizzle3 votes

👌👀👌👀👌👀👌👀👌👀 good shit go౦ԁ sHit👌 thats ✔ some good👌👌shit right👌👌th 👌 ere👌👌👌 right✔there ✔✔if i do ƽaү so my self 💯 i say so 💯 thats what im talking about right there right there (chorus: ʳᶦᵍʰᵗ ᵗʰᵉʳᵉ) mMMMMᎷМ💯 👌👌 👌НO0ОଠOOOOOОଠଠOoooᵒᵒᵒᵒᵒᵒᵒᵒᵒ👌 👌👌 👌 💯 👌 👀 👀 👀 👌👌Good shit

RiotSargonas3 votes

Hey all! It was a lot of fun sitting down for this talk, and if anyone has any related questions we're happy to try and answer them!

SpongeBobLilFeng2 votes

JarvanIV summoner 1 item 3001

Hammy W hamster2 votes

I saw that there were 700+ of those splash tiles for each champion skin in the PBE, will these be available in the API?

Reaper85121 votes

I usually ca keep up with tech talk, but I have no idea what this is all about

BlackTecno2 votes

API programs are the sites you use to look up information about your games. OP.GG, LoLKing, Carry.gg (RIP), even League of Legend's Match History. The programs grab the data you want, and sort it out into useful information. Basically all they're saying is how the API development program started, where anyone can actually make these kinds of programs. If you want to look at a match and the sea of data that these programs sort through, here's one of my games: http://jpst.it/D546 These are actually just player information. There's a whole timeline that follows if you want it, giving the play by play every 60 seconds, as well as events like champion kills, dragon and baron kills, ect. However this was too big for this site to handle apparently XD

viceandfirecats1 votes

Singed hes so hard to play

viceandfirecats1 votes

item 3115 item 3115 item 3115 item 3115 item 3115 item 3115 MissFortune so op

viceandfirecats1 votes

moooooooooooooooooooooooooooooooooooooooooooooooooooooooUdyr i a cow

viceandfirecats1 votes

summoner 31 sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss

Save1 votes

Bring back old Gragas please.

Victorapple1 votes

I don't understand a single thing this editorial is talking about

jerrychaoshen1 votes

can we have a piltover blitz skin? Blitzcrank Blitzcrank Blitzcrank Blitzcrank Blitzcrank Blitzcrank Blitzcrank Blitzcrank Blitzcrank

InsaneSamurai1 votes

So you guys really think its ok to let players virtually stalk each other via third party websites and use that information as fuel for griefing and trolling? Wait isn't that the same reason you said no to sandbox mode, fuel for griefing and trolling....

Lonely Lolita

Ahri

More from Announcements