Closed DeezjaVu closed 8 years ago
I've verified that we're returning less results than expected, however search
endpoints are always ordered by relevance, not viewer count.
Perhaps you want https://api.twitch.tv/kraken/streams?game=Overwatch&limit=100 ?
search endpoints are always ordered by relevance, not viewer count.
That wasn't always the case. At some point it was changed. In the past it was always by viewer count. Or it may have been both relevance and viewer count.
I have an application (TMSViewer) developed about 3-4 years ago and its search function has always worked that way.
I'm not exactly sure when, but quite some time ago the search functionality started behaving poorly. The order was no longer by number of viewers
and the limit
parameter was ignored.
I wouldn't mind having additional parameters for sorting. In fact I'd welcome them as it would take the whole guessing game out of the picture.
Edit:
In the end, what I'm getting at is that '/streams?game=Overwatch' and '/search/streams?q=Overwatch' should return the same (top) results.
This pagination limit bug has been fixed.
If you want streams ordered by viewer count, use /streams?game=Overwatch. Having those two endpoints return the same results would be redundant.
It shouldn't always return the same result, as one is a search the other isn't. However it should return a similar result when the given query is the same, for instance searching for a game title (e.g. overwatch). As I said earlier, that's how it actually used to be. A search for "overwatch" would return streams playing overwatch ordered by "game" + "number of viewers". It now returns results ordered by title (I think) and usually those are results with very few viewers.
On top of all that, performing any search on the twitch website always orders by number of viewers, regardless whether it's under "games" or "live channels".
https://api.twitch.tv/kraken/search/streams?query=Overwatch&offset=0&limit=100
Calling the above only returns 20 results, even though at this time there are supposedly 2000+ streams ("_total": 2045).
On top of that, it doesn't return the streams ordered by highest number of viewers. Has been like this for quite some time now. Was hoping someone would notice and fix, but guess I should know by now not to hold my breath when it comes to Twitch issues.