Getting Started
Get your first YouTube comment extraction working in under two minutes.
1. Get your API key
Sign up for a FetchLayer account and generate an API key from the dashboard. Free tier included — no credit card required.
2. Make your first request
Extract comments from any YouTube video by URL.
curl
curl -X POST https://api.fetchlayer.dev/youtube/comments \
-H "Authorization: Bearer ss-your-key" \
-H "Content-Type: application/json" \
-d '{"videoUrl":"https://www.youtube.com/watch?v=dQw4w9WgXcQ","sort":"top"}'Tip
videoUrl accepts any standard YouTube link format — full URLs, youtu.be short links, and Shorts links all work.
3. Understand the response
Comments come back as a flat array. Each comment includes username, text, likes, and relative date. Use the /comments/replies endpoint to load a specific comment thread.
{
"username": "@User123",
"comment": "Great video!",
"likes": 42,
"hasReplies": true,
"date": "1 day ago"
}4. Extract a transcript
Get the transcript of any YouTube video as timestamped segments and plain text.
curl
curl -X POST https://api.fetchlayer.dev/youtube/transcript \
-H "Authorization: Bearer ss-your-key" \
-H "Content-Type: application/json" \
-d '{"videoUrl":"https://www.youtube.com/watch?v=dQw4w9WgXcQ","language":"en"}'