YouTube.js
Guide
Discord
❤️ Sponsor
GitHub
Guide
Discord
❤️ Sponsor
GitHub

youtubei.js / YT / Library

Class: Library

Defined in: src/parser/youtube/Library.ts:13

Extends

  • Feed<IBrowseResponse>

Constructors

Constructor

new Library(actions, data): Library

Defined in: src/parser/youtube/Library.ts:17

Parameters

actions

Actions

data

ApiResponse | IBrowseResponse

Returns

Library

Overrides

Feed.constructor

Properties

header

header: PageHeader | null

Defined in: src/parser/youtube/Library.ts:14


sections

sections: object[]

Defined in: src/parser/youtube/Library.ts:15

contents

contents: any[]

getAll()

getAll: () => Promise<Feed<IBrowseResponse> | History | Playlist>

Returns

Promise<Feed<IBrowseResponse> | History | Playlist>

title

title: Text = shelf.title

type

type: string | undefined = shelf.icon_type

Accessors

actions

Get Signature

get actions(): Actions

Defined in: src/core/mixins/Feed.ts:181

Returns

Actions

Inherited from

Feed.actions


channels

Get Signature

get channels(): ObservedArray<Channel | GridChannel>

Defined in: src/core/mixins/Feed.ts:126

Get all the channels in the feed

Returns

ObservedArray<Channel | GridChannel>

Inherited from

Feed.channels


clips

Get Signature

get clips(): { contents: any[]; getAll: () => Promise<Feed<IBrowseResponse> | History | Playlist>; title: Text; type: string | undefined; } | undefined

Defined in: src/parser/youtube/Library.ts:76

Returns

{ contents: any[]; getAll: () => Promise<Feed<IBrowseResponse> | History | Playlist>; title: Text; type: string | undefined; } | undefined


has_continuation

Get Signature

get has_continuation(): boolean

Defined in: src/core/mixins/Feed.ts:195

Checks if the feed has continuation.

Returns

boolean

Inherited from

Feed.has_continuation


history

Get Signature

get history(): { contents: any[]; getAll: () => Promise<Feed<IBrowseResponse> | History | Playlist>; title: Text; type: string | undefined; } | undefined

Defined in: src/parser/youtube/Library.ts:60

Returns

{ contents: any[]; getAll: () => Promise<Feed<IBrowseResponse> | History | Playlist>; title: Text; type: string | undefined; } | undefined


liked_videos

Get Signature

get liked_videos(): { contents: any[]; getAll: () => Promise<Feed<IBrowseResponse> | History | Playlist>; title: Text; type: string | undefined; } | undefined

Defined in: src/parser/youtube/Library.ts:68

Returns

{ contents: any[]; getAll: () => Promise<Feed<IBrowseResponse> | History | Playlist>; title: Text; type: string | undefined; } | undefined


memo

Get Signature

get memo(): Memo

Defined in: src/core/mixins/Feed.ts:137

Returns

Memo

Inherited from

Feed.memo


page

Get Signature

get page(): T

Defined in: src/core/mixins/Feed.ts:188

Get the original page data

Returns

T

Inherited from

Feed.page


page_contents

Get Signature

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

Defined in: src/core/mixins/Feed.ts:144

Returns contents from the page.

Returns

SectionList | MusicQueue | RichGrid | ReloadContinuationItemsCommand

Inherited from

Feed.page_contents


playlists

Get Signature

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

Defined in: src/core/mixins/Feed.ts:133

Get all playlists in the feed

Returns

ObservedArray<GridPlaylist | LockupView | Playlist>

Inherited from

Feed.playlists


playlists_section

Get Signature

get playlists_section(): { contents: any[]; getAll: () => Promise<Feed<IBrowseResponse> | History | Playlist>; title: Text; type: string | undefined; } | undefined

Defined in: src/parser/youtube/Library.ts:72

Returns

{ contents: any[]; getAll: () => Promise<Feed<IBrowseResponse> | History | Playlist>; title: Text; type: string | undefined; } | undefined


posts

Get Signature

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

Defined in: src/core/mixins/Feed.ts:119

Get all the community posts in the feed

Returns

ObservedArray<BackstagePost | Post | SharedPost>

Inherited from

Feed.posts


secondary_contents

Get Signature

get secondary_contents(): SectionList | BrowseFeedActions | ProfileColumn | SecondarySearchContainer | null

Defined in: src/core/mixins/Feed.ts:169

Returns secondary contents from the page.

Returns

SectionList | BrowseFeedActions | ProfileColumn | SecondarySearchContainer | null

Inherited from

Feed.secondary_contents


shelves

Get Signature

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

Defined in: src/core/mixins/Feed.ts:155

Returns all segments/sections from the page.

Returns

ObservedArray<ReelShelf | RichShelf | Shelf>

Inherited from

Feed.shelves


videos

Get Signature

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

Defined in: src/core/mixins/Feed.ts:112

Get all the videos in the feed

Returns

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

Inherited from

Feed.videos


watch_later

Get Signature

get watch_later(): { contents: any[]; getAll: () => Promise<Feed<IBrowseResponse> | History | Playlist>; title: Text; type: string | undefined; } | undefined

Defined in: src/parser/youtube/Library.ts:64

Returns

{ contents: any[]; getAll: () => Promise<Feed<IBrowseResponse> | History | Playlist>; title: Text; type: string | undefined; } | undefined

Methods

getContinuation()

getContinuation(): Promise<Feed<IBrowseResponse>>

Defined in: src/core/mixins/Feed.ts:219

Retrieves next batch of contents and returns a new Feed object.

Returns

Promise<Feed<IBrowseResponse>>

Inherited from

Feed.getContinuation


getContinuationData()

getContinuationData(): Promise<IBrowseResponse | undefined>

Defined in: src/core/mixins/Feed.ts:202

Retrieves continuation data as it is.

Returns

Promise<IBrowseResponse | undefined>

Inherited from

Feed.getContinuationData


getShelf()

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

Defined in: src/core/mixins/Feed.ts:162

Finds shelf by title.

Parameters

title

string

Returns

ReelShelf | RichShelf | Shelf | undefined

Inherited from

Feed.getShelf


getPlaylistsFromMemo()

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

Defined in: src/core/mixins/Feed.ts:94

Get all playlists on a given page via memo

Parameters

memo

Memo

Returns

ObservedArray<GridPlaylist | LockupView | Playlist>

Inherited from

Feed.getPlaylistsFromMemo


getVideosFromMemo()

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

Defined in: src/core/mixins/Feed.ts:78

Get all videos on a given page via memo

Parameters

memo

Memo

Returns

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

Inherited from

Feed.getVideosFromMemo

Edit this page
Last Updated: 10/12/25, 3:23 PM