How to get get multiple streams with user login in 1 request?

Above is how to get info about user1.

On twitch api it says Returns streams broadcast by one or more specified user login names. You can specify up to 100 names, but there are not examples provided.

I tried below, but nothing works.:

Since you are requesting the streams endpoint, the channels you’re checking have to be currently live.

The 3rd url you attempted is the correct answer, just ensure that everyone listed is live or you’ll get a blank response in place of a real result.

The following code (in jQuery) works just fine for me.

var clientId = "your-client-id";

  url: "",
  method: "GET",
  headers: {
   "Client-ID": clientId

So if I check for multiple streamers all have to be live?

I can’t check for (example) 5 streams to see which are live? I have to make request for each stream separately?

No you do not need to request each stream separately.

You can still do

However if streamer2 is offline, and the rest are online, you will get 3 objects.

// This is not the exact response
    "name": "streamer1"
    "name": "streamer3"
    "name": "streamer4"

So you need to loop through the results to see who is online and who isn’t.

1 Like

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