Skip to main content

Track League of Legends Stats with Ease

A REST API built with Node.js and Express that provides real-time player statistics, ranked data, and detailed match history using the official Riot Games API

Quick Start

Get your API server running in just a few minutes

1

Clone the repository

Start by cloning the project from GitHub to your local machine.
git clone https://github.com/ValentinSetti/tracker-lol-backend.git
cd tracker-lol-backend
2

Install dependencies

Install all required Node.js packages using npm.
npm install
3

Set up your Riot API key

Create a .env file in the project root and add your Riot Games developer API key. You can obtain one from the Riot Developer Portal.
.env
RIOT_API_KEY=your_api_key_here
Keep your API key secure and never commit it to version control. The .env file is already included in .gitignore.
4

Start the server

Launch the API server on port 3000.
node index.js
You should see the message: Servidor corriendo en http://localhost:3000
5

Make your first request

Test the API by fetching player statistics. Replace PlayerName and TAG with an actual Riot ID.
curl http://localhost:3000/api/jugador/PlayerName/TAG
{
  "userTier": "PLATINUM",
  "userRank": "II",
  "userLps": 45,
  "userWins": 67,
  "userLosses": 52,
  "userLevel": 184,
  "userPic": 4923,
  "userId": "abc123def456..."
}

Key Features

Everything you need to build a League of Legends stats tracker

Player Profile & Rank

Fetch player level, profile icon, rank tier, LP, wins, losses, and calculated winrate for Solo/Duo queue

Match History

Retrieve paginated match history with detailed game data, KDA, items, and team statistics

Multiple Queue Support

Support for Ranked Solo/Duo, Normal games, ARAM, Clash, and Flexible queue types

Real-time Data

Direct integration with Riot Games API for live player statistics and match information

Ready to start tracking?

Follow the quickstart guide to get your API server running in minutes

Get Started Now

Build docs developers (and LLMs) love