100 free credits. No credit card required. Get a key

YouTube comments API

Comments on a YouTube video, top or newest first, 20 a page, as Data API youtube#commentThreads with likes, reply counts and pinned, hearted and creator flags.

GET /v1/youtube/videos/{id}/commentsBeta1 credit per callRefunded on failure
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/youtube/videos/dQw4w9WgXcQ/comments?order=newest",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
Response
200 · 1 credit
{
"kind": "youtube#commentThreadListResponse",
"items": [
{
"kind": "youtube#commentThread",
"id": "UgyunMmx4SBS1S5zV8N4AaABAg",
"snippet": {
"videoId": "dQw4w9WgXcQ",
"topLevelComment": {
"kind": "youtube#comment",
"id": "UgyunMmx4SBS1S5zV8N4AaABAg",
"snippet": {
"videoId": "dQw4w9WgXcQ",
"authorDisplayName": "@Autumnrose_offical",
"authorProfileImageUrl": "https://yt3.ggpht.com/weXNDvWzH4ouvHsY2M5B1wm6-yJB1Kcs9dwjT_4N69747UNnsr5ZepmhfId1qLQ-B9ky7wZvoA=s88-c-k-c0x00ffffff-no-…",
"authorChannelUrl": "https://www.youtube.com/@Autumnrose_offical",
"authorChannelId": {
"…": "1 fields"
},
"textDisplay": "I just rickrolled my Mother",
"textOriginal": "I just rickrolled my Mother",
"likeCount": 0,
"publishedAt": "2026-11-24T11:43:00.000Z",
"publishedTimeText": "17 minutes ago"
}
},
"totalReplyCount": 0,
"canReply": true
}
},
{
"kind": "youtube#commentThread",
"id": "UgwOqizhwUXRuH4RO-R4AaABAg",
"snippet": {
"videoId": "dQw4w9WgXcQ",
"topLevelComment": {
"kind": "youtube#comment",
"id": "UgwOqizhwUXRuH4RO-R4AaABAg",
"snippet": {
"videoId": "dQw4w9WgXcQ",
"authorDisplayName": "@EduardoPeñaHernández-n3k",
"authorProfileImageUrl": "https://yt3.ggpht.com/B2iovkqK16goSMLnbGp0Stu_bzj1e94kxN_gkFLOqEhy-Pd3EpWlTJ-9fbmzsTYoqjP78Ey68Q=s88-c-k-c0x00ffffff-no-…",
"authorChannelUrl": "https://www.youtube.com/@EduardoPeñaHernández-n3k",
"authorChannelId": {
"…": "1 fields"
},
"textDisplay": "OMG, I finally found that damn meme that’s so viral😭😭😭😭😭",
"textOriginal": "OMG, I finally found that damn meme that’s so viral😭😭😭😭😭",
"likeCount": 0,
"publishedAt": "2026-11-24T11:28:00.000Z",
"publishedTimeText": "32 minutes ago"
}
},
"totalReplyCount": 0,
"canReply": true
}
},
"… 1 more"
],
"pageInfo": {
"resultsPerPage": 3
},
"commentCount": "2462543"
}

Parameters

NameTypeDescription
idpath · requiredstringA video or Short id, or any URL of it (watch, youtu.be, shorts, live, embed). Example: dQw4w9WgXcQ.
orderquery"top" | "newest"top (default) or newest. One of top, newest.
textFormatquery"html" | "plainText"html (default) or plainText. One of html, plainText.
afterquerystringThe previous page’s nextPageToken. Tokens last 6 hours.
Response fields

200 with a YouTubeCommentThreadList, in the shape of YouTube Data API v3 resources.

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

Every error has code, message, hint and retryable. All error codes

Questions

How do I get replies?

Pass a thread’s repliesToken, or the video and the thread’s id, to the comment replies endpoint.

YouTube is a trademark of Google LLC. We are not affiliated with or endorsed by Google or YouTube.