Skip to content
This repository has been archived by the owner on Jun 26, 2024. It is now read-only.

baptisteArno/node-youtube-music

Repository files navigation

typescript-starter dark logo

Unofficial YouTube Music API for Node.js

version downloads install size

Features

  • 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

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);