Streams API returns incorrect response

It looks like a bug in API. The following request

https://api.twitch.tv/kraken/streams/25604128?stream_type=live

gives

{'stream': {'_id': 25433645952,
        'average_fps': 0,
        'broadcast_platform': 'playlist',
        'channel': {'_id': 25604128,
                    'broadcaster_language': 'ru',
                    'broadcaster_type': 'partner',
                    'created_at': '2011-10-21T13:23:03.557676Z',
                    'description': 'Hello, I am russian streamer. '
                                   'Streaming mostly in russian (because '
                                   'most part of my community is '
                                   'russians), but I understand english '
                                   'well. If you have any questions, feel '
                                   'free to ask them right away.',
                    'display_name': 'guit88man',
                    'followers': 46612,
                    'game': 'Space Rangers',
                    'language': 'en',
                    'logo': 'https://static-cdn.jtvnw.net/jtv_user_pictures/guit88man-profile_image-8bb1d9ef6605403c-300x300.png',
                    'mature': False,
                    'name': 'guit88man',
                    'partner': True,
                    'profile_banner': 'https://static-cdn.jtvnw.net/jtv_user_pictures/guit88man-profile_banner-af3bda77d00aa35c-480.png',
                    'profile_banner_background_color': '',
                    'status': '(RUS) Космические рейнджеры 200%, день 4',
                    'updated_at': '2017-06-06T09:34:04.708003Z',
                    'url': 'https://www.twitch.tv/guit88man',
                    'video_banner': 'https://static-cdn.jtvnw.net/jtv_user_pictures/guit88man-channel_offline_image-da465e82f193a69b-1920x1080.png',
                    'views': 8317384},
        'community_id': '',
        'created_at': '2017-06-04T16:25:44Z',
        'delay': 0,
        'game': 'Space Rangers',
        'is_playlist': False,
        'preview': {'large': 'https://static-cdn.jtvnw.net/previews-ttv/live_user_guit88man-640x360.jpg',
                    'medium': 'https://static-cdn.jtvnw.net/previews-ttv/live_user_guit88man-320x180.jpg',
                    'small': 'https://static-cdn.jtvnw.net/previews-ttv/live_user_guit88man-80x45.jpg',
                    'template': 'https://static-cdn.jtvnw.net/previews-ttv/live_user_guit88man-{width}x{height}.jpg'},
        'stream_type': 'live',
        'video_height': 0,
        'viewers': 0}}

But the stream is already offline for a few days. Another thing is inconsistent values of keys: broadcast_platform, is_playlist and stream_type. However the request

https://api.twitch.tv/kraken/streams/?channel=25604128

gives nothing which is correct.

It is “live” via the playlist beta available for some partners. The inconsistencies with is_playlist, stream_type and broadcast_platform does seem like a bug to me.

According to APIv5 reference

Constrains the type of streams returned. Valid values: live, playlist, all. Playlists are offline streams of VODs (Video on Demand) that appear live. Default: live.

Why return playlist stream while stream_type=live has set? I expect to take only live stream not playlist.

There is only 17 streams associated with stream_type=playlist now in

https://api.twitch.tv/kraken/streams/?stream_type=playlist

Request each of them with

https://api.twitch.tv/kraken/streams/{channel_id}?stream_type=live

returns similar response.

Also using stream_type=live filter will return results with stream_type=watch_party, but the user isn’t actually live but using the new play-a-VOD thing.

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