youtube-metadata-from-url
v1.0.3
Published
Get a youtube metadata just passing the video url
Downloads
1,038
Maintainers
Readme
youtube-metadata-from-url
Simple module to get a video metadata from url
youtube-metadata-from-url is a simple module to get a youtube metadata passing just the video url.
Install
npm install youtube-metadata-from-url --save
Example
const youtube = require('youtube-metadata-from-url');
const url = 'https://youtu.be/TRqiFPpw2fY';
youtube.metadata(url).then(function(json) {
console.log(json);
}, function(err){
console.log(err);
});
Response
{
"thumbnail_url": "https://i.ytimg.com/vi/WC5FdFlUcl0/hqdefault.jpg",
"type": "video",
"thumbnail_width": 480,
"html": "<iframe width=\"480\" height=\"270\" src=\"https://www.youtube.com/embed/WC5FdFlUcl0?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>",
"author_name": "AudioslaveVEVO",
"height": 270,
"width": 480,
"provider_name": "YouTube",
"author_url": "https://www.youtube.com/user/AudioslaveVEVO",
"title": "Audioslave - Be Yourself (Album Version, Closed Captioned)",
"provider_url": "https://www.youtube.com/",
"thumbnail_height": 360,
"version": "1.0"
}
License
This project is provided for educational purposes only. It is not affiliated with and has not been approved by Youtube.