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

youtubei.js / YT / Comments

Class: Comments

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

Constructors

Constructor

new Comments(actions, data, already_parsed?): Comments

Defined in: src/parser/youtube/Comments.ts:23

Parameters

actions

Actions

data

any

already_parsed?

boolean = false

Returns

Comments

Properties

contents

contents: ObservedArray<CommentThread>

Defined in: src/parser/youtube/Comments.ts:21


header?

optional header?: CommentsHeader

Defined in: src/parser/youtube/Comments.ts:20

Accessors

has_continuation

Get Signature

get has_continuation(): boolean

Defined in: src/parser/youtube/Comments.ts:118

Returns

boolean


page

Get Signature

get page(): INextResponse

Defined in: src/parser/youtube/Comments.ts:122

Returns

INextResponse

Methods

applySort()

applySort(sort): Promise<Comments>

Defined in: src/parser/youtube/Comments.ts:54

Applies given sort option to the comments.

Parameters

sort

"TOP_COMMENTS" | "NEWEST_FIRST"

Sort type.

Returns

Promise<Comments>


createComment()

createComment(text): Promise<ApiResponse>

Defined in: src/parser/youtube/Comments.ts:81

Creates a top-level comment.

Parameters

text

string

Comment text.

Returns

Promise<ApiResponse>


getContinuation()

getContinuation(): Promise<Comments>

Defined in: src/parser/youtube/Comments.ts:99

Retrieves next batch of comments.

Returns

Promise<Comments>

Edit this page
Last Updated: 10/20/26, 8:11 PM