Skip to main content

Quick Start

Installation

npm i youtubei

Example

const { Client, MusicClient } = require("youtubei");
// or for TS / ES6
import { Client, MusicClient } from "youtubei";

const youtube = new Client();
const music = new MusicClient();

(async () => {
const result = await youtube.search("Never gonna give you up", {
type: "video", // video | playlist | channel | all
});
console.log(result.items);

const musicResult = await youtube.search("Never gonna give you up");
console.log(musicResult);
})();

Read Client API

You can read the Client or MusicClient API