# Get who a channel is hostin

**URL:** <https://staging-discuss.dev.twitch.com/t/get-who-a-channel-is-hostin/9750>\
**Category:** API\
**Created:** [March 24, 2017, 4:36am UTC](https://staging-discuss.dev.twitch.com/t/get-who-a-channel-is-hostin/9750 "2017-03-24T04:36:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![piecedigital](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/piecedigital/32/895_2.png) [@piecedigital](https://staging-discuss.dev.twitch.com/u/piecedigital)\
**Post date:** [March 24, 2017, 4:36am UTC](https://staging-discuss.dev.twitch.com/t/get-who-a-channel-is-hostin/9750/1 "2017-03-24T04:36:00Z")

</div>

Is there some hidden API to get who one person is hosting? I know one unlisted API that gets a list of people you follow who are hosting someone, but that’s a large list and I’m not sure I can filter it.

---

<div class="post-metadata">

**Author:** ![piecedigital](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/piecedigital/32/895_2.png) [@piecedigital](https://staging-discuss.dev.twitch.com/u/piecedigital)\
**Post date:** [March 24, 2017, 4:45am UTC](https://staging-discuss.dev.twitch.com/t/get-who-a-channel-is-hostin/9750/2 "2017-03-24T04:45:51Z")

</div>

Never mind, I have found the solution: [Host Mode in Kraken API?](https://staging-discuss.dev.twitch.com/t/host-mode-in-kraken-api/1014/6?u=piecedigital)

---

<div class="post-metadata">

**Author:** ![keeperxy](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/keeperxy/32/2658_2.png) [@keeperxy](https://staging-discuss.dev.twitch.com/u/keeperxy)\
**Post date:** [March 29, 2017, 9:49pm UTC](https://staging-discuss.dev.twitch.com/t/get-who-a-channel-is-hostin/9750/3 "2017-03-29T21:49:34Z")

</div>

I’m using a little, nasty bash script (it’s still using v3, didn’t update it to v5). maybe it’s a better solution for you:

> #!/bin/bash  
> id=$(curl -s -H ‘Accept: application/vnd.twitchtv.v3+json’ -H ‘Client-ID: XXX’ -X GET “[https://api.twitch.tv/kraken/channels/$1](https://api.twitch.tv/kraken/channels/$1)” | jq -r ‘.\_id’)  
> hoster=$(curl -s “[http://tmi.twitch.tv/hosts?include\_logins=1&target=$id](http://tmi.twitch.tv/hosts?include_logins=1&target=$id)” | jq -r ‘.hosts .host\_display\_name’ | sed ‘:a;N;$!ba;s/\n/, /g’)

> if [[-z $hoster]]; then  
> echo $1 not hosted by anyone.  
> else  
> echo $1 is beeing hosted by $hoster  
> fi

You use it: ./twitch\_host.sh tsm\_dyrus

---

<div class="post-metadata">

**Author:** ![system](https://d2spem0quai2ol.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://staging-discuss.dev.twitch.com/u/system)\
**Post date:** [April 28, 2017, 10:00pm UTC](https://staging-discuss.dev.twitch.com/t/get-who-a-channel-is-hostin/9750/4 "2017-04-28T22:00:46Z")

</div>

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