yt_video_comments
Pack: youtube · Endpoint: https://gateway.pipeworx.io/youtube/mcp
Get top-level comment threads on a YouTube video. Returns author, text, like count, and publish date.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
_apiKey | string | yes | YouTube Data API v3 key from Google Cloud Console |
video_id | string | yes | Video ID to fetch comments for |
max_results | number | no | Number of comment threads to return (default 20, max 100) |
order | string | no | Sort order: “time” or “relevance” (default: “relevance”) |
Example call
Arguments
{
"_apiKey": "your-youtube-api-key",
"video_id": "dQw4w9WgXcQ"
}
curl
curl -X POST https://gateway.pipeworx.io/youtube/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"yt_video_comments","arguments":{"_apiKey":"your-youtube-api-key","video_id":"dQw4w9WgXcQ"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('yt_video_comments', {
"_apiKey": "your-youtube-api-key",
"video_id": "dQw4w9WgXcQ"
});
More examples
{
"_apiKey": "your-youtube-api-key",
"video_id": "dQw4w9WgXcQ",
"max_results": 50,
"order": "time"
}
Response shape
Always returns: total_results, comments
| Field | Type | Description |
|---|---|---|
total_results | number | Total number of comment threads |
comments | array | Array of top-level comment thread objects |
Full JSON Schema
{
"type": "object",
"properties": {
"total_results": {
"type": "number",
"description": "Total number of comment threads"
},
"comments": {
"type": "array",
"description": "Array of top-level comment thread objects",
"items": {
"type": "object",
"properties": {
"comment_id": {
"type": "string",
"description": "Comment ID"
},
"author": {
"type": "string",
"description": "Author display name"
},
"author_channel_url": {
"type": "string",
"description": "Author's channel URL"
},
"text": {
"type": "string",
"description": "Comment text content"
},
"like_count": {
"type": "number",
"description": "Number of likes on comment"
},
"reply_count": {
"type": "number",
"description": "Number of replies to comment"
},
"published_at": {
"type": "string",
"description": "ISO 8601 publish date"
},
"updated_at": {
"type": "string",
"description": "ISO 8601 last update date"
}
},
"required": [
"comment_id",
"author",
"author_channel_url",
"text",
"like_count",
"reply_count",
"published_at",
"updated_at"
]
}
}
},
"required": [
"total_results",
"comments"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"youtube": {
"url": "https://gateway.pipeworx.io/youtube/mcp"
}
}
}
See Getting Started for client-specific install steps.