SPODER
← back to all posts

BUILDING MY OWN VALO STATS API

A personal itch to showcase my Valorant stats, my way, on my website

21 May 2026•3 min read

Building my own Valo Stats API cover image

Project update, September 2026: valorant-stats-api has evolved into gaming-stats-api. Everything in this post still exists: the Valorant scraper, snapshots, modules, and docs. It now lives inside a provider-based service that also powers my Steam, PlayStation, and Epic libraries, playtime, unlocks, presence, artwork, and per-game details. Think of this post as the origin story; the project kept going.

I have always wanted my personal site to feel like me, not just a cleaned-up version of my LinkedIn.

So I started adding the personal stuff. My music page pulls real listening data from Spotify, because saying "I'm into music" felt a bit empty without something to back it. Gaming is the same story. I have written about what it means to me. But just writing about it felt like half the job. I wanted the stats to actually live on the site.

Not a link that opens someone else's website. Not a redirect. My numbers, in my design, sitting next to everything else that makes up who I am.

Simple enough idea. Not so simple to build (at first).


Stats On Demand, Except Not Really

Riot has an API for Valorant, but it's not something you can just plug into. There's a developer program, an application process, and a set of restrictions that make it a non-starter for a personal site. So that route was out.

The next obvious place was tracker.gg, which is where most Valorant players go to see their stats anyway. They actually have their own API, but it doesn't support Valorant. So the data was all there on the frontend, visible to anyone who knew where to look, but with no clean way to pull it programmatically.

Which meant scraping it. Which is where things got interesting.


The Big Guns

Direct scraping was a dead end pretty quickly. tracker.gg is not naive about bots.

Enter Apify. It's a managed web scraping platform, and it handled the heavy lifting that I couldn't do myself. Problem solved, right?

Mostly. Apify's free tier is limited. Enough to get going, not enough to be careless about. So I had to actually think about efficiency.

The first version of this was on-demand: hit the API, trigger a scrape, wait, get the data back. That's fine until you care about response time, cost, or not burning through your scrape quota on redundant calls.

I changed the model entirely. Snapshots.


The Architecture Shift That Made It Actually Work

Each tracked Riot ID now gets one snapshot file on disk. A cron-scheduled job refreshes those snapshots at a set interval, currently every 48 hours by default. When someone hits the API, it reads from cache. No scraping on request. No waiting. No waste.

To stay inside Apify's free tier, I staggered the scrapes across tracked usernames and removed redundant refreshes if a snapshot was still fresh. Memory utilization got tightened up too.

The result is a small, self-contained API that:

  • Pulls competitive rank, current and peak
  • Pulls agent and map stats for both competitive and unrated
  • Tracks total playtime across all modes
  • Serves all of it from local cache behind an API key

Valorant API docs

There's a /valorant/docs page built in once the server is running. And a /valorant/llms.txt endpoint too, for a machine-readable summary, making it easier to ask your AI to integrate this into your own website.

Here's the deployed pages in case you wanna take a quick peek:


It's Live. On My Site.

The API is deployed. My stats are rendering on my gaming page exactly the way I wanted. No redirect, no external embed. Just the data, in my design.

And then I looked at what I'd built and thought: other people probably want this too.

Valorant players with personal sites. People building custom dashboards. Community tools. Anyone who has hit the same wall I hit and wanted something self-hostable and hackable.

So I polished it, wrote proper docs, added a CONTRIBUTING guide, put it under MIT, and pushed it out.


Go Build Your Own

The repo is public. You can fork it, track your own Riot IDs, adapt the response shape for your frontend, or swap the storage layer if you ever outgrow file-based snapshots.

The only real requirements: a Node.js environment, an Apify account (free tier works if you're not tracking too many players), and your tracker.gg profile set to public.

valorant-stats-api on GitHub →

There's a certain discipline to taking something you built for yourself and making it good enough to share. Not letting it rot locally. That part felt as good as shipping the thing itself.


Filed under: braindump, side projects, valorant, scraping, OSS, and the quiet satisfaction of seeing your own stats on your own terms.