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?
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.
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
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.
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.
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