# Using Search Channels Twitch API Endpoint not returning values

**URL:** <https://discuss.dev.twitch.com/t/using-search-channels-twitch-api-endpoint-not-returning-values/31227>\
**Category:** API\
**Created:** [April 11, 2021, 2:55pm UTC](https://discuss.dev.twitch.com/t/using-search-channels-twitch-api-endpoint-not-returning-values/31227 "2021-04-11T14:55:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Versifiction](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/versifiction/32/17889_2.png) [@Versifiction](https://discuss.dev.twitch.com/u/Versifiction)\
**Post date:** [April 11, 2021, 2:55pm UTC](https://discuss.dev.twitch.com/t/using-search-channels-twitch-api-endpoint-not-returning-values/31227/1 "2021-04-11T14:55:50Z")

</div>

**EDIT: I didn’t see the "Returns a list of channels (users who have streamed within the past 6 months) and I didn’t stream in the last 6 months haha topic closed"**

**My Twitch username is VersifiXion, and I want to get on my website if I’m in live or not,**  
So I want to use the Search Channels endpoint that returns at “is\_live” property in the JSON returned,

But when I put my username “VersifiXion” in the query parameter I get an empty array of objects, but **it works for other usernames** , is it normal ?  
**Maybe I’m not using it right, or it’s not the right endpoint I should use ?**

Docs : [https://dev.twitch.tv/docs/api/reference#search-channels](https://dev.twitch.tv/docs/api/reference#search-channels)

---

<div class="post-metadata">

**Author:** ![Dist](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/dist/32/7192_2.png) [@Dist](https://discuss.dev.twitch.com/u/Dist)\
**Post date:** [April 11, 2021, 3:05pm UTC](https://discuss.dev.twitch.com/t/using-search-channels-twitch-api-endpoint-not-returning-values/31227/2 "2021-04-11T15:05:50Z")

</div>

You’re using the wrong endpoint. Search is for when you want to search for channels that match in part or whole your query, but you already know the specific channel so don’t need to search.

If you want to see if a channel is online you should use the Get Streams endpoint [https://dev.twitch.tv/docs/api/reference#get-streams](https://dev.twitch.tv/docs/api/reference#get-streams) which will return an empty array if you’re offline, or the stream object for the channel if you are online.

---

<div class="post-metadata">

**Author:** ![Versifiction](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/versifiction/32/17889_2.png) [@Versifiction](https://discuss.dev.twitch.com/u/Versifiction)\
**Post date:** [April 11, 2021, 3:15pm UTC](https://discuss.dev.twitch.com/t/using-search-channels-twitch-api-endpoint-not-returning-values/31227/3 "2021-04-11T15:15:20Z")

</div>

Ok but about this endpoint what is the difference in the JSON between a channel in live or not ?

---

<div class="post-metadata">

**Author:** ![Dist](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/dist/32/7192_2.png) [@Dist](https://discuss.dev.twitch.com/u/Dist)\
**Post date:** [April 11, 2021, 3:17pm UTC](https://discuss.dev.twitch.com/t/using-search-channels-twitch-api-endpoint-not-returning-values/31227/4 "2021-04-11T15:17:22Z")

</div>

Channel that is live:

````json
{
  "data": [
    {
      "id": "41375541868",
      "user_id": "459331509",
      "user_login": "auronplay",
      "user_name": "auronplay",
      "game_id": "494131",
      "game_name": "Little Nightmares",
      "type": "live",
      "title": "hablamos y le damos a Little Nightmares 1",
      "viewer_count": 78365,
      "started_at": "2021-03-10T15:04:21Z",
      "language": "es",
      "thumbnail_url": "https://static-cdn.jtvnw.net/previews-ttv/live_user_auronplay-{width}x{height}.jpg",
      "tag_ids": [
        "d4bb9c58-2141-4881-bcdc-3fe0505457d1"
      ]
    },
    ...
  ],
  "pagination": {
    "cursor": "eyJiIjp7IkN1cnNvciI6ImV5SnpJam8zT0RNMk5TNDBORFF4TlRjMU1UY3hOU3dpWkNJNlptRnNjMlVzSW5RaU9uUnlkV1Y5In0sImEiOnsiQ3Vyc29yIjoiZXlKeklqb3hOVGs0TkM0MU56RXhNekExTVRZNU1ESXNJbVFpT21aaGJITmxMQ0owSWpwMGNuVmxmUT09In19"
  }
}```
````

---

<div class="post-metadata">

**Author:** ![Dist](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/dist/32/7192_2.png) [@Dist](https://discuss.dev.twitch.com/u/Dist)\
**Post date:** [April 11, 2021, 3:17pm UTC](https://discuss.dev.twitch.com/t/using-search-channels-twitch-api-endpoint-not-returning-values/31227/5 "2021-04-11T15:17:42Z")

</div>

Channel that is offline:

```json
{
  "data": [],
  "pagination": {}
}

```

---

<div class="post-metadata">

**Author:** ![Versifiction](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/versifiction/32/17889_2.png) [@Versifiction](https://discuss.dev.twitch.com/u/Versifiction)\
**Post date:** [April 11, 2021, 3:17pm UTC](https://discuss.dev.twitch.com/t/using-search-channels-twitch-api-endpoint-not-returning-values/31227/6 "2021-04-11T15:17:47Z")

</div>

Thank you so much it’s OK

---

<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:** [May 11, 2021, 3:17pm UTC](https://discuss.dev.twitch.com/t/using-search-channels-twitch-api-endpoint-not-returning-values/31227/7 "2021-05-11T15:17:49Z")

</div>

Closed on May 11, 2021, 3:17pm UTC

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