Can you retrieve viewer count for a game?

Hey,
I was wondering if you could retrieve the viewer count for a game at all?
The data that’s displayed on the Browse tab of the site.
I have been all over the docs for Helix and I can only find a streamer’s viewer count.

It’s not for anything particularly important, I’m just learning Node and wanted to do a few console requests for the purpose of education.

Many thanks,

RS

-edit- I’ve gone over the docs a few more times and I was unable to find what I was looking for so I’m assuming it’s not there. I suppose I could do a bit of math on the streamers of a game.
Thank you anyway :slight_smile:

In Helix, there doesn’t appear to be a way to easily get a games viewer count, currently you would have to page through the streams endpoint https://dev.twitch.tv/docs/api/reference/#get-streams using the game_id param to limit it to that specific game, and sum the viewer count from each stream object returned.

Alternatively there’s always v5 which has an endpoint exactly for what you want to accomplish https://dev.twitch.tv/docs/v5/reference/games/

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.