youtube-search-promise
v1.0.2 youtube search api promise
youtube-search-promise
Easily search for videos on Youtube using their v3 API.
Credit
Majority of this was actually written by Max Gfeller and his repo can be found here 👀 I simply refactored it slightly to return a Promise 😄🎉 I have not recreated his TypeScript implementation yet but look for that soon 📆
Options
You can pass a lot of optional parameters as the second parameter, they are documented here.
Rate limiting
Google enforces a rate limit on the Youtube Data API. You will probably need to
register your application for a key and supply this key in the opts
.
JavaScript Usage
var search = require("youtube-search-promise");
var opts = {
maxResults: 10,
key: "yourkey"
};
search("deadmau5", opts)
.then(results => {
console.log(results);
})
.catch(error => {
console.error(error);
});