Post

Lookup.GG - A gaming statistics website

What is Lookup.GG?

Lookup.GG is a website that allows users to search for League of Legends players and view detailed statistics, including the number of games played on each champion. The site leverages the Riot Games API to fetch data, which is then stored in a MongoDB database and can be updated both manually and automatically. Hosted on a Hetzner server, Lookup.GG is developed in Python using the Flask framework.

The idea for Lookup.GG originated from my desire to track how many games I had played on a specific champion, as I couldn’t find any existing tools that met my needs. Additionally, I wanted to learn MongoDB and Flask, so I built a website that utilized both. The project, started in 2019, is entirely developed and maintained by me.

As of August 2024, Lookup.GG tracks approximately 15 million players and 102 million matches globally, with continuous development and new features on the way.

Demo

This is my profile and can be used as an example.

Features

  • Search for a player and view the number of games played on a champion.
  • View match timestamps.
  • Check champion mastery points for each player.
  • View the player’s last active time.
  • Track the number of username changes and their dates.
  • Automatically download and store up to 9 months of match history per player in the database for future use.
  • Multithreaded match downloading to speed up data retrieval.
  • Perform searches across all Riot API servers.
  • Filter matchlists by specific parameters, like champion, game type, server, game end result.
  • View detailed match information, with clickable player profiles.
  • Mark players as favorites for quick access to their profiles.
  • Ensure continued access to favorite players’ profiles, even if they change their account name or server.
  • Easily share profiles with others by simply copying and sharing the URL. If a specific match in the match history is viewed and you share that link, anyone who clicks on it will see the exact same match. For example, this link will direct users to the specific match history for the given player.

Images

Search Form

This is the search form, which supports lookups across all Riot API servers. Search Form Search Form servers

An example of filtering the matchlist with specific parameters, such as finding all ranked games played as Zyra. Matchlist Search

Example with the following parameters, Zyra, ranked, surrendered Matchlist Search Matchlist Search

Match Details

A detailed view of a match. Every player is clickable, directing you to their profile even if their name has changed, thanks to their unique profile ID. Match Details

Favorite Players

You can mark players as favorites for quick access to their profiles. Favorites
Favorites
Favorites List

Even if a player changes their account name, their unique player ID ensures you can always find them. Player ID

Source Code

The source code for Lookup.GG is currently not public.

Challenges

  • Riot limits data retrieval to roughly 9 months to 2 years, so all data is stored in the database for long-term access.
  • For players with extensive match histories, MongoDB’s document size limit can be an issue. To address this, we use GridFS for storing large data sets.

Tech Stack

  • Python
  • MongoDB
  • FastAPI (as of 2023)
  • Dedicated server hosted with hetzner
  • 2 VPS’s to seperate frontend and backend
  • Cloudflare
  • Redis cache
This post is licensed under CC BY 4.0 by the author.