Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/baptistearno/node-youtube-music

Unofficial YouTube Music API for Node.js
https://github.com/baptistearno/node-youtube-music

api api-wrapper youtube youtube-api youtube-channel youtube-playlist youtube-search youtube-video

Last synced: about 2 hours ago
JSON representation

Unofficial YouTube Music API for Node.js

Awesome Lists containing this project

README

        


typescript-starter dark logo


Unofficial YouTube Music API for Node.js



version


downloads


install size

## 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

```shell
npm install node-youtube-music
```

or

```shell
yarn add node-youtube-music
```

## How to use

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