Gapipro
Gapipro

Reputation: 1973

YouTube Api v3 - topic channel videos

So how do I get posted videos from a channel that is "auto-generated by YouTube" (topic)? https://www.youtube.com/channel/UCSkJDgBGvNOEXSQl4YNjDtQ/videos

I can get topic ids from channel call but when I search by this topic ids I get a completely different results.

And if I run search api call with:

{
  'part':'snippet',
  'channelId':'UCSkJDgBGvNOEXSQl4YNjDtQ',
  'topicId':'/m/03lty'
} 

I get only playlists and channels. No video results.

Upvotes: 5

Views: 2096

Answers (2)

Fernanda Fentili
Fernanda Fentili

Reputation: 177

You have to do this way:

This works like a charm to me.

-- editing on March 27, 2016. You can also scrapy how search engine does. Just check the ToS and Policy.

Upvotes: 1

Dunaril
Dunaril

Reputation: 2795

Videos featured in an auto-generated channel are not created (uploaded) by this channel, so they don't show up in search results restricted to this channel id.

You can however get a list of videos associated with the topic by removing the channelId parameter.

EDIT: You can also do subsequent calls to retrieve videos for each playlist published by the auto-generated channel, with calls like this: https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.playlistItems.list?part=snippet&playlistId=PLfY-m4YMsF-OSodOIoTKPVblnYvdjU2Tn&_h=7&

Upvotes: 0

Related Questions