SOLVED: Getting list of top streams by viewer count

Hey guys, I’m trying to get a list of the top streams by views, not games. It seems like right now the api only supports /games/top and then breaking down into the game channel by most views. To clarify, I want the stream with the highest viewer count without regards to game organization. I didn’t figure out a way to do this but I wanted to double check if anyone else had solved this problem. Thanks!

https://github.com/justintv/Twitch-API/blob/master/v3_resources/streams.md#get-streams

Right, but if you perform a raw query to /streams this is the response:

{u’_links’: {u’featured’: u’https://api.twitch.tv/kraken/streams/featured’,
u’followed’: u’https://api.twitch.tv/kraken/streams/followed’,
u’next’: u’https://api.twitch.tv/kraken/streams?client_id=’’’&limit=25
&offset=25&stream_type=live’,
u’self’: u’https://api.twitch.tv/kraken/streams?client_id=’’’&limit=25
&offset=0&stream_type=live’,
u’summary’: u’https://api.twitch.tv/kraken/streams/summary’},
u’_total’: 0,
u’streams’: []}

It’s just the json object of the streams api.

Basically I am just asking how to query /directory/all through the api.

Alright just to clear this up for anyone else who runs into this, my problem was that I was passing along client_id as a param to the streams api endpoint. The endpoint still uses the client_id but instead of it’s normal function of preventing rate limiting, it limits your search of streams to the client_id provided.

SOLUTION:

GET /streams
client_id should NOT be passed along as a param

Thanks and sorry about the confusion

1 Like

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