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.
You have to do this way:
call playlists endpoint and retrieve the id
GET https://www.googleapis.com/youtube/v3/playlists?part=id&channelId=UCSkJDgBGvNOEXSQl4YNjDtQ&maxResults=1&key={YOUR_API_KEY}
call playlistitems using the retrieved id
GET https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId={RETRIEVED_ID_COMES_HERE}&key={YOUR_API_KEY}
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With