TOOL / ANALYTICS
Royale API
A web app that automatically collects Clash Royale battle history and analyzes win rates by deck and matchups against opponent archetypes. Search a player tag and tracking starts from that moment.
- Polling intervalEvery 5 minutes (Cron)
- RetentionFree plan keeps last 1,000 battles
- StackCloudflare Workers + D1
What kind of tool is it?
Searching a player tag starts tracking from that moment, and a Cron trigger fetches the official battle log every 5 minutes into D1. The accumulated log is aggregated into win rate by deck, win rate by opponent archetype, and deck-vs-archetype matchups, shown in the web UI.
How it is built
Runs entirely on Cloudflare Workers (Hono) and D1 (SQLite). Since the official API requires IP whitelisting, requests go through the licensed proxy provided by RoyaleAPI.
How to use it
- Enter a player tag in the search field (e.g. #2PP0LYQ).
- The first search for a tag starts recording from that point; past battles cannot be backfilled.
- Player info, storage usage, and a battle history summary filtered by period and mode are shown.
Limitations
The free plan keeps only the last 1,000 battles; once the cap is hit, new battles stop being ingested (the Pro plan is unlimited). A tag with no searches for 30 days automatically stops being tracked and resumes on the next search. The official battle log endpoint always returns only the most recent 25 battles, so very active players may still miss some battles.
Data handling
Only the searched player tag and that tag’s public battle history and aggregated stats are stored. No personal information such as names or email addresses is handled.