GroundsocialDocs

API · YouTube

GET /youtube/videos/{id}/comments

Comments on a YouTube video, top or newest first, paginated.

RequestGET /v1/youtube/videos/{id}/comments
Operation idyoutube.video.comments
Cost1 credit, refunded if the call fails
AuthAPI key: Authorization: Bearer <key> or x-api-key.

Comments on a YouTube video, top or newest first, paginated.

Path parameters

NameTypeRequiredDescription
idstringyesA video or Short id, or any URL of it (watch, youtu.be, shorts, live, embed). Example: dQw4w9WgXcQ.

Query parameters

NameTypeRequiredDescription
order"top" | "newest"notop (default) or newest. One of top, newest.
textFormat"html" | "plainText"nohtml (default) or plainText. One of html, plainText.
afterstringnoThe previous page’s nextPageToken. Tokens last 6 hours.

Responses

StatusMeaningSchema
200A page of comment threads.YouTubeCommentThreadList
400Invalid input. Nothing was charged.Error
401Missing or invalid API key.Error
402Not enough credits, a spend cap was reached, or payment is required.Error
403The target is private, or the account is suspended.Error
404The video, channel, playlist or post does not exist, was removed, or has nothing there.Error
429Too many requests. Wait for Retry-After seconds.Error
503YouTube is temporarily unavailable. Retryable; nothing was charged.Error

YouTubeCommentThreadList fields

FieldTypeDescription
kind"youtube#commentThreadListResponse"
itemsYouTubeCommentThread[]
nextPageTokenstringPass as after for the next page. Absent on the last page. Lasts 6 hours.
pageInfoobject
commentCountstringAll comments on the video (first page only), as a decimal string (Data API style).

Errors use one shape everywhere; see Errors for every code and what to do.