Extract comment replies
Returns a YouTube comment and its replies. Use a comment ID returned by the comments endpoint. A reply ID may also be used to return its parent thread. The ID must belong to the provided video.
/comments/replies Comments https://api.fetchlayer.dev/youtube/comments/replies Headers
Authorization string required Bearer token — your FetchLayer API key.
Parameters
videoUrl string required YouTube video URL the comment belongs to.
commentId string required Comment ID returned by Get YouTube Comments. A reply ID may also be used to return its full thread.
depth number optional Number of reply levels to include. Defaults to direct replies only. (default: 0)
Response Fields
replies
Extract comment replies
username string Comment author username (with @).
comment string Full comment text.
likes number Number of likes.
hasReplies boolean Whether this comment has nested replies.
date string Relative date string (e.g. "1 day ago").
nestedReplies object[] Nested reply comments (same structure, recursive).
Request
curl -X POST "https://api.fetchlayer.dev/youtube/comments/replies" \
-H "Authorization: Bearer ss-your-key" \
-H "Content-Type: application/json" \
-d '{"videoUrl":"https://www.youtube.com/watch?v=dQw4w9WgXcQ","commentId":"Ugz..."}'Response
{
"username": "@User123",
"comment": "Great video!",
"likes": 42,
"hasReplies": true,
"date": "1 day ago",
"nestedReplies": [
{
"username": "@ReplyUser",
"comment": "Agreed!",
"likes": 5,
"hasReplies": false,
"date": "1 day ago"
}
]
}