YouTube.js
Guide
Discord
GitHub
Guide
Discord
GitHub

youtubei.js / YT / Search

Class: Search

Extends

  • Feed<ISearchResponse>

Constructors

new Search()

new Search(actions, data, already_parsed): Search

Parameters

• actions: Actions

• data: ApiResponse | ISearchResponse

• already_parsed: boolean = false

Returns

Search

Overrides

Feed.constructor

Defined in

src/parser/youtube/Search.ts:26

Properties

estimated_results

estimated_results: number

Defined in

src/parser/youtube/Search.ts:21


header?

optional header: SearchHeader

Defined in

src/parser/youtube/Search.ts:18


refinement_cards?

optional refinement_cards: null | HorizontalCardList

Defined in

src/parser/youtube/Search.ts:24


refinements

refinements: string[]

Defined in

src/parser/youtube/Search.ts:20


results

results: ObservedArray<YTNode>

Defined in

src/parser/youtube/Search.ts:19


sub_menu?

optional sub_menu: SearchSubMenu

Defined in

src/parser/youtube/Search.ts:22


watch_card?

optional watch_card: UniversalWatchCard

Defined in

src/parser/youtube/Search.ts:23

Accessors

actions

get actions(): Actions

Returns

Actions

Inherited from

Feed.actions

Defined in

src/core/mixins/Feed.ts:178


channels

get channels(): ObservedArray<Channel | GridChannel>

Get all the channels in the feed

Returns

ObservedArray<Channel | GridChannel>

Inherited from

Feed.channels

Defined in

src/core/mixins/Feed.ts:123


has_continuation

get has_continuation(): boolean

Checks if the feed has continuation.

Returns

boolean

Inherited from

Feed.has_continuation

Defined in

src/core/mixins/Feed.ts:192


memo

get memo(): Memo

Returns

Memo

Inherited from

Feed.memo

Defined in

src/core/mixins/Feed.ts:134


page

get page(): T

Get the original page data

Returns

T

Inherited from

Feed.page

Defined in

src/core/mixins/Feed.ts:185


page_contents

get page_contents(): ReloadContinuationItemsCommand | SectionList | MusicQueue | RichGrid

Returns contents from the page.

Returns

ReloadContinuationItemsCommand | SectionList | MusicQueue | RichGrid

Inherited from

Feed.page_contents

Defined in

src/core/mixins/Feed.ts:141


playlists

get playlists(): ObservedArray<GridPlaylist | LockupView | Playlist>

Get all playlists in the feed

Returns

ObservedArray<GridPlaylist | LockupView | Playlist>

Inherited from

Feed.playlists

Defined in

src/core/mixins/Feed.ts:130


posts

get posts(): ObservedArray<BackstagePost | Post | SharedPost>

Get all the community posts in the feed

Returns

ObservedArray<BackstagePost | Post | SharedPost>

Inherited from

Feed.posts

Defined in

src/core/mixins/Feed.ts:116


refinement_card_queries

get refinement_card_queries(): string[]

Returns a list of refinement card queries.

Returns

string[]

Defined in

src/parser/youtube/Search.ts:77


secondary_contents

get secondary_contents(): undefined | SuperParsedResult<YTNode>

Returns secondary contents from the page.

Returns

undefined | SuperParsedResult<YTNode>

Inherited from

Feed.secondary_contents

Defined in

src/core/mixins/Feed.ts:166


shelves

get shelves(): ObservedArray<ReelShelf | RichShelf | Shelf>

Returns all segments/sections from the page.

Returns

ObservedArray<ReelShelf | RichShelf | Shelf>

Inherited from

Feed.shelves

Defined in

src/core/mixins/Feed.ts:152


videos

get videos(): ObservedArray<Video | CompactVideo | GridVideo | PlaylistPanelVideo | PlaylistVideo | ReelItem | ShortsLockupView | WatchCardCompactVideo>

Get all the videos in the feed

Returns

ObservedArray<Video | CompactVideo | GridVideo | PlaylistPanelVideo | PlaylistVideo | ReelItem | ShortsLockupView | WatchCardCompactVideo>

Inherited from

Feed.videos

Defined in

src/core/mixins/Feed.ts:109

Methods

getContinuation()

getContinuation(): Promise<Search>

Retrieves next batch of search results.

Returns

Promise<Search>

Overrides

Feed.getContinuation

Defined in

src/parser/youtube/Search.ts:84


getContinuationData()

getContinuationData(): Promise<undefined | ISearchResponse>

Retrieves continuation data as it is.

Returns

Promise<undefined | ISearchResponse>

Inherited from

Feed.getContinuationData

Defined in

src/core/mixins/Feed.ts:199


getShelf()

getShelf(title): undefined | ReelShelf | RichShelf | Shelf

Finds shelf by title.

Parameters

• title: string

Returns

undefined | ReelShelf | RichShelf | Shelf

Inherited from

Feed.getShelf

Defined in

src/core/mixins/Feed.ts:159


selectRefinementCard()

selectRefinementCard(card): Promise<Search>

Applies given refinement card and returns a new Search object. Use refinement_card_queries to get a list of available refinement cards.

Parameters

• card: string | SearchRefinementCard

Returns

Promise<Search>

Defined in

src/parser/youtube/Search.ts:55


getPlaylistsFromMemo()

static getPlaylistsFromMemo(memo): ObservedArray<GridPlaylist | LockupView | Playlist>

Get all playlists on a given page via memo

Parameters

• memo: Memo

Returns

ObservedArray<GridPlaylist | LockupView | Playlist>

Inherited from

Feed.getPlaylistsFromMemo

Defined in

src/core/mixins/Feed.ts:91


getVideosFromMemo()

static getVideosFromMemo(memo): ObservedArray<Video | CompactVideo | GridVideo | PlaylistPanelVideo | PlaylistVideo | ReelItem | ShortsLockupView | WatchCardCompactVideo>

Get all videos on a given page via memo

Parameters

• memo: Memo

Returns

ObservedArray<Video | CompactVideo | GridVideo | PlaylistPanelVideo | PlaylistVideo | ReelItem | ShortsLockupView | WatchCardCompactVideo>

Inherited from

Feed.getVideosFromMemo

Defined in

src/core/mixins/Feed.ts:75

Edit this page
Last Updated:: 3/25/25, 8:08 PM
Contributors: EdamAme-x