Endpoints & Pricing
Two Endpoints, Five Price Tiers
You pay per call, not per comment. The rate falls as your deposit tier rises; there is no monthly plan.
Video comments
GET /api/—social/ youtube/ comments videorequired- About 20 top-level comments per call, from $0.0085 per 1,000 comments
sort=toporsort=newestnext_cursorpages further into the same video
Replies to a comment
GET /api/—social/ youtube/ comments /replies videoandcursorrequired- About 10 replies on the first call, fewer for small threads, more on later calls
- $0.017 per 1,000 replies when a call returns 10
- The cursor is a comment’s
replies_cursor
Pay as you go, no subscription. You can start with a $10 minimum deposit. Growth takes one qualifying $100 deposit, Scale $500, Enterprise $1,000 and Enterprise Plus $1,250 for new credit. The deposit is spendable balance rather than a fee; existing credit keeps its original schedule. Refunded or charged-back amounts don’t count toward your tier. Every account starts with 10 free API calls, shared across all endpoints, and both of these endpoints can spend them.
What a call costs when nothing comes back. A video with comments turned off, or one that is removed or private, answers with an empty list in the same shape and is charged as a normal call. A reply call costs the same whether it returns 10 replies or 2, which is why the per-reply rate is quoted for a call that returns 10.
Quick Start
Comments in One Request
One header and a query string. Read a first page, follow next_cursor for the next, and open the replies under any comment with its replies_cursor.
# 1. First page of a video, newest first (about 20 comments). curl -G "https://apiserpent.com/api/social/youtube/comments" \ --data-urlencode "video=aircAruvnKk" \ --data-urlencode "sort=newest" \ -H "X-API-Key: sk_live_your_api_key" # 2. The next page: paste next_cursor from the answer above as cursor. curl -G "https://apiserpent.com/api/social/youtube/comments" \ --data-urlencode "video=aircAruvnKk" \ --data-urlencode "sort=newest" \ --data-urlencode "cursor=PASTE_NEXT_CURSOR_HERE" \ -H "X-API-Key: sk_live_your_api_key" # 3. The replies under one comment: paste that comment's replies_cursor as cursor. curl -G "https://apiserpent.com/api/social/youtube/comments/replies" \ --data-urlencode "video=aircAruvnKk" \ --data-urlencode "cursor=PASTE_REPLIES_CURSOR_HERE" \ -H "X-API-Key: sk_live_your_api_key"
import requests BASE = 'https://apiserpent.com/api/social/youtube/comments' HEADERS = {'X-API-Key': 'sk_live_your_api_key'} VIDEO = 'aircAruvnKk' # 1. First page, newest first. page = requests.get(BASE, headers=HEADERS, timeout=60, params={'video': VIDEO, 'sort': 'newest'}).json() print(page['total_comments'], 'comments on the video') # 2. Follow next_cursor for up to four more pages, then stop. comments = page['comments'] for _ in range(4): if not page['next_cursor']: break page = requests.get(BASE, headers=HEADERS, timeout=60, params={'video': VIDEO, 'sort': 'newest', 'cursor': page['next_cursor']}).json() comments += page['comments'] for c in comments[:5]: print(c['published'], c['author'], '-', c['text'][:80]) # 3. The replies under the first comment that has any. with_replies = next((c for c in comments if c['reply_count'] > 0), None) if with_replies: replies = requests.get(BASE + '/replies', headers=HEADERS, timeout=60, params={'video': VIDEO, 'cursor': with_replies['replies_cursor']}).json() for r in replies['replies']: print(' reply:', r['author'], r['text'][:80])
(async () => { const BASE = 'https://apiserpent.com/api/social/youtube/comments'; const headers = { 'X-API-Key': 'sk_live_your_api_key' }; const get = async (path, params) => { const res = await fetch(BASE + path + '?' + new URLSearchParams(params), { headers }); return res.json(); }; // 1. First page, newest first. let page = await get('', { video: 'aircAruvnKk', sort: 'newest' }); console.log(page.total_comments, 'comments on the video'); // 2. Follow next_cursor for one more page. const comments = [...page.comments]; if (page.next_cursor) { page = await get('', { video: 'aircAruvnKk', sort: 'newest', cursor: page.next_cursor }); comments.push(...page.comments); } comments.slice(0, 5).forEach((c) => console.log(c.published, c.author, '-', c.text.slice(0, 80))); // 3. The replies under the first comment that has any. const withReplies = comments.find((c) => c.reply_count > 0); if (withReplies) { const replies = await get('/replies', { video: 'aircAruvnKk', cursor: withReplies.replies_cursor }); replies.replies.forEach((r) => console.log(' reply:', r.author, r.text.slice(0, 80))); } })();
Pass the cursor exactly as you received it. When next_cursor is null, there is nothing further to read on that video.
Sample output
What Comes Back
Sample answers with invented comment text: author handles and channel ids are hidden, other ids and cursors are abbreviated with an ellipsis, and the lists are trimmed. The shape is the same on every call.
// GET /api/social/youtube/comments?video=dQw4w9WgXcQ&sort=top (first page, trimmed: 2 of the 20 comments returned) { "success": true, "video_id": "dQw4w9WgXcQ", "total_comments": 2462804, "comments_disabled": false, "sort": "top", "comments": [ { "comment_id": "UgwW_cL1iucaVq…", "text": "Came back to hear this one more time", "author": "@…", "author_channel_id": "UC…", "published": "7 years ago", "is_edited": false, "likes": 128000, "like_text": "128K", "reply_count": 702, "replies_cursor": "eyJ2Ijox…", "is_pinned": false, "is_hearted": false, "is_creator": false, "is_verified": false }, { "comment_id": "UgwPwTibxdgqCH…", "text": "My study group shared this link instead of the notes", "author": "@…", "author_channel_id": "UC…", "published": "7 years ago", "is_edited": false, "likes": 73000, "like_text": "73K", "reply_count": 728, "replies_cursor": "eyJ2Ijox…", "is_pinned": false, "is_hearted": false, "is_creator": false, "is_verified": false } // ... ], "next_cursor": "eyJ2Ijox…" }
// GET /api/social/youtube/comments?video=dQw4w9WgXcQ&sort=top&cursor=<next_cursor> (next page, trimmed: 1 of the 20 comments returned) { "success": true, "video_id": "dQw4w9WgXcQ", "total_comments": null, "comments_disabled": false, "sort": "top", "comments": [ { "comment_id": "Ugy2XZSLtlNwix…", "text": "I scanned a code on a poster and ended up here", "author": "@…", "author_channel_id": "UC…", "published": "7 years ago", "is_edited": false, "likes": 85000, "like_text": "85K", "reply_count": 485, "replies_cursor": "eyJ2Ijox…", "is_pinned": false, "is_hearted": false, "is_creator": false, "is_verified": false } // ... ], "next_cursor": "eyJ2Ijox…" }
// GET /api/social/youtube/comments/replies?video=dQw4w9WgXcQ&cursor=<replies_cursor> (first call, trimmed: 2 of the 9 replies returned) { "success": true, "video_id": "dQw4w9WgXcQ", "replies": [ { "comment_id": "UgwW_cL1iucaVq…", "text": "Same here, it never gets old", "author": "@…", "author_channel_id": "UC…", "published": "7 years ago", "is_edited": false, "likes": 6500, "like_text": "6.5K", "is_hearted": false, "is_creator": false, "is_verified": false }, { "comment_id": "UgwW_cL1iucaVq…", "text": "I only meant to listen once and now it is on repeat", "author": "@…", "author_channel_id": "UC…", "published": "7 years ago", "is_edited": false, "likes": 5800, "like_text": "5.8K", "is_hearted": false, "is_creator": false, "is_verified": false } // ... ], "next_cursor": "eyJ2Ijox…" }
// The shape when a video has no comment section, or is removed or private: the same keys, an empty list, charged as a normal call. { "success": true, "video_id": "AAAAAAAAAAA", "total_comments": null, "comments_disabled": false, "sort": "top", "comments": [], "next_cursor": null }
Sample answers for the video dQw4w9WgXcQ with invented comment text. total_comments was the video’s comment count on 29 November 2026, and it comes on the first page only.
Parameters & Fields
Every Parameter and Field
Flat objects with the same keys on every call, so one parser covers them all.
Comments: request
- video (required): id or any YouTube link
- sort: top (default) or newest
- cursor: the next_cursor of the previous page
- Header: X-API-Key
Comments: page fields
- video_id, sort, next_cursor
- total_comments (first page only)
- comments_disabled
- comments[]
Each comment
- comment_id, text, author, author_channel_id
- published (text, such as 3 weeks ago), is_edited
- likes, like_text
- reply_count, replies_cursor
- is_pinned, is_hearted, is_creator, is_verified
Replies: request and fields
- video (required), cursor (required)
- replies[]: comment_id, text, author, author_channel_id
- published, is_edited, likes, like_text
- is_hearted, is_creator, is_verified
- next_cursor
Likes are rounded above 999, and dates are relative. likes reads 1200 for 1,234 likes; like_text keeps the label such as 1.2K. published is text like 3 weeks ago, not an exact timestamp. total_comments is the video’s comment count, on the first page only.
Why a comments API
What teams do with YouTube comments
Comments are what an audience says in its own words. Once they are JSON, you can count, search, score and monitor them.
Sentiment and feedback
Read what viewers say about a product review, a launch video or your own channel, and run it through a sentiment or topic pass.
Each comment keeps its likes, so you can weigh a widely agreed view above a lone remark.
Monitoring new comments
Use sort=newest and keep the comment_id of the last comment you saw. Next run, read pages until you reach it.
is_creator, is_pinned and is_hearted show where the channel itself has joined in.
Threads and conversations
A comment with replies carries reply_count and a replies_cursor. Open only the threads worth reading and leave the rest unfetched.
Pairing with video data
Add the transcript of the same video with the YouTube Transcript API, or its views and channel stats with the YouTube API, on the same key.
Limits
What to Expect, Plainly
What the API will and will not do, so you can plan around it.
How deep you can read varies
How far you can read depends on the video. A walk can end before the total count, so treat total_comments as the video’s comment count, not a promise about how many you will receive.
Top can change, newest repeats
sort=top follows YouTube’s Top comments order, which can change between calls. sort=newest is the repeatable way to walk a video.
Public videos only
A video with comments turned off, or one that is removed or private, answers with an empty list and is charged as a normal call.
Dates and likes
Dates are relative text such as 3 weeks ago. Likes above 999 are rounded, with the label in like_text.
FAQ
YouTube Comments API Questions
Start using the YouTube Comments API
10 free API calls, shared across every free-eligible endpoint. No subscription, no monthly plan. From $0.17 per 1K API calls.
Try for Free