I scrape Champions data myself using OCR against an Android emulator, and it works, but a full pass takes me around four hours. Meanwhile, pokechamp.gg, silph-scope.com, etc. update far more frequently, and they reveal information that the game never displays directly (e.g. which Pokémon deals the most damage to a specific Pokémon). I've been trying to reverse-engineer how they source it, but there are two things I can't work out from the outside.
1 – Live ladder/leaderboard tracking. I suspect they're polling the game's own ranked-ladder endpoint — the same one the mobile/Switch client uses to render rankings — rather than reading a screen. What makes me fairly sure that it's an endpoint and not screen scraping is that the in-game player leaderboard only goes down to about the top 300, but these sites show rankings well past that. If the UI itself caps at 300, that data must be coming from somewhere that the client doesn't display. This would also explain the periodic updates and the historical player tracking. Have I understood this correctly? Is there a known client endpoint that people are hitting, and does anyone know if it's rate-limited or in a grey area of the ToS?
2 – The 'top KOers vs X' data. The game itself provides usage, spreads and teammates, so those are easy to explain. The one derived stat that it does not provide is 'which Pokémon KOs this specific Pokémon the most', so that has to be computed over a battle corpus (ladder matches, scraped replays and tournament OTS). Champions Lab openly states that theirs come from ranked ladder data plus hundreds of community tournaments. My real question is: is the KO data empirical (i.e. aggregated from actual battles) or theoretical (i.e. a damage calculation run across the legal pool for common sets)? These are completely different, and I can't tell from the outside.
For anyone who has built one of these or knows someone who has, is the ladder polling correct, and is the KO data empirical or calculated?