YouTube API: How to get videos from channel X with tag Y?
For example, how could I get a JSON response of all the videos from channel "http://www.youtube.com/nba" tha开发者_C百科t are tagged "playoffs"?
YouTube calls tags
as categories
.
The following URL shows videos from NBA
channel with tags playoffs
and sports
(you can add more obviously) in JSON.
http://gdata.youtube.com/feeds/api/users/nba/uploads/-/sports/playoffs?v=2&alt=json
Try something like this:
http://gdata.youtube.com/feeds/api/users/nba/uploads?q=playoffs
but this is xml format, look the api document and do it as json by yourself.
I think you're looking for the category
-parameter. I ran a quick test to see how well it matches. Here's the result (yes, the page will load for a few seconds).
This link will show you the results and how well they match 'playoffs' with the keywords, when using category.This link will show you the results when using the q-parameter.
So, I guess the link you're looking for is:
http://gdata.youtube.com/feeds/api/users/nba/uploads?category=playoffs&alt=json
精彩评论