Stream endpoint provides stream informations for playlists?

When I query https://api.twitch.tv/kraken/streams/zueljin I get this:

{
	"stream": {
		"_id": 21789539872,
		"game": "Minecraft",
		"viewers": 9,
		"created_at": "2016-06-11T02:37:07Z",
		"video_height": 0,
		"average_fps": 0,
		"delay": 0,
		"is_playlist": true,
		"_links": {
			"self": "https://api.twitch.tv/kraken/streams/zueljin"
		},
		"preview": {
			"small": "https://static-cdn.jtvnw.net/previews-ttv/live_user_zueljin-80x45.jpg",
			"medium": "https://static-cdn.jtvnw.net/previews-ttv/live_user_zueljin-320x180.jpg",
			"large": "https://static-cdn.jtvnw.net/previews-ttv/live_user_zueljin-640x360.jpg",
			"template": "https://static-cdn.jtvnw.net/previews-ttv/live_user_zueljin-{width}x{height}.jpg"
		},
		"channel": {
			"mature": false,
			"status": "Hermitcraft Interior Decor",
			"broadcaster_language": "en",
			"display_name": "zueljin",
			"game": "Minecraft",
			"language": "en",
			"_id": 28809325,
			"name": "zueljin",
			"created_at": "2012-03-08T14:44:24Z",
			"updated_at": "2016-06-11T13:00:47Z",
			"delay": null,
			"logo": "https://static-cdn.jtvnw.net/jtv_user_pictures/zueljin-profile_image-5a99cd4529ad0e3f-300x300.png",
			"banner": null,
			"video_banner": null,
			"background": null,
			"profile_banner": "https://static-cdn.jtvnw.net/jtv_user_pictures/zueljin-profile_banner-6d926d9f4ee3b6e9-480.png",
			"profile_banner_background_color": "#262626",
			"partner": true,
			"url": "https://www.twitch.tv/zueljin",
			"views": 196872,
			"followers": 37387,
			"_links": {
				"self": "http://api.twitch.tv/kraken/channels/zueljin",
				"follows": "http://api.twitch.tv/kraken/channels/zueljin/follows",
				"commercial": "http://api.twitch.tv/kraken/channels/zueljin/commercial",
				"stream_key": "http://api.twitch.tv/kraken/channels/zueljin/stream_key",
				"chat": "http://api.twitch.tv/kraken/chat/zueljin",
				"features": "http://api.twitch.tv/kraken/channels/zueljin/features",
				"subscriptions": "http://api.twitch.tv/kraken/channels/zueljin/subscriptions",
				"editors": "http://api.twitch.tv/kraken/channels/zueljin/editors",
				"teams": "http://api.twitch.tv/kraken/channels/zueljin/teams",
				"videos": "http://api.twitch.tv/kraken/channels/zueljin/videos"
			}
		}
	},
	"_links": {
		"self": "https://api.twitch.tv/kraken/streams/zueljin",
		"channel": "https://api.twitch.tv/kraken/channels/zueljin"
	}
}

I know that this wasn’t the case a few days ago because my bot never tried to host somebody that is using a playlist. So is this a bug or a feature?

If you want to exclude playlists, you can use eg.

https://api.twitch.tv/kraken/streams/?channel=zueljin&stream_type=live

More on the stream_type parameter in the documentation.

Are you saying that broadcasting playlists wouldn’t populate the stream object before a few days ago? The stream object gets populated when the broadcast is live or playing a playlist, and we haven’t been making any functionality changes to that API. Do you have responses showing before and after? I’d be interested in those cases.

Ehm, right now I get this response from https://api.twitch.tv/kraken/streams/zueljin

{
	"stream": null,
	"_links": {
		"self": "https://api.twitch.tv/kraken/streams/zueljin",
		"channel": "https://api.twitch.tv/kraken/channels/zueljin"
	}
}

And he is currently broadcasting the playlist. And that was the case the whole last year. My bot prioritizes streams to host that have less viewers. With 1 to 3 people watching the playlist he would be always on top of my list and therefor would be hosted once a day. I would have noticed that and fixed it. So one of the two behaviours is not intended.

I’m not seeing the same behavior as you. When I originally responded and now, that channel was broadcasting a playlist and showing as broadcasting a playlist in the API. Are you saying that stream sometimes or always comes through as null when broadcasting a playlist?

Right now it shows a running stream. When I posted the message above it did not. So it is at least not consistant.

This thread has been going on a while, and we’re doing data gathering and research now. Could be related: Api.twitch.tv/kraken/streams/ endpoint unstable

I fixed it in my bot but this behaviour in general must be new because I never hosted him while running a playlist. And over the last maybe 6 or 8 months he was always on my list and he was always broadcasting playlists. And I check the bot logs every day so I would have noticed it for sure.

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