- Search
- Musics
- Playlists
- Albums
- Artists
- List musics from playlist
- List musics from album
- List albums from artist
- List musics from artist
- Get suggestions from music
- Playlist management (create, push, remove)
- Library management
npm install node-youtube-music
or
yarn add node-youtube-music
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);