node-youtube-music
v0.10.3
Published
Unofficial YouTube Music API for Node.js
Downloads
131,940
Readme
Features
- [x] Search
- [x] Musics
- [x] Playlists
- [x] Albums
- [x] Artists
- [x] List musics from playlist
- [x] List musics from album
- [x] List albums from artist
- [x] List musics from artist
- [x] Get suggestions from music
- [ ] Playlist management (create, push, remove)
- [ ] Library management
Get started
npm install node-youtube-music
or
yarn add node-youtube-music
How to use
import {
searchMusics,
searchAlbums,
searchPlaylists,
getSuggestions,
listMusicsFromAlbum,
listMusicsFromPlaylist,
searchArtists,
getArtist,
} from 'node-youtube-music';
const musics = await searchMusics('Never gonna give you up');
const albums = await searchAlbums('Human after all');
const playlists = await searchPlaylists('Jazz');
const suggestions = await getSuggestions(musics[0].youtubeId);
const albumSongs = await listMusicsFromAlbum(albums[0].albumId);
const playlistSongs = await listMusicsFromPlaylist(playlists[0].playlistId);
const artists = await searchArtists('Daft Punk');
const artist = await getArtist(artists[0].artistId);