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

youtubei.js / YTNodes / VideoCard

Class: VideoCard

Defined in: src/parser/classes/VideoCard.ts:6

Extends

  • Video

Constructors

Constructor

new VideoCard(data): VideoCard

Defined in: src/parser/classes/VideoCard.ts:11

Parameters

data

RawNode

Returns

VideoCard

Overrides

Video.constructor

Properties

additional_metadatas?

optional additional_metadatas: Text[]

Defined in: src/parser/classes/Video.ts:22

Inherited from

Video.additional_metadatas


author

author: Author

Defined in: src/parser/classes/Video.ts:26

Inherited from

Video.author


badges

badges: ObservedArray<MetadataBadge>

Defined in: src/parser/classes/Video.ts:27

Inherited from

Video.badges


byline_text?

optional byline_text: Text

Defined in: src/parser/classes/Video.ts:37

Inherited from

Video.byline_text


description_snippet?

optional description_snippet: Text

Defined in: src/parser/classes/Video.ts:19

Inherited from

Video.description_snippet


endpoint?

optional endpoint: NavigationEndpoint

Defined in: src/parser/classes/Video.ts:28

Inherited from

Video.endpoint


expandable_metadata

expandable_metadata: ExpandableMetadata | null

Defined in: src/parser/classes/Video.ts:21

Inherited from

Video.expandable_metadata


is_watched

is_watched: boolean

Defined in: src/parser/classes/Video.ts:35

Inherited from

Video.is_watched


length_text?

optional length_text: Text

Defined in: src/parser/classes/Video.ts:33

Inherited from

Video.length_text


menu

menu: Menu | null

Defined in: src/parser/classes/Video.ts:36

Inherited from

Video.menu


metadata_text?

optional metadata_text: Text

Defined in: src/parser/classes/VideoCard.ts:9


published?

optional published: Text

Defined in: src/parser/classes/Video.ts:29

Inherited from

Video.published


rich_thumbnail?

optional rich_thumbnail: YTNode

Defined in: src/parser/classes/Video.ts:25

Inherited from

Video.rich_thumbnail


search_video_result_entity_key?

optional search_video_result_entity_key: string

Defined in: src/parser/classes/Video.ts:38

Inherited from

Video.search_video_result_entity_key


service_endpoint?

optional service_endpoint: NavigationEndpoint

Defined in: src/parser/classes/Video.ts:40

Inherited from

Video.service_endpoint


service_endpoints?

optional service_endpoints: NavigationEndpoint[]

Defined in: src/parser/classes/Video.ts:39

Inherited from

Video.service_endpoints


short_view_count?

optional short_view_count: Text

Defined in: src/parser/classes/Video.ts:31

Inherited from

Video.short_view_count


show_action_menu

show_action_menu: boolean

Defined in: src/parser/classes/Video.ts:34

Inherited from

Video.show_action_menu


snippets?

optional snippets: object[]

Defined in: src/parser/classes/Video.ts:20

hover_text

hover_text: Text

text

text: Text

Inherited from

Video.snippets


style?

optional style: "VIDEO_STYLE_TYPE_UNKNOWN" | "VIDEO_STYLE_TYPE_NORMAL" | "VIDEO_STYLE_TYPE_POST" | "VIDEO_STYLE_TYPE_SUB" | "VIDEO_STYLE_TYPE_LIVE_POST" | "VIDEO_STYLE_TYPE_FULL_BLEED_ISOLATED" | "VIDEO_STYLE_TYPE_WITH_EXPANDED_METADATA"

Defined in: src/parser/classes/Video.ts:41

Inherited from

Video.style


thumbnail_overlays

thumbnail_overlays: ObservedArray<YTNode>

Defined in: src/parser/classes/Video.ts:24

Inherited from

Video.thumbnail_overlays


thumbnails

thumbnails: Thumbnail[]

Defined in: src/parser/classes/Video.ts:23

Inherited from

Video.thumbnails


title

title: Text

Defined in: src/parser/classes/Video.ts:17

Inherited from

Video.title


type

readonly type: string

Defined in: src/parser/helpers.ts:8

Inherited from

Video.type


untranslated_title?

optional untranslated_title: Text

Defined in: src/parser/classes/Video.ts:18

Inherited from

Video.untranslated_title


upcoming?

optional upcoming: Date

Defined in: src/parser/classes/Video.ts:32

Inherited from

Video.upcoming


video_id

video_id: string

Defined in: src/parser/classes/Video.ts:16

Inherited from

Video.video_id


view_count?

optional view_count: Text

Defined in: src/parser/classes/Video.ts:30

Inherited from

Video.view_count


type

static type: string = 'VideoCard'

Defined in: src/parser/classes/VideoCard.ts:7

Overrides

Video.type

Accessors

best_thumbnail

Get Signature

get best_thumbnail(): Thumbnail | undefined

Defined in: src/parser/classes/Video.ts:148

Returns

Thumbnail | undefined

Inherited from

Video.best_thumbnail


description

Get Signature

get description(): string

Defined in: src/parser/classes/Video.ts:119

Returns

string

Inherited from

Video.description


duration

Get Signature

get duration(): object

Defined in: src/parser/classes/Video.ts:152

Returns

object

seconds

seconds: number

text

text: string | undefined = length_text

Inherited from

Video.duration


has_captions

Get Signature

get has_captions(): boolean

Defined in: src/parser/classes/Video.ts:144

Returns

boolean

Inherited from

Video.has_captions


id

Get Signature

get id(): string

Defined in: src/parser/classes/Video.ts:115

Deprecated

Use video_id instead.

Returns

string

Inherited from

Video.id


is_4k

Get Signature

get is_4k(): boolean

Defined in: src/parser/classes/Video.ts:140

Returns

boolean

Inherited from

Video.is_4k


is_live

Get Signature

get is_live(): boolean

Defined in: src/parser/classes/Video.ts:125

Returns

boolean

Inherited from

Video.is_live


is_premiere

Get Signature

get is_premiere(): boolean

Defined in: src/parser/classes/Video.ts:136

Returns

boolean

Inherited from

Video.is_premiere


is_upcoming

Get Signature

get is_upcoming(): boolean | undefined

Defined in: src/parser/classes/Video.ts:132

Returns

boolean | undefined

Inherited from

Video.is_upcoming

Methods

as()

as<T, K>(...types): InstanceType<K[number]>

Defined in: src/parser/helpers.ts:29

Cast to one of the given types.

Type Parameters

T

T extends YTNode

K

K extends YTNodeConstructor<T>[]

Parameters

types

...K

The types to cast to

Returns

InstanceType<K[number]>

The node cast to one of the given types

Throws

If the node is not of the given type

Inherited from

Video.as


hasKey()

hasKey<T, R>(key): this is VideoCard & { [k in string]: R }

Defined in: src/parser/helpers.ts:41

Check for a key without asserting the type.

Type Parameters

T

T extends string

R

R = any

Parameters

key

T

The key to check

Returns

this is VideoCard & { [k in string]: R }

Whether the node has the key

Inherited from

Video.hasKey


is()

is<T, K>(...types): this is InstanceType<K[number]>

Defined in: src/parser/helpers.ts:19

Check if the node is of the given type.

Type Parameters

T

T extends YTNode

K

K extends YTNodeConstructor<T>[]

Parameters

types

...K

The type to check

Returns

this is InstanceType<K[number]>

whether the node is of the given type

Inherited from

Video.is


key()

key<T, R>(key): Maybe

Defined in: src/parser/helpers.ts:51

Assert that the node has the given key and return it.

Type Parameters

T

T extends string

R

R = any

Parameters

key

T

The key to check

Returns

Maybe

The value of the key wrapped in a Maybe

Throws

If the node does not have the key

Inherited from

Video.key

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