Skip to content

Latest commit

 

History

History
71 lines (48 loc) · 1.57 KB

README.md

File metadata and controls

71 lines (48 loc) · 1.57 KB

npm npm npm

yt-getvideos

Simple and complete youtube search API

Installation

npm install yt-getvideos

Easy to use

Searching for videos

const { search } = require('yt-getvideos');

search('Something you want to research').then(result => {
  console.log(result);
});

Channel videos

const { channelVideos } = require('yt-getvideos');

/* 
  Examples of links that are accepted:
    - https://www.youtube.com/c/Fireship/videos
    - https://www.youtube.com/channel/UCsBjURrPoezykLs9EqgamOA/videos
*/

channelVideos('https://www.youtube.com/c/Fireship/videos').then(result => {
  console.log(result);
});

Single video info

const { videoInfo } = require('yt-getvideos');

/* 
  Example:
    Link: https://www.youtube.com/watch?v=WBwfRBdaRiC
    The video hash id is `WBwfRBdaRiC`
*/

videoInfo('VIDEO-HASH-ID').then(result => {
  console.log(result);
});

About

Simple functions to get video information, list videos from a channel and search.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT