Simple and complete youtube search API
npm install yt-getvideos
const { search } = require('yt-getvideos');
search('Something you want to research').then(result => {
console.log(result);
});
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);
});
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);
});
Simple functions to get video information, list videos from a channel and search.
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.