Skip to content

my-frontend-lab/youtube-metadata-from-url

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

youtube-metadata-from-url

Simple module to get a video metadata from url

npm npm

NPM

youtube-metadata-from-url is a simple module to get a youtube metadata passing just the video url.

Install

Install from the command line

$ npm i youtube-metadata-from-url

Install via github package

Example

Try it here

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.

About

Simple module to get a video metadata from url

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%