YouTube Comment Replies API
Replies to one comment thread. Takes a cursor from the replyCursors list on /v1/youtube/video/comments, or (as a convenience) a video url plus comment_id, in which case we locate the thread on the first comment page for you. **Required:** Pass either cursor (from replyCursors on /v1/youtube/video/comments), or both url and comment_id. Calls cost 1 credit each. A cache hit is free, and a failed or empty response is never charged.
Try it
Prefilled with the request that produced the example below. No key yet? Get a free key.
Request
/v1/youtube/video/comment-replies| Parameter | Type | Required | Description |
|---|---|---|---|
| cursor | string | no | Reply cursor from /v1/youtube/video/comments, or pagination.cursor to page deeper |
| url | string | no | Video URL or id. Required only when using comment_id |
| comment_id | string | no | Top-level comment id (Ugx…) to fetch replies for |
Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).
curl "$API/v1/youtube/video/comment-replies?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D0e3GPea1Tyg&comment_id=UgzH8vliQSJKHQMGZjx4AaABAg&cache_max_age=7d" \
-H "x-api-key: $KEY"const query = new URLSearchParams({
url: 'https://www.youtube.com/watch?v=0e3GPea1Tyg',
comment_id: 'UgzH8vliQSJKHQMGZjx4AaABAg',
cache_max_age: '7d',
});
const response = await fetch(`${API}/v1/youtube/video/comment-replies?${query}`, {
headers: { 'x-api-key': KEY },
});
const body = await response.json();
if (!body.success) throw new Error(body.error.code);
// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);import os, httpx
r = httpx.get(
f"{os.environ['API']}/v1/youtube/video/comment-replies",
params={
"url": "https://www.youtube.com/watch?v=0e3GPea1Tyg",
"comment_id": "UgzH8vliQSJKHQMGZjx4AaABAg",
"cache_max_age": "7d",
},
headers={"x-api-key": os.environ["KEY"]},
timeout=30,
)
body = r.json()
if not body["success"]:
raise RuntimeError(body["error"]["code"])
print(body["data"], body["meta"]["creditsCharged"])Example response
Captured on , with raw removed and lists cut to two items. A live call returns current data.
{
"success": true,
"data": {
"items": [
{
"platform": "youtube",
"id": "UgzH8vliQSJKHQMGZjx4AaABAg.9V8_MXpsbSv9V8_NNseQDx",
"postId": "0e3GPea1Tyg",
"parentId": "UgzH8vliQSJKHQMGZjx4AaABAg",
"text": "shrek",
"authorId": "example-user-1",
"authorHandle": "example_user_1",
"authorName": "Example User 1",
"authorAvatarUrl": "https://example.com/media/1.jpg",
"likeCount": 26000,
"replyCount": null,
"isPinned": false,
"isAuthorReply": false,
"publishedAt": null
},
{
"platform": "youtube",
"id": "UgzH8vliQSJKHQMGZjx4AaABAg.9V8_MXpsbSv9V8_NOFPBTj",
"postId": "0e3GPea1Tyg",
"parentId": "UgzH8vliQSJKHQMGZjx4AaABAg",
"text": "Who else loves Mrbeast?\n\n👇",
"authorId": "example-user-2",
"authorHandle": "example_user_2",
"authorName": "Example User 2",
"authorAvatarUrl": "https://example.com/media/2.jpg",
"likeCount": 39000,
"replyCount": null,
"isPinned": false,
"isAuthorReply": false,
"publishedAt": null
}
]
},
"pagination": {
"cursor": "eyJ0IjoiRWcwU0N6QmxNMGRRWldFeFZIbG5HQVl5MmdFS1UyZGxkRjlqYjIxdFpXNTBYM2RwZEdoZmNtVndiR2xsYzE5emRISmxZVzB0TFVOblowbG5RVkZXUmpkbVVrOUNTVVpEUzBGblIwRkZhVVJuYjAxRFVEZFJMVzkzUjBWS2FsZGZMVVZDVlVGQ1dVRlJHbEFTR2xWbmVrZzRkbXhwVVZOS1MwaFJUVWRhYW5nMFFXRkJRa0ZuSWdJSUFDb1lWVU5ZTms5Uk0wUnJZM05pV1U1Rk5rZzRkVkZSZFZaQk1nc3daVE5IVUdWaE1WUjVaMEFBU0RLQ0FRSUlBU2dLUWk5amIyMXRaVzUwTFhKbGNHeHBaWE10YVhSbGJTMVZaM3BJT0hac2FWRlRTa3RJVVUxSFdtcDRORUZoUVVKQlp3JTNEJTNEIiwidiI6IkNndDFaMkk1UVdSeU1WbEVjeWpKdWVEV0JqSUtDZ0pWVXhJRUdnQWdIbUs3QWdxNEFrTjFZMEpEUVZWVGJWRkZRamhSV25WYWFERkRZVkJ0YlVObFVtOVJVM3BOVjE5dk5GUm9jbmRWV1hSTVkwSlBPR3h2UWxRMmFWQnhWbWhITlVkWlQycEpaVmhUYzJ4Q1RHOXpUMTl0ZDJSeGRuWjZXa1pTYVU1TmJuSndhME5QZWxaVU4ycDBaVVpwZDBkYVpIUXlOVGQwY1RaWVYwTTBPRE5LVERKblpFdHhOelpZVjI5d1RVNUpZV2xhVTJSV2JXTkZZazVDUTFWdFlVdzBiMEp3VFhSMk9UZHFSM0ZvVFVOU1kwNUhiVXhQV1U5dmJHMDFNRlZ4VW5OQmJESkVRVzVpYWprdGJuZElOekJIU21kRGIxWlRPSEprV1VacmIwSlVTa1pCWkRad2JsVmZPVVZGZWxFeFRHOVpZemRvYjNNeFYzbFpXVGN5ZEY5dFMySklURmhFVVc5d2RVeGpVR05CYmxKWVZqRkZWSEpGVG0wdFkwbHdTMnR6YjBWRlpuaHFTakJTWVRaRVYwSmtOa0ozY0VWTUxXRktUbFZSUlElM0QlM0QifQ",
"hasMore": true,
"count": 10
},
"meta": {
"platform": "youtube",
"endpoint": "youtube.commentReplies",
"creditsCharged": 1,
"cached": false,
"cacheAgeSeconds": null,
"durationMs": 2677,
"requestId": "req_rko4cs25hpqpkdzu18mp"
}
}Returns
Returns a list of Comment in data.items.
Cost and behaviour
| Credits | 1 per live request, 0 on a cache hit |
| Cacheable | yes: cache_max_age accepts a cached copy |
| Batchable | yes: usable as a target in POST /v1/jobs/batch |
| Subscribable | yes: as often as every 3600 seconds, firing a webhook only on a change |
Other YouTube endpoints
- /v1/youtube/channel Channel details
- /v1/youtube/channel-videos Channel videos
- /v1/youtube/channel/community-posts Channel community posts
- /v1/youtube/channel/lives Channel live streams
- /v1/youtube/channel/playlists Channel playlists
- /v1/youtube/channel/shorts Channel shorts
- /v1/youtube/community-post Community post details
- /v1/youtube/playlist Playlist contents