Lightweight API for YouTube (Google API v3)
PHP Shell
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

readme.md

Nextras YoutubeApi

Downloads this Month Stable version

Installation

Use composer:

$ composer require nextras/youtube-api

Usage

$reader = new Nextras\YoutubeApi\Reader('<your google-api key>')
$video = $reader->getVideoByUrl('<youtube url>');

echo $video->title;
echo $video->duration; // in sec
echo $video->description;
echo $video->url;
echo $video->embed;
foreach ($video->thumbs as $thumb) {
    echo $video->url; 
}

License

MIT. See full license.