youtube_comments: GET /
hasdata_youtube_comments_getYoutubeCommentsGet YouTube Comments
Returns a page of top-level comments on a YouTube video or short. sortBy=top is YouTube's Top ranking, which varies between viewers and over time; newest is stable. The pinned comment (pinned: true) stays first in both. Replies are fetched separately: pass a comment's replies.nextPageToken as nextPageToken to get that thread's replies (one level deep, paginated on their own). threadAvailable: false means the comment was deleted or its replies are hidden, and the shown reply count can exceed the replies returned. Tokens are self-contained and keep their sortBy, so v and sortBy can be omitted with them. Use for sentiment, feedback or moderation analysis, or to build comment datasets.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "hasdata_youtube_comments_getYoutubeComments"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| v | No | 11-character YouTube video ID — the value of the `v=` query parameter in a watch URL (e.g. `dQw4w9WgXcQ` for `https://www.youtube.com/watch?v=dQw4w9WgXcQ`). Required for the first page; omit it on continuation requests that pass `nextPageToken`. | |
| gl | No | The two-letter country code for the country you want to limit the search to. Provide one exact documented value (245 allowed), e.g. `ac`, `af`. | |
| hl | No | The two-letter language code for the language you want to use for the search. Provide one exact documented value (159 allowed), e.g. `af`, `ak`. | |
| sortBy | No | Comment order, `top` (YouTube's Top comments) or `newest`. | |
| deviceType | No | Device type for the request. | |
| nextPageToken | No | Next-page token from `pagination.nextPageToken`, or a comment's `replies.nextPageToken` to fetch its replies. |