PHP Youtube API
$apiKey = '';
$categoryId = 1;
$period = '-10 days';
$limit = 30;
$page = 'JqwdgHdq'; // Here you can specify pageToken from previous API result
$apiSearch = new YoutubeApi\Search($apiKey);
$videosData = $apiSearch->videos()
->category($categoryId)
->order('viewCount')
->fromDate($period)
->limit($limit)
->page($page)
->getList();
composer.json
"require": {
"flrnull/youtube-api": "dev-master",
}
MIT