Currently most viewed stream for a particular game?


#1

I’m totally new to the Twitch API besides looking through some of the documentation. Is there a way that I would be able to pass a game ID as part of a query and load the stream for that game which has the highest view point at the time of the query? Everything I’ve seen so far requires a channel or video id, whereas my request is a bit more advanced.

I plan on implementing this into a Python Django project and embedding a stream on a page depending on the game ID that is passed in, if that helps.


#2

With optional query string argument of game_id

The default and only sort is by viewer count, but you can paginate thru everything and sort as you wish

Gets information about active streams. Streams are returned sorted by number of current viewers, in descending order. Across multiple pages of results, there may be duplicate or missing streams, as viewers join and leave streams.


#3

Cheers, I’ll have a look into implementing it.