Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Youtube rss feed to show most popular video?

Tags:

youtube

rss

I have two youtube rss feeds but I want the most popular feed to show the most viewed video at the top, how can I do this?

http://www.youtube.com/rss/tag/channelname.rss http://gdata.youtube.com/feeds/api/users/channelname/uploads

like image 951
Beginner Avatar asked Dec 09 '25 08:12

Beginner


1 Answers

The feed you want is:

http://gdata.youtube.com/feeds/api/users/channel/uploads?alt=rss&v=2&orderby=viewCount

This will give you a channel's youtube videos sorted by view count. You can add &max-results=50 if you want more than the default 25. (Also I tend to add prettyprint=true and strict=true when I'm testing)

http://www.youtube.com/rss/tag/channelname.rss actually redirects to http://gdata.youtube.com/feeds/base/videos/-/channelname?orderby=published&alt=rss&client=ytapi-youtube-rss-redirect&v=2 which may work for the time being but Google has suggested people move away from the /feeds/base/ feeds. It's slightly unfortunate too (In the lazy way) because this /feeds/base/ feed with client=ytapi... gives you a nice renderable block of HTML for each entry.

like image 124
sente Avatar answered Dec 14 '25 00:12

sente



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!