Spectate league of legends game and retrive data

1.7k Views Asked by At

I want to code a script to retrieve data from league of legends game while spectating. I want to open the league of legends client, join a game as a spectator, then run the script, and the script collects all the game data, champ damage, gold etc and save that to a json file.then display that data nicely on a webpage and the gold and players damage as graphs.

Does riot games apis provide such a thing or if there's anything on GitHub I can use for this kinda job?

3

There are 3 best solutions below

0
On

There's an API for downloading the match timeline which is probably what you're after. There's no need to spectate a game to get it, you just need to register for an API key, and then you can download it using the match ID.

0
On

I didn't tried this, but I think LCU API can help you.
You can may open League of Legend client and join as a spectator with this.

But unfortunately, there is no official LCU API documentation, so you can see this documentation.

I hope I can help you.

0
On

The way I was able to get around it is by using ocr to read the screen, I can grab anything that is displayed, but for damage currently there is no way. If you want a gold graph its best to make it yourself in python.