ytsearch.js
Example

Search Multiple YouTube Types

A focused example you can adapt to a Node.js application.

js
const results = await searchYouTube("lofi hip hop", {
  type: "any",
  limit: 20,
});

console.log(results.videos);
console.log(results.channels);
console.log(results.playlists);