Get online status of stream of Twitch team members

Hi Folks,

I want to get a list of all online status (if it is streaming or not) of Twitch team members for a given team name.

My current approach

  1. Get team from API (https://api.twitch.tv/kraken/team/<team name>)
  2. Get stream status for each team member (https://api.twitch.tv/kraken/streams/<channel id>)

My problem with this

First request is okay and works as expected. but I have to request each channel / streamer by it self and not in bulk - and the responded data is more than I really need.

That would be very important for performance and also to avoid hitting the request limits.

Question

Is there any Twitch API endpoint that I can use, that takes several channel ids and response just a flat dict of channel Id and flag if the streamer is online?

Like:

{[
    { id: 123, online: false },
    { id: 456, online: true}
}]

Thanks a lot for any help!

  • Tobi

https://api.twitch.tv/helix/streams?user_id=123&user_id=456

Loop reponse->data

You’ll get returns for only live streams, so see if the stream ID has a payload or not

1 Like

Thanks for your quick helpful response!

1 Like

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