Why do I need to add "broadcast_type" for v3 "/channels/:channel/videos" - when its not a required parameter?

This request says there is 2442 videos in total:

https://api.twitch.tv/kraken/channels/lirik/videos?limit=100&offset=0&client_id=XXX&broadcast_type=archive&api_version=3

However, if I omit broadcast_type

https://api.twitch.tv/kraken/channels/lirik/videos?limit=100&offset=0&client_id=XXX&api_version=3

The response says 296 videos.

According to the docs:

https://dev.twitch.tv/docs/v3/reference/videos#get-channelschannelvideos

broadcast_type is not even a parameter.

Broken?

Take a look at the broadcasts parameter and it’s default:

broadcasts	optional	boolean	Returns only broadcasts when true. Otherwise only highlights are returned. Default is false.

The default is false so you only get highlights if you don’t specify. The correct call would be https://api.twitch.tv/kraken/channels/lirik/videos?limit=100&offset=0&client_id=XXX&api_version=3&broadcasts=true if you want broadcasts/archives instead.

Not sure why broadcast_type happens to work as well but is undocumented but regardless the endpoint is working and documented correctly.

1 Like

Thanks.

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