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

**URL:** <https://discuss.dev.twitch.com/t/how-to-get-get-multiple-streams-with-user-login-in-1-request/13780>\
**Category:** API\
**Created:** [January 16, 2018, 6:35am UTC](https://discuss.dev.twitch.com/t/how-to-get-get-multiple-streams-with-user-login-in-1-request/13780 "2018-01-16T06:35:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jm18457](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@jm18457](https://discuss.dev.twitch.com/u/jm18457)\
**Post date:** [January 16, 2018, 6:35am UTC](https://discuss.dev.twitch.com/t/how-to-get-get-multiple-streams-with-user-login-in-1-request/13780/1 "2018-01-16T06:35:40Z")

</div>

**[https://api.twitch.tv/helix/streams?user\_login=user1](https://api.twitch.tv/helix/streams?user_login=user1)**

Above is how to get info about user1.

On [twitch api](https://dev.twitch.tv/docs/api/reference#get-streams) 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.:

- [https://api.twitch.tv/helix/streams?user\_login=user1,user2](https://api.twitch.tv/helix/streams?user_login=user1,user2)
- [https://api.twitch.tv/helix/streams?user\_login=user1|user2](https://api.twitch.tv/helix/streams?user_login=user1%7Cuser2)
- [https://api.twitch.tv/helix/streams?user\_login=user1&user\_login=user2](https://api.twitch.tv/helix/streams?user_login=user1&user_login=user2)
- [https://api.twitch.tv/helix/streams?user\_login=user1](https://api.twitch.tv/helix/streams?user_login=user1) user2

---

<div class="post-metadata">

**Author:** ![TheElm](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/theelm/32/2911_2.png) [@TheElm](https://discuss.dev.twitch.com/u/TheElm)\
**Post date:** [January 16, 2018, 6:42am UTC](https://discuss.dev.twitch.com/t/how-to-get-get-multiple-streams-with-user-login-in-1-request/13780/2 "2018-01-16T06:42:45Z")

</div>

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";

$.ajax({
  url: "https://api.twitch.tv/helix/streams?user_login=EatMyDiction1&user_login=manvsgame",
  method: "GET",
  headers: {
   "Client-ID": clientId
  }
});
```

---

<div class="post-metadata">

**Author:** ![jm18457](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@jm18457](https://discuss.dev.twitch.com/u/jm18457)\
**Post date:** [January 16, 2018, 6:44am UTC](https://discuss.dev.twitch.com/t/how-to-get-get-multiple-streams-with-user-login-in-1-request/13780/3 "2018-01-16T06:44:28Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![TheElm](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/theelm/32/2911_2.png) [@TheElm](https://discuss.dev.twitch.com/u/TheElm)\
**Post date:** [January 16, 2018, 6:49am UTC](https://discuss.dev.twitch.com/t/how-to-get-get-multiple-streams-with-user-login-in-1-request/13780/4 "2018-01-16T06:49:37Z")

</div>

No you do not need to request each stream separately.

You can still do

```
https://api.twitch.tv/helix/streams
?user_login=streamer1
&user_login=streamer2
&user_login=streamer3
&user_login=streamer4

```

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.

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [February 15, 2018, 6:49am UTC](https://discuss.dev.twitch.com/t/how-to-get-get-multiple-streams-with-user-login-in-1-request/13780/5 "2018-02-15T06:49:42Z")

</div>

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