Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gdata youtube feed for auto-generated channels

Tags:

youtube-api

I'm trying to figure out if it's possible to get a gdata feed for an auto-generated youtube channel, aka a "Topic."

For example, here's the JPop Channel:

http://www.youtube.com/channel/HC9BkB0bbvR-4

Were this a user, I know I could get a feed like: http:// gdata.youtube.com/feeds/base/users/{username}/uploads. But since it's not a user, that doesn't work.

I know I could do a search like: http:// gdata.youtube.com/feeds/api/videos?v=2&q=jpop, but that's not exactly the same thing.

This question was asked before on the old Youtube Developer Forum, but at the time it wasn't available.

I've looked all through the API docs to see if that's changed, but can't find any reference to it.

I was hoping someone here might know if it's changed, and the docs haven't been updated, or if there's an expected ETA for that feature?

like image 530
Dan Jones Avatar asked Oct 21 '12 19:10

Dan Jones


1 Answers

You can interact with auto-generated topic channels (those that begin with HC) by subscribing to them like any other channel.

If you just want to get a list of videos associated with the channel, though, you need to use the forthcoming v3 of the API, and you can do a search based on the underlying topic. You can get the topic id(s) related to a given channel using channels.list(id=CHANNEL_ID):

https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.channels.list?part=topicDetails&id=HC9BkB0bbvR-4

(v3 isn't publicly released as of right now, so you need to use the Google APIs Explorer.)

That returns (Freebase) topic id /m/025g__, which you can then use to do a search.list(topicId=TOPIC_ID, q=BLAH, type=video)

https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.search.list?part=snippet&type=video&q=j+pop&topicId=%252Fm%252F025g__

Unfortunately, you can't do a search that just specifies a topicId= without a q= right now in v3, but that's a bug that will hopefully be fixed soon. So you do need to specify something meaningful for the q= parameter for the time being, and I'm just using j pop.

like image 97
Jeff Posnick Avatar answered Oct 21 '22 18:10

Jeff Posnick