Skip to content

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

GET/v1/youtube/video/comment-replies
ParameterTypeRequiredDescription
cursorstringnoReply cursor from /v1/youtube/video/comments, or pagination.cursor to page deeper
urlstringnoVideo URL or id. Required only when using comment_id
comment_idstringnoTop-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
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"
JavaScript
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);
Python
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.

response
{
  "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

Credits1 per live request, 0 on a cache hit
Cacheableyes: cache_max_age accepts a cached copy
Batchableyes: usable as a target in POST /v1/jobs/batch
Subscribableyes: as often as every 3600 seconds, firing a webhook only on a change

Other YouTube endpoints