Rift Index

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.

EndpointPathCachedNotes
versions/api/versions.json12 hoursLatest live patch. Everything else is versioned against it.
champions/cdn/{version}/data/en_US/champion.json12 hoursThe full champion list used by the index and grid.
champion detail/cdn/{version}/data/en_US/champion/{id}.json12 hoursLore, abilities, base stats, and skins for one champion.
summoner spells/cdn/{version}/data/en_US/summoner.json12 hoursKeyed by numeric id so match rows can show spell icons.
skin art (HEAD)/cdn/img/champion/loading/{id}_{skin}.jpgchecked offlineWhich 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.

EndpointPathCachedNotes
account-v1/riot/account/v1/accounts/by-riot-id/{name}/{tag}1 hourResolves a Riot ID to the PUUID every other call needs.
summoner-v4/lol/summoner/v4/summoners/by-puuid/{puuid}5 minutesProfile icon and summoner level.
league-v4/lol/league/v4/entries/by-puuid/{puuid}2 minutesRanked tiers. Falls back to by-summoner on older responses.
champion-mastery-v4/lol/champion-mastery/v4/champion-masteries/by-puuid/{puuid}5 minutesPer-champion mastery levels and points.
champion-mastery-v4/lol/champion-mastery/v4/scores/by-puuid/{puuid}5 minutesTotal mastery score. Non-critical — failures don't break the page.
match-v5/lol/match/v5/matches/by-puuid/{puuid}/ids2 minutesRecent match IDs. History doesn't reach back indefinitely.
match-v5/lol/match/v5/matches/{matchId}7 daysA finished match never changes, so it's cached aggressively.

Setup

● A Riot API key is configured on this server.

  1. 1.Sign in at developer.riotgames.com and copy your development key.
  2. 2.Add it to .env.local as RIOT_API_KEY=RGAPI-…
  3. 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 America
  • euw1Europe West
  • eun1Europe Nordic & East
  • krKorea
  • br1Brazil
  • jp1Japan
  • la1Latin America North
  • la2Latin America South
  • oc1Oceania
  • tr1Türkiye
  • ruRussia
  • me1Middle East
  • ph2Philippines
  • sg2Singapore
  • th2Thailand
  • tw2Taiwan
  • vn2Vietnam

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.