Nobody Packages More

    youtube-metadata-from-url

    1.0.3 • Public • Published

    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

    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.

    Install

    npm i youtube-metadata-from-url

    DownloadsWeekly Downloads

    188

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    3.13 kB

    Total Files

    3

    Last publish

    Collaborators

    • ezefranca