ytsearch.js
YouTube Search

Search YouTube

Use searchYouTube to search videos, channels, playlists, movies or live streams and receive normalized, paginated results.

ts
searchYouTube(query: string, options?: SearchOptions): Promise<SearchResult>

Search options

OptionValuesDefault
typeany, video, channel, playlist, movie, livevideo
sortrelevance, upload_date, view_count, ratingrelevance
limitnumber, 10–5020

Search result groups

The returned object exposes videos, channels, playlists, movies and lives. The exact populated collection depends on the selected search type.