youtubei.js / YT / Search
Class: Search
Extends
Constructors
new Search()
new Search(
actions,data,already_parsed):Search
Parameters
• actions: Actions
• data: ApiResponse | ISearchResponse
• already_parsed: boolean = false
Returns
Overrides
Defined in
src/parser/youtube/Search.ts:26
Properties
estimated_results
estimated_results:
number
Defined in
src/parser/youtube/Search.ts:21
header?
optionalheader:SearchHeader
Defined in
src/parser/youtube/Search.ts:18
refinement_cards?
optionalrefinement_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?
optionalsub_menu:SearchSubMenu
Defined in
src/parser/youtube/Search.ts:22
watch_card?
optionalwatch_card:UniversalWatchCard
Defined in
src/parser/youtube/Search.ts:23
Accessors
actions
getactions():Actions
Returns
Inherited from
Defined in
channels
getchannels():ObservedArray<Channel|GridChannel>
Get all the channels in the feed
Returns
ObservedArray<Channel | GridChannel>
Inherited from
Defined in
has_continuation
gethas_continuation():boolean
Checks if the feed has continuation.
Returns
boolean
Inherited from
Defined in
memo
getmemo():Memo
Returns
Inherited from
Defined in
page
getpage():T
Get the original page data
Returns
T
Inherited from
Defined in
page_contents
getpage_contents():SectionList|ReloadContinuationItemsCommand|MusicQueue|RichGrid
Returns contents from the page.
Returns
SectionList | ReloadContinuationItemsCommand | MusicQueue | RichGrid
Inherited from
Defined in
playlists
getplaylists():ObservedArray<GridPlaylist|LockupView|Playlist>
Get all playlists in the feed
Returns
ObservedArray<GridPlaylist | LockupView | Playlist>
Inherited from
Defined in
posts
getposts():ObservedArray<BackstagePost|SharedPost|Post>
Get all the community posts in the feed
Returns
ObservedArray<BackstagePost | SharedPost | Post>
Inherited from
Defined in
refinement_card_queries
getrefinement_card_queries():string[]
Returns a list of refinement card queries.
Returns
string[]
Defined in
src/parser/youtube/Search.ts:77
secondary_contents
getsecondary_contents():undefined|SuperParsedResult<YTNode>
Returns secondary contents from the page.
Returns
undefined | SuperParsedResult<YTNode>
Inherited from
Defined in
shelves
getshelves():ObservedArray<ReelShelf|RichShelf|Shelf>
Returns all segments/sections from the page.
Returns
ObservedArray<ReelShelf | RichShelf | Shelf>
Inherited from
Defined in
videos
getvideos():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
Defined in
Methods
getContinuation()
getContinuation():
Promise<Search>
Retrieves next batch of results.
Returns
Promise<Search>
Overrides
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
Defined in
getShelf()
Finds shelf by title.
Parameters
• title: string
Returns
undefined | ReelShelf | RichShelf | Shelf
Inherited from
Defined in
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()
staticgetPlaylistsFromMemo(memo):ObservedArray<GridPlaylist|LockupView|Playlist>
Get all playlists on a given page via memo
Parameters
• memo: Memo
Returns
ObservedArray<GridPlaylist | LockupView | Playlist>
Inherited from
Defined in
getVideosFromMemo()
staticgetVideosFromMemo(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>