YouTube Comments API
The FetchTranscript YouTube Comments API returns the comments of a YouTube video as JSON with a single GET request. Each comment comes with its text, the author’s name and channel ID, the like count, when it was posted and whether the creator pinned it, and the response tells you how many comments the whole video has. Ask for up to 500 comments per call with nothing more than an API key: no OAuth flow, no Google Cloud project, no quota units to budget.
No credit card needed. One API key works on every endpoint.
Quick example
/v1/videos/{video_id}/comments?limit=100Send your key in the X-API-Key header (or as Authorization: Bearer yt_…) and pass the video ID in the path. The official SDKs wrap the same call: pip install fetchtranscript or npm install fetchtranscript.
curl "https://api.fetchtranscript.com/v1/videos/dQw4w9WgXcQ/comments?limit=200" \
-H "X-API-Key: yt_your_api_key"Sample response
A successful call answers with HTTP 200 and this JSON. Comments the creator pinned are flagged with is_pinned, so you can keep them apart from the ones viewers wrote on their own.
{
"video_id": "dQw4w9WgXcQ",
"comments": [
{
"comment_id": "UgzqBTd2bX0yI5qO0oN4AaABAg",
"text": "Came here from a link that promised something else. Not even mad.",
"author": "@retro_listener",
"author_id": "UCq7Xb1v2nX0zFq3pV8wT5sA",
"like_count": 1843,
"reply_count": 27,
"published_at": "2025-06-02T00:00:00Z",
"is_pinned": false
},
{
"comment_id": "UgxL9kR4mZ2aW7cVq1t4AaABAg",
"text": "The bassline in this song is criminally underrated.",
"author": "@basslinebeth",
"author_id": "UCm3Hn8pR2sK9vT1wQ6yZ4bE",
"like_count": 312,
"reply_count": 4,
"published_at": "2025-05-28T00:00:00Z",
"is_pinned": false
}
],
"total_count": 2400000,
"has_more": true
}Illustrative values: a real response carries the live data of the video or channel you ask for.
| Field | Type | Description |
|---|---|---|
| video_id | string | The video the comments belong to. |
| comments | array | The comments, no more than the limit you asked for. |
| comments[].comment_id | string | YouTube’s ID of the comment, stable across requests: use it to de-duplicate. |
| comments[].text | string | The full text of the comment, with its line breaks. |
| comments[].author | string | The name the author shows on YouTube, usually their @handle. |
| comments[].author_id | string | null | The channel ID (UC…) of the author. |
| comments[].like_count | integer | null | Likes on the comment. |
| comments[].reply_count | integer | null | Number of replies to the comment (the replies themselves are not returned). |
| comments[].published_at | string | null | When the comment was posted. YouTube shows relative dates (“3 weeks ago”), so treat it as approximate. |
| comments[].is_pinned | boolean | True for the comment the creator pinned on top. |
| total_count | integer | null | The number of comments YouTube reports for the whole video. |
| has_more | boolean | True when the video has more comments than this response holds. |
Parameters
| Parameter | In | Type | Default | Description |
|---|---|---|---|---|
| video_id | path | string | required | The 11-character ID of the video, the part after v= in a watch URL. Any other format is refused with 400 invalid_video_id. |
| limit | query | integer | 100 | How many comments to return, from 1 to 500. A value outside that range is refused with a 422 validation error. |
| sort | query | string | top | top for the comments YouTube ranks first (the most liked and discussed), new for the most recent. |
Without a key the API answers 401 missing_api_key, with a revoked or wrong key 401 invalid_api_key, and with no credits left 402 insufficient_credits. If YouTube cannot be reached the answer is 503 service_unavailable: retry after a moment.
What you get and what you don’t
The endpoint reads the comment section of a public video the way a viewer sees it and returns the first limit top-level comments, the top ones by default or the newest with sort=new. It is built for analysis: one request gives you a sample of hundreds of real reactions, ready to feed to a script, a spreadsheet or a model.
It does not return reply threads, and it has no cursor to page past the first 500 comments: has_more and total_count tell you how much of the discussion your sample covers. Results are cached for one hour, so asking again for the same video and sort order within the hour returns the same snapshot quickly.
Use cases
Sentiment analysis
Score how viewers reacted to a product launch, a trailer or a review, compare the mood across a series of videos, or follow it over time with a daily snapshot.
Audience research
Find the questions viewers keep asking, the features they request and the problems they mention. The like count shows which opinions the rest of the audience agrees with.
Moderation datasets
Collect real comments to label as spam, abuse or off-topic and train or evaluate a moderation classifier. The comment ID keeps every example traceable and free of duplicates.
Feeding LLMs
Give a language model what viewers say next to what the video says: summarize the discussion, cluster recurring topics, or draft answers to frequent questions for the creator.
Brand and competitor monitoring
Track what people write under your videos and your competitors’, spot complaints early, and read the pinned comment where creators often put their sponsor links and calls to action.
Content ideas
Comments are a direct line to what an audience wants next. Mine the top comments of popular videos in your niche for topics, follow-up requests and the words viewers use themselves.
Comments and the official YouTube Data API
Google’s YouTube Data API also lists comments, through its commentThreads.list method. According to Google’s quota cost table, each call to it costs 1 quota unit, each additional page of results is a new call, and a project gets 10,000 units per day by default, shared with the other endpoints of the API.
FetchTranscript works differently: there is no daily quota, only a rate limit of 500 requests per minute, and you pay for the comments you receive, 1 credit per 100. Pick the official API when you need what it alone offers; pick FetchTranscript when you want comments, transcripts and metadata behind one key and one bill.
Pricing
Comments are billed by volume: 1 credit for every 100 comments returned, rounded up, with a minimum of 1 credit per successful call. 100 comments cost 1 credit, 250 cost 3 and 500 cost 5; the other endpoints cost 1 credit per call. A failed call, for example on a private video, costs nothing.
- 25 free credits every month, no credit card
- Then $1 per 1,000 credits, pay as you go
- Only successful calls are billed: errors cost nothing
- Credits never expire; bulk packs from 10,000 credits for $9
Also in the MCP server for AI assistants
The FetchTranscript MCP server gives Claude, Cursor and other MCP clients the same data as tools: get_comments, get_transcript and get_video_metadata. Ask your assistant “what do viewers say about this video?” and it calls get_comments, then reads the transcript with get_transcript if it needs to compare the two.
Run it with uvx fetchtranscript-mcp and your API key in FETCHTRANSCRIPT_API_KEY; the MCP server guide has the configuration for each client. Tool calls are billed like API calls.
YouTube Comments API: frequently asked questions
- Do I need a Google API key or OAuth to get YouTube comments?
- No. You only need a FetchTranscript API key, sent in the X-API-Key header or as Authorization: Bearer. There is no Google Cloud project to set up and no user consent screen.
- How many comments can I get per request?
- From 1 to 500, set with the limit parameter (100 by default). The response also tells you how many comments the video has in total (total_count) and whether there are more than you received (has_more).
- Are replies included?
- No. The endpoint returns top-level comments only, without the reply threads under them.
- What happens if the video is private, removed or the ID is wrong?
- A malformed ID gets 400 invalid_video_id; a video that does not exist or is private gets 404 video_not_found; a video whose owner turned comments off gets 404 comments_disabled. Failed calls are not billed.
- How much does it cost to fetch YouTube comments?
- Comments are billed by volume: 1 credit for every 100 comments returned, rounded up, with a minimum of 1 credit per successful call. 100 comments cost 1 credit, 250 cost 3 and 500 cost 5. Failed calls are free. Every account gets 25 free credits per month, then it is $1 per 1,000 credits, and credits never expire.
- Can I get the comments of many videos at once?
- Make one call per video. List a channel’s videos with the channel endpoint or find videos with the search endpoint, then fetch the comments of each one, up to 500 requests per minute.
Related APIs
- YouTube Transcript APIThe full transcript of a video as timed JSON, plain text or SRT.
- YouTube Search APISearch YouTube by keyword and get up to 50 videos with channel, duration and views.
- YouTube Channel APIA channel’s details by @handle or ID, and the list of its videos page by page.
- YouTube Video Metadata APITitle, description, views, likes, tags, categories and chapters of any video.
- YouTube Subtitles APICaptions as SRT, plain text or timed JSON, in every language a video has.
Every parameter and error code is in the comments section of the API reference.
Start fetching YouTube comments
Create an account and get 25 free credits every month. Your first comments are one quick start away.