Inofficial npm publish!
Please refer to https://www.npmjs.com/package/youtube-music-api to view the original package. This is just a newer publish to fix 1 little bug.
youtube-music-api
Unoffical Youtube Music API
Installation
npm install youtube-music-api
Example
const YoutubeMusicApi = require('youtube-music-api')
const api = new YoutubeMusicApi()
api.initalize()
.then(info => {
api.getSearchSuggestions("ne deve ne kush").then(result => {
console.log(result)
})
api.search("ne deve ne kush").then(result => {
console.log(result)
})
api.search("ne deve ne kush", "song").then(result => console.log(result))
api.search("ne deve ne kush", "video").then(result => console.log(result))
api.search("ne deve ne kush", "album").then(result => console.log(result))
api.search("ne deve ne kush", "artist").then(result => console.log(result))
api.search("ne deve ne kush", "playlist").then(result => console.log(result))
api.getAlbum("MPREb_9TuSrHElFSO").then(result => {
console.log(result)
})
api.getArtist("UCCvxgd2z194wYgpBt-sajrA").then(result => {
console.log(result)
})
api.getPlaylist("VLPLTw3BBwcLBjG-4fernx2Xt-GHdYMPYAFM").then(result => {
console.log(result)
})
})
License
MIT