What happens when you
type a username?
type a username?
This guide walks through every API call made, which fields come back, and exactly where each piece of data ends up on the Pika Wrapped site. Enter a username below to make it live.
🔍 Enter a username to trace
Try:
Every section below is interactive once you run a trace. Collapsed cards expand to show the raw JSON response, field-by-field mappings to the UI, and live mini-previews built from real data.
The full call sequence
1
Profile fetch
GET /api/profile/{username} — returns the player object: username, last seen, level, ranks, friends, Discord status. This runs first, blocking, because the username must resolve to confirm the player exists.
2
Leaderboard stats — all 12 gamemodes in parallel
GET /api/profile/{username}/leaderboard?type={gm}&interval=total fires simultaneously for every gamemode via Promise.allSettled(). A failed gamemode doesn't crash the others.
3
Render
Both datasets are passed to renderWrapped() and renderStats(). No further network calls are made — all UI is derived from what came back in steps 1 & 2.
0
BackgroundCORS & Proxy Strategy
Browsers block direct requests to
stats.pika-network.net/api from a local HTML file due to CORS (Cross-Origin Resource Sharing). The site tries three options in order:corsproxy.io
-> fail ->
allorigins.win
-> fail ->
Direct (localhost server)
Public proxy services are rate-limited and occasionally down. For reliable results, serve the file with
npx serve . or python -m http.server — a local server context lets the browser make direct API calls.Each proxy wraps the target URL as a query parameter. The
pFetch() function loops through them until one responds with HTTP 200, throwing immediately on 404 or 429 to avoid wasting proxy quota.1
API CallProfile Fetch
The first and only sequential call. If this 404s, everything stops. The response is a single JSON object with all player metadata — no pagination, no follow-up needed.
GET
stats.pika-network.net/api/profile/{username}
—
Run a trace above to see live data here
Key field:
profile.ranks[] is an array that can contain both game ranks (like Ultimate+++) and subscriptions (like Pika❤) mixed together. The site uses the splitRanks() function to separate them — see the Ranks section below.2
API Calls × 12Leaderboard Stats — Per Gamemode
One call per gamemode, all fired simultaneously. The response maps every tracked stat name to an object containing the player's rank position and the total number of players tracked for that stat. A missing key means no data — the stat is simply skipped in the UI.
BedWars gets an extra
&mode=ALL_MODES parameter so it returns cross-mode totals rather than per-mode splits.Run a trace above to see per-gamemode calls here
3
Data -> UIHero Panel
The big banner at the top of the Wrapped page. Built entirely from the profile response — no leaderboard data needed here.
UI
Hero Panel construction
Run a trace above
4
Data -> UIRanks & Subscriptions
The API returns all ranks in one flat array — game ranks and Pika+ subscriptions mixed together. The site separates them using a priority tier list and a subscription name check.
The API lists ranks in no guaranteed order. Without the tier list, a lower rank like Titan could appear as "Top Rank" above Overlord+++.
UI
splitRanks() — rank separation logic
How splitRanks() works
isPikaSub(r)->True if
displayName is in ['Pika+','Pika⭐','Pika❤'] or starts with "Pika". These go to subRanks[].gameRanks[]->All non-sub ranks, sorted by position in RANK_TIER[]. Index 0 = highest prestige. Unknown ranks fall to index 999.
topGameRank->gameRanks[0] — appears as "Top Rank" in the hero panel. Never a subscription.
Rank tier order (highest -> lowest)
5
Data -> UIActivity Scoring
The site has no time-filtered data — it can't tell how much you played this year. Instead it derives an "activity score" from your leaderboard percentiles to rank how invested you are in each gamemode. This is what determines "Most Played" and the order of all sections.
percentile = 1 - (place / total)
score = (avgPercentile × 100) + rankedStatCount
score = (avgPercentile × 100) + rankedStatCount
Run a trace to see live score breakdown
A player who is top 5% in 6 stats will score higher than one who is #1 in a single stat with no other presence. The breadth bonus rewards all-round play.
Try the formula yourself
Your rank
Total players
Ranked stats
Result
—
6
Data -> UIGamemode Sections (Wrapped)
Each gamemode with a non-null leaderboard response gets its own section on the wrapped page. Stats shown are taken from
GM_META[gm].keys — a curated list of the most meaningful stats for that mode. Order is determined by activity score.Run a trace to see per-gamemode section previews
7
Data -> UIStats Tab
The 📊 Stats toggle shows the same data in a table format. The full leaderboard response is iterated — not just the curated keys — so every stat the API returns appears in the table, with rank and percentile.
Run a trace to see a live stats table preview
Top % in the stats table is
place / total × 100. Rank #1 of 10,000 = Top 0.01%. The lower the percentage, the better — this is different from how "percentile" is usually expressed (where higher = better), so mentally invert it.