Still no API for multiple channels?

I basically have the same question as Query multiple channels in 1 call? , but as it’s been a year, I thought I’d check whether it’s still true that this doesn’t exist. I’m here because of , and for that application it would be great to have one call that gets you all the channels’ names, logos, and statuses, whether online or not; seems to make more sense than one streams/?channel call to catch the online ones, and then a separate /channels/ call for every single offline channel.

The API hasn’t change since that post. Are you running into issues with the current setup aside from having to make multiple calls?

Not so far. My concern might just stem from being a devNoob; making a bunch of calls instead of one seems like it would be “pestering” the servers, but maybe it’s not that big of a deal.

We recommend 1 request per second for requests to the API, so you should be alright. :slight_smile:

Meaning an average of one per second? Because the concept is something like this, which is iterating through its list making some 16 separate calls all when the page loads. I was just thinking what a shame it is that there’s an API that accepts a bulk query for channels, but it only returns data on the online ones.

Should be fine, but I’d cache (at least the API results on) the page for a minute or few, so multiple users accessing the page in a short time don’t cause more unnecessary API calls when the result is the same for all of them.

Absolutely agree with @3ventic. Caching is highly recommended when using pretty much any API. :slight_smile:

Showing online and offline users through the API has a lot of implications. I could see a bad actor creating a master list of all users on Twitch and then cross-referencing that with any of the multiple password leaks online. Or maybe the list finds a pre-launch channel and spoils a reveal. Showing online only means that someone is deliberately broadcasting, and you have access to their live content.

1 Like

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