Currently the response from the “Search Categories” end point does not return the number of viewers.
In other threads BarryCarylon has a suggested method which is simply to aggregate all of the streams under a gameid/categoryid. Browser Categories | Twitch API Example
However this solution is not scalable for my needs. For my application I want to get values for the top ~200-2000 categories once every 8 or so hours. The rate limit would become a problem and leave some games that have lots of streamers as being inaccurate.
Using dev tools on twitch.tv I see that this category viewers exists in the graphql response
"data": {
"game": {
"id": "493597",
"name": "New World",
"displayName": "New World",
"coverURL": null,
"avatarURL": "https://static-cdn.jtvnw.net/ttv-boxart/New%20World-144x192.jpg",
"description": "Explore a thrilling, open-world MMO filled with danger and opportunity where you'll forge a new destiny for yourself as an adventurer shipwrecked on the supernatural island of Aeternum. Endless opportunities to fight, forage, and forge await you among the island's wilderness and ruins. Channel supernatural forces or wield deadly weapons in a classless, real-time combat system, and fight alone, with a small team, or in massed armies for PvE and PvP battles—the choices are all yours.",
"viewersCount": 339845,
"followersCount": 293487,
"prestoID": null,
However I’ve been advised to not use the graphql endpoint for app development, so I will not.
Are there any plans on exposing this information on the twitch-cli / heilx any time soon? Or should I come up with a creative way to sum up thousands of streams and account for raids and sudden user transitions between rate-limit refreshes?