2

I was searching but couldn't find anywhere how to retrieve random video which is most viewed or trending this day or this week. How could I do that?

good_evening
  • 21,085
  • 65
  • 193
  • 298

5 Answers5

10

No document hint a radom way. In fact, youtube use google search engine, as I know, there is no opinion set in all the google search api.

So if you want do a random show. You can catch all the standard result to database, then make them random show.

most recent

most viewed

top rated

most discussed

top favorites

recently featured

most responded

most linked

Giberno
  • 1,323
  • 4
  • 17
  • 31
8

The YouTube Data API will allow you to do that.

You can find out more about it here: http://gdata.youtube.com/demo/index.html

Josh Foskett
  • 4,073
  • 5
  • 31
  • 35
4

Dude you just need to consult the You Tube API

For Example you can use following urls to send requests to get most recent

http://gdata.youtube.com/feeds/api/standardfeeds/most_recent

most viewed

http://gdata.youtube.com/feeds/api/standardfeeds/most_viewed

Top rated

 http://gdata.youtube.com/feeds/api/standardfeeds/top_rated

etc. Consult the API, you will get the more information from there

Awais Qarni
  • 17,492
  • 24
  • 75
  • 137
0

I think this is possible, You can use YouTube authenticated Zend API

Read API methods from below link http://framework.zend.com/manual/en/zend.gdata.youtube.html

All the available methods are defined, so you be reading methods name you can guess what they are doing.

0

these are the methods in the youtube php api that gives you the opportunity to get a list of videos based on different criteria, then its easy to pick for example a random video from the top rated feeds.

http://code.google.com/apis/youtube/2.0/developers_guide_php.html#Retrieving_and_searching_for_videos

Jeger
  • 490
  • 5
  • 18