Parameter live_only not working?

Hi,
I have following test query that does not work as expected, because it also shows “offline” channels:

https://api.twitch.tv/helix/search/channels?query=tsm&first=30&live_only=True

Example response:

            [8] => stdClass Object
                (
                    [broadcaster_language] => en
                    [broadcaster_login] => tsm_jellyquan123
                    [display_name] => tsm_jellyquan123
                    [game_id] => 33214
                    [game_name] => Fortnite
                    [id] => 674282412
                    [is_live] => 1
                    [tag_ids] => Array
                        (
                            [0] => 6ea6bca4-4712-4ab9-a906-e3336a9d8039
                        )

                    [thumbnail_url] => https://static-cdn.jtvnw.net/jtv_user_pictures/3190fa46-d76e-4496-95b4-b17f49913895-profile_image-300x300.png
                    [title] => Fortnite
                    [started_at] => 2022-10-22T01:04:04Z
                )

            [9] => stdClass Object
                (
                    [broadcaster_language] => en
                    [broadcaster_login] => twitchmedia_tsm_c_9
                    [display_name] => twitchmedia_tsm_c_9
                    [game_id] => 0
                    [game_name] => 
                    [id] => 675686157
                    [is_live] => 
                    [tag_ids] => Array
                        (
                        )

                    [thumbnail_url] => https://static-cdn.jtvnw.net/user-default-pictures-uv/998f01ae-def8-11e9-b95c-784f43822e80-profile_image-300x300.png
                    [title] => 
                    [started_at] => 
                )

As you can see within the server response, data set with index 8 comes with is_live “1” and index 9 comes with is_live “none”, which is obviously wrong due to the fact that I only want to see “live_only”…

So my question: Am I doing something wrong or is the parameter live_only bugged?

Thanks!

Looks like a “special case” for the twitchmedia set of test channels.

Poking aroung some “regular” search tests/examples I can’t find a fault for any “real” channels.

If it’s got twitchmedia or starts twitch or qa_ then it’s likely a test channel which normally doesn’t follow the “normal” rules so they’ll pop up in the api weirdly

And for example twitchmedia_tsm_x_9 just went live as I had it open. So I guess it flicks on/off quicker than the search cache can stay up to date.

Funny, thanks for your message. I thought I was too stupid to use the API, but what you wrote makes totally sense. Thanks again!

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