Get video comments
Returns a video's top-level comments, about 20 per page, top or newest first. Each comment has its author, like count, reply count and, when it has replies, a replies_cursor for /comments/replies. 1 credit per page.
Credits
Each successful page deducts 1 credit. A video with comments turned off returns 404 comments_disabled and costs nothing, and so does an empty page or an unavailable video.
Security
API Key
All requests require a valid API key from the developer dashboard.
Headers: Authorization: Bearer YOUR_API_KEYorX-API-Key: YOUR_API_KEY
See Authentication for headers and rate limits.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
idpath | string | Yes | 11-character YouTube video ID or video URL. |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sortquery | string | No |
|
cursorquery | string | No |
|
Response (HTTP 200)
{
"video_id": string,
"sort": "top" | "newest",
"comment_count": number, // Video total, first page only; YouTube rounds it
"comment_count_text": string, // As shown, e.g. "3.3K"
"has_more": boolean,
"next_cursor": string | null, // Pass as cursor for the next page
"comments": [
{
"id": string,
"text": string,
"author": {
"name": string, // e.g. "@handle"
"channel_id": string,
"avatar_url": string,
"is_channel_owner": boolean,
"is_verified": boolean
},
"like_count": number, // YouTube's rounded figure ("12K" is 12000)
"like_count_text": string,
"reply_count": number,
"published_text": string, // Relative, e.g. "3 years ago"
"is_edited": boolean,
"is_pinned": boolean,
"is_hearted": boolean, // Hearted by the creator
"replies_cursor": string // Present when the comment has replies
}
]
}YouTube shows only relative times and rounded like counts, so those are what the API returns.
Replies
GET /v1/videos/{id}/comments/replies?cursor=REPLIES_CURSOR returns a comment's replies in the same shape, without sort and comment_count. Pass a comment's replies_cursor, then the page's next_cursor for more. Same price: 1 credit per page.