# Fastest way of checking if a stream is online?

**URL:** <https://discuss.dev.twitch.com/t/fastest-way-of-checking-if-a-stream-is-online/1750>\
**Category:** API\
**Created:** [March 4, 2015, 6:55am UTC](https://discuss.dev.twitch.com/t/fastest-way-of-checking-if-a-stream-is-online/1750 "2015-03-04T06:55:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ggnore](https://avatars.discourse-cdn.com/v4/letter/g/ce7236/32.png) [@ggnore](https://discuss.dev.twitch.com/u/ggnore)\
**Post date:** [March 4, 2015, 6:55am UTC](https://discuss.dev.twitch.com/t/fastest-way-of-checking-if-a-stream-is-online/1750/1 "2015-03-04T06:55:30Z")

</div>

I’'m trying to check which streams are online or not from a list of following channels but what I have right now is very slow. It has to load the json object from every stream link which slows it down by alot.

```
item = requests.get("https://api.twitch.tv/kraken/users/test_channel/follows/channels? oauth_token= _______________________________")
loadSource = json.loads(item.text)
for item in loadSource["follows"]:
	checkOnline = requests.get("https://api.twitch.tv/kraken/streams/" + item["channel"]["name"])
	loadSource = json.loads(checkOnline.text)
	if loadSource["stream"] != None:
		print item["channel"]["name"]

```

I’m getting the right list of online streams but requesting a site for every stream makes it very slow. Is there a way I can request if a list of streams at once.

---

<div class="post-metadata">

**Author:** ![BatedUrGonnaDie](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/batedurgonnadie/32/125_2.png) [@BatedUrGonnaDie](https://discuss.dev.twitch.com/u/BatedUrGonnaDie)\
**Post date:** [March 4, 2015, 7:30am UTC](https://discuss.dev.twitch.com/t/fastest-way-of-checking-if-a-stream-is-online/1750/2 "2015-03-04T07:30:44Z")

</div>

The [/streams](https://github.com/justintv/Twitch-API/blob/master/v3_resources/streams.md#get-streams) endpoint is what you are looking for. You can request multiple channels at once, and only those that have an object returned are live.

---

<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:** [April 3, 2015, 7:44am UTC](https://discuss.dev.twitch.com/t/fastest-way-of-checking-if-a-stream-is-online/1750/3 "2015-04-03T07:44:52Z")

</div>

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