Reference
API & data sources
Rift Index reads from two upstreams: Riot's Data Dragon CDN for static game data, and the Riot Games API for anything about a specific player. Every request runs server-side.
Data Dragon
Public, versioned, and unauthenticated — no key and no rate limit. It serves champion data and all the art, so champion browsing works with no setup at all.
| Endpoint | Path | Cached | Notes |
|---|---|---|---|
| versions | /api/versions.json | 12 hours | Latest live patch. Everything else is versioned against it. |
| champions | /cdn/{version}/data/en_US/champion.json | 12 hours | The full champion list used by the index and grid. |
| champion detail | /cdn/{version}/data/en_US/champion/{id}.json | 12 hours | Lore, abilities, base stats, and skins for one champion. |
| summoner spells | /cdn/{version}/data/en_US/summoner.json | 12 hours | Keyed by numeric id so match rows can show spell icons. |
| skin art (HEAD) | /cdn/img/champion/loading/{id}_{skin}.jpg | checked offline | Which skins have art. Precomputed, so no build requests. |
Riot Games API
Requires a key and is rate limited. Riot splits these across two host families — platform hosts (na1, euw1, kr…) and regional clusters (americas, europe, asia, sea) — and one region code maps to both.
| Endpoint | Path | Cached | Notes |
|---|---|---|---|
| account-v1 | /riot/account/v1/accounts/by-riot-id/{name}/{tag} | 1 hour | Resolves a Riot ID to the PUUID every other call needs. |
| summoner-v4 | /lol/summoner/v4/summoners/by-puuid/{puuid} | 5 minutes | Profile icon and summoner level. |
| league-v4 | /lol/league/v4/entries/by-puuid/{puuid} | 2 minutes | Ranked tiers. Falls back to by-summoner on older responses. |
| champion-mastery-v4 | /lol/champion-mastery/v4/champion-masteries/by-puuid/{puuid} | 5 minutes | Per-champion mastery levels and points. |
| champion-mastery-v4 | /lol/champion-mastery/v4/scores/by-puuid/{puuid} | 5 minutes | Total mastery score. Non-critical — failures don't break the page. |
| match-v5 | /lol/match/v5/matches/by-puuid/{puuid}/ids | 2 minutes | Recent match IDs. History doesn't reach back indefinitely. |
| match-v5 | /lol/match/v5/matches/{matchId} | 7 days | A finished match never changes, so it's cached aggressively. |
Setup
● A Riot API key is configured on this server.
- 1.Sign in at developer.riotgames.com and copy your development key.
- 2.Add it to
.env.localasRIOT_API_KEY=RGAPI-… - 3.Restart the dev server — env changes aren't picked up by hot reload.
Development keys expire after 24 hours
When yours lapses Riot returns 403 and player pages show an “API key expired” notice. Regenerate it and restart. Champion pages keep working either way.
Regions
The region code in a profile URL is the platform code. Note the tag in a Riot ID is notnecessarily the region — it's whatever the player set.
na1North Americaeuw1Europe Westeun1Europe Nordic & EastkrKoreabr1Braziljp1Japanla1Latin America Northla2Latin America Southoc1Oceaniatr1TürkiyeruRussiame1Middle Eastph2Philippinessg2Singaporeth2Thailandtw2Taiwanvn2Vietnam
Caching
Next 16 leaves fetch uncached by default, so every upstream call opts in explicitly with force-cache plus a revalidate window — without it a development key burns through its rate limit almost immediately. Champion pages revalidate every 12 hours; player pages every 2 minutes.