I want to retrieve videos by category "Comedy" and language is "Russian" (YouTube API v2):
http://gdata.youtube.com/feeds/api/videos?lr=ru&orderby=published&category=Comedy
But gets only 3-10 videos per day. It can not be. 3-5 videos by whole day? Filter does not work correctly.
The following code samples, which use the PHP:
$url="http://gdata.youtube.com/feeds/api/videos/?category=comedy&alt=json&lr=ru&orderby=published";
$json_output = json_decode(file_get_contents($url, 0, null, null));
$videos = $json_output->feed->entry;
foreach ( $videos as $v ) {
$title = $v->title->{'$t'};
$pub_date = substr($v->published->{'$t'}, 0, 10);
echo "$title // <strong>$pub_date</strong><br>";
}
The problem started in March 2013. It worked before.
There is no guarantee about the number of specific videos per day that will be surfacing in search feeds. The search feed interface isn't a "firehose" and not every video gets added to it; the videos that are returned are determined algorithmically, and those algorithms can change over time.
In order words, you're asking the YouTube Data API to return a feed of videos in Russian, with category "Comedy", ordered by descending date published. As long as the feed contains some videos that match those parameters, things are working as expected, even if you don't get back a complete list of all videos that match that criteria.