YouTube Comments API — Extract Comments & Replies | FetchLayer
FetchLayer fetchlayer.dev Sign in
YouTube API · Live REST · JSON · MCP

YouTube comments,
ready for your code and AI.

Extract public comments and nested replies from a YouTube video URL as structured JSON. Sort by top or newest, choose reply depth, and turn viewer feedback into research, content ideas, or AI analysis.

Free tier included · No credit card required · Use from any HTTP client

TypeScript / JavaScript? Use the open-source SDK: on npm · Source on GitHub

POST /youtube/comments
200 OK

Request

$ curl -X POST https://api.fetchlayer.dev/youtube/comments \
  -H "Authorization: Bearer ss-your-key" \
  -H "Content-Type: application/json" \
  -d '{"videoUrl":"https://youtube.com/watch?v=...","sort":"newest"}'

Response

[
  {
    "username": "@viewer",
    "comment": "Please cover offline mode next.",
    "likes": 42,
    "hasReplies": true,
    "date": "1 day ago",
    "nestedReplies": [ ... ]
  }
]

Used by developers at

Individual developers or teams — not official partnerships

Built for feedback workflows

Fetch the public signal. Use it wherever your team works.

Public video comments

Provide a public YouTube video URL and retrieve the visible comment conversation as structured JSON.

Top or newest

Prioritize the most engaged feedback or focus on the latest reaction to a new video, launch, or announcement.

Nested replies

Control reply depth when the valuable signal is in the conversation below a top-level comment.

Audience research

Find repeated questions, objections, praise, and content requests in the comments your audience leaves publicly.

AI-ready JSON

Send comments to an LLM or MCP agent to summarize viewer sentiment, group themes, and surface pain points.

Your workflow, your schedule

Call the endpoint from your own code, cron job, or automation when you need another fresh snapshot of the discussion.

FetchLayer Research Chat

Analyze YouTube comments with AI—then export the results to CSV.

Paste a video URL into FetchLayer Research Chat and ask what the audience is saying. It can surface recurring questions, pain points, sentiment, and content requests while keeping the source comments in a reusable file.

  • Ask questions in plain English
  • Analyze themes, sentiment, and pain points
  • Download the structured results as CSV or JSON
Analyze comments in Chat

No code or setup required · Uses your FetchLayer credits

YouTube research

Analyze the comments on this YouTube video. Find recurring questions, pain points, and content requests, then export the comments and themes as CSV.

Y

I found four recurring questions and three strong follow-up content ideas. The comment-level themes, engagement, and source context are organized in the export.

youtube-comment-analysis.csv

284 comments · 7 columns · ready to download

CSV

From raw feedback to action

One request is the start of the workflow.

Store the structured response, run it on a schedule, pass it to an LLM, or feed it into the system your team already uses. FetchLayer handles retrieval so you can focus on the outcome.

  1. 01

    Provide a video URL

    Use the public URL for the video whose comments you want to understand.

  2. 02

    Choose the view of the conversation

    Set top or newest sorting, the reply depth you need, and how far to scroll for more comments.

  3. 03

    Analyze or act on the signal

    Store the comments, run your own monitoring workflow, or ask an AI agent to identify the useful patterns.

MCP & agents

Live

Your AI already knows how to use this.

Use the YouTube endpoint directly from your MCP-compatible agent. Ask it to retrieve public feedback, identify patterns, and turn the result into a useful brief without writing integration glue.

mcp.json Model Context Protocol
{
  "mcpServers": {
    "fetchlayer": {
      "url": "https://mcp.fetchlayer.dev",
      "headers": {
        "Authorization": "Bearer sk-..."
      }
    }
  }
}
agent chat using fetchlayer

Read the newest comments on this product video. What questions keep appearing, what do viewers dislike, and what follow-up video should the creator make?

Using fetchlayer.youtube_comments

The discussion is broadly positive, but the repeated request is a step-by-step setup walkthrough. Viewers also ask whether the product supports offline use and team collaboration.

Works with every MCP-compatible tool

Cursor
VS Code
Windsurf
Claude
Cline
OpenClaw
No wrapper code
All 1 endpoints exposed as tools
Official & maintained
Free to install

Use cases

What developers build with YouTube comment data.

Same API, endless applications. Here is what teams ship with public audience feedback.

01

Audience intelligence

Analyze public comments on your videos or competitors to find repeated questions, objections, and demand.

audienceresearchcomments
02

AI agent context

Give Claude, Codex, or your MCP agent structured comments and replies without copy-pasting threads.

llmagentsmcp
03

Launch monitoring

Watch newest comments after a launch, announcement, or campaign and route emerging concerns quickly.

alertsmonitoringlaunches
04

Content research

Turn repeated viewer questions and requests into the next video, FAQ, tutorial, or product explanation.

contentideasquestions
05

Product feedback

Capture objections, setup friction, and feature requests when a video introduces your product.

feedbackobjectionsinsight
06

Competitor research

Study public comment sections to see where competing content leaves an audience unconvinced or unanswered.

competitorsgapsdemand

Compare approaches

Spend time on the insight, not the collection layer.

What you needFetchLayerOfficial APIBuild it yourself
One URL to structured commentsProject setupYou build it
No Google Cloud configurationRequiredYou manage it
Nested reply supportMultiple methodsYou parse it
Ready for AI and MCP workflowsYour integrationYour integration

FetchLayer provides access to publicly available data. It is not affiliated with, endorsed by, or sponsored by the platform.

Pricing

Start free. Pay for what you use, or lock in a flat rate.

Credits for flexible, no-commitment usage. Subscriptions for a fixed monthly rate with built-in savings. Subscriptions+ for teams that want volume pricing at scale.

Free plan

30 free requests

A small test drive to verify the API, inspect real responses, and decide whether you want to stay on credits or move to a subscription.

Try free

Pay as you go

$1.99 per 1,000 requests

$0.00199 per request

How credits are counted

One credit = one request. No matter how many results come back — replies, comments, search pages — you pay for the call, not the output size.

Your first successful payment unlocks unlimited API keys on the account, including pay-as-you-go credits.

  • No monthly commitment — buy only what you need
  • Credits never expire — they stay until you use them
  • Same API, same MCP access, same data quality
  • ∞ req/min
Get API key

Credits never expire

Buy once, use whenever. There's no monthly reset, no pressure to hit a quota, no wasted credits at the end of a billing cycle.

No strings attached

No subscription to cancel, no seat minimums, no contract to negotiate. Start, pause, or scale whenever you want.

Full access from credit one

Every endpoint, MCP included, is available on credits. You're not on a limited tier — you get the same data as any subscriber.

FAQ

Common questions.

What can the YouTube Comments API retrieve?

FetchLayer extracts public top-level YouTube comments and nested replies from a video URL. Each result includes the author username, comment text, likes, relative date, and reply structure.

Do I need a Google Cloud project or YouTube credentials?

No. Authenticate with your FetchLayer API key and provide the public YouTube video URL you want to retrieve comments from.

Can I retrieve newest comments instead of top comments?

Yes. Set the sort option to top or newest depending on whether you need the most engaged feedback or the latest discussion.

Can an AI agent analyze the comments?

Yes. The endpoint returns structured comment data that you can pass to an LLM or use through FetchLayer’s MCP server to identify sentiment, recurring questions, content ideas, and customer feedback.

Can I analyze and export YouTube comments without code?

Yes. FetchLayer Research Chat can retrieve public comments from a YouTube video, analyze the discussion with AI, and export the structured results as a downloadable CSV or JSON file.

How do I retrieve more comments or nested replies?

Set a higher pages value to fetch more pages of top-level comments. Set a higher depth value to include more levels of nested replies for each comment thread.

Start pulling youtube comments today.

Get a free API key, make your first request, and put public feedback to work in your own product or research workflow.