Programmatic access to YouTube comment data for Enterprise plans.
All API requests must include your API key in the Authorization header. Generate your key from the API Keys section of your dashboard. Keys are shown only once — if you lose it, regenerate a new one from the dashboard.
Authorization: Bearer <your-api-key>curl -H "Authorization: Bearer yt_live_••••••••••••" \
"https://www.youtubecommentdownloader.com/api/v1/quota"Keep your API key secret. Do not expose it in client-side code or public repositories.
/api/v1/commentsFetch comments from a YouTube video. Returns up to 10,000 comments per request, sorted by your chosen order. Each comment (and each reply, if enabled) counts as 1 toward your monthly quota.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| url | string | yes | — | YouTube video URL (any standard format, including youtu.be short links and /shorts/). |
| maxComments | integer | no | 100 | Maximum number of comments to return. Capped at 10,000 per request. |
| includeReplies | boolean | no | false | When true, reply threads are fetched and included in replyList. Each reply counts toward your quota individually. |
| sortBy | string | no | "top" | Sort order for comments. One of: "top" (most relevant), "newest", or "oldest". |
curl -G "https://www.youtubecommentdownloader.com/api/v1/comments" \
-H "Authorization: Bearer yt_live_••••••••••••" \
--data-urlencode "url=https://www.youtube.com/watch?v=dQw4w9WgXcQ" \
--data-urlencode "maxComments=50" \
--data-urlencode "includeReplies=false" \
--data-urlencode "sortBy=top"const response = await fetch(
"https://www.youtubecommentdownloader.com/api/v1/comments?" +
new URLSearchParams({
url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
maxComments: "50",
includeReplies: "false",
sortBy: "top",
}),
{
headers: {
Authorization: "Bearer yt_live_••••••••••••",
},
}
);
const data = await response.json();
console.log(data.comments);{
"video": {
"id": "dQw4w9WgXcQ",
"title": "Rick Astley - Never Gonna Give You Up (Official Music Video)",
"channelName": "Rick Astley"
},
"comments": [
{
"id": "UgxZ1a2b3c4d5e6f7g8",
"author": "SomeUser",
"text": "This video never gets old.",
"likes": 4821,
"date": "1/15/2024",
"dateRaw": "2024-01-15T12:34:56.000Z",
"replies": 12,
"replyList": []
}
],
"totalFetched": 50,
"quota": {
"used": 150,
"remaining": 999850,
"limit": 1000000
}
}/api/v1/channelList videos from a YouTube channel. Use the returned videoId values with /api/v1/comments to pull comments from each video. Listing a channel's videos does not consume quota — only comment fetches do.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| url | string | yes | — | YouTube channel URL. Supports /channel/ID, /@handle, /c/custom, and /user/legacy formats. |
| maxVideos | integer | no | 50 | Maximum number of videos to return. Capped at 500 per request. |
curl -G "https://www.youtubecommentdownloader.com/api/v1/channel" \
-H "Authorization: Bearer yt_live_••••••••••••" \
--data-urlencode "url=https://www.youtube.com/@MrBeast" \
--data-urlencode "maxVideos=25"const response = await fetch(
"https://www.youtubecommentdownloader.com/api/v1/channel?" +
new URLSearchParams({
url: "https://www.youtube.com/@MrBeast",
maxVideos: "25",
}),
{
headers: {
Authorization: "Bearer yt_live_••••••••••••",
},
}
);
const data = await response.json();
console.log(data.videos);{
"channel": {
"id": "UCX6OQ3DkcsbYNE6H8uQQuVA",
"title": "MrBeast",
"uploadsPlaylistId": "UUX6OQ3DkcsbYNE6H8uQQuVA"
},
"videos": [
{
"videoId": "abc123defgh",
"title": "$1 vs $1,000,000 Hotel Room!",
"publishedAt": "2024-03-10T18:00:00.000Z"
}
],
"totalVideos": 25,
"quota": {
"used": 150,
"remaining": 999850,
"limit": 1000000
}
}/api/v1/quotaCheck your current quota usage. Returns your plan, the number of comments used this month, how many remain, your total limit, and the timestamp when quota resets.
This endpoint takes no query parameters.
curl -H "Authorization: Bearer yt_live_••••••••••••" \
"https://www.youtubecommentdownloader.com/api/v1/quota"const response = await fetch(
"https://www.youtubecommentdownloader.com/api/v1/quota",
{
headers: {
Authorization: "Bearer yt_live_••••••••••••",
},
}
);
const data = await response.json();
console.log(`Used ${data.used} of ${data.limit} comments this month.`);{
"plan": "enterprise",
"used": 42817,
"remaining": 957183,
"limit": 1000000,
"resetsAt": "2026-06-01T00:00:00.000Z"
}All error responses follow the same shape: { "error": "<code>", "message": "<description>" }. Use the error field for programmatic handling and message for human-readable context.
| Error code | HTTP status | Description |
|---|---|---|
| missing_api_key | 401 | No Authorization header was provided with the request. |
| invalid_api_key | 401 | The API key is malformed, expired, or does not belong to an active Enterprise account. |
| plan_required | 403 | The authenticated account is not on an Enterprise plan. API access requires Enterprise. |
| quota_exceeded | 429 | Your monthly comment quota is exhausted. Quota resets on the 1st of each month. |
| invalid_params | 400 | A required parameter is missing or a parameter value is invalid. Check the message field for details. |
| not_found | 404 | The requested video or channel could not be found. Verify the URL and try again. |
Enterprise accounts receive 1,000,000 comments per month.
Quota resets on the 1st of each calendar month at midnight UTC.
Each top-level comment counts as 1. When includeReplies=true, each reply also counts as 1.
maxComments is capped at 10,000 per request. Make multiple requests to collect more.
Call GET /api/v1/quota at any time to check your used, remaining, and resetsAt values.
A complete workflow: fetch the video list from a channel, then pull comments from each video. Copy-paste ready.
import requests
API_KEY = "yt_live_••••••••••••"
BASE_URL = "https://www.youtubecommentdownloader.com/api/v1"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}
# Step 1 — Get videos from a channel
channel_res = requests.get(
f"{BASE_URL}/channel",
headers=HEADERS,
params={
"url": "https://www.youtube.com/@MrBeast",
"maxVideos": 10,
},
)
channel_data = channel_res.json()
videos = channel_data["videos"]
# Step 2 — Fetch comments for each video
all_comments = []
for video in videos:
video_url = f"https://www.youtube.com/watch?v={video['videoId']}"
comments_res = requests.get(
f"{BASE_URL}/comments",
headers=HEADERS,
params={
"url": video_url,
"maxComments": 500,
"sortBy": "top",
},
)
comments_data = comments_res.json()
all_comments.extend(comments_data.get("comments", []))
print(f"{video['title']}: {comments_data['totalFetched']} comments fetched")
print(f"\nTotal comments collected: {len(all_comments)}")const API_KEY = "yt_live_••••••••••••";
const BASE_URL = "https://www.youtubecommentdownloader.com/api/v1";
const headers = { Authorization: `Bearer ${API_KEY}` };
async function fetchChannelComments(channelUrl, videosToFetch = 10, commentsPerVideo = 500) {
// Step 1 — Get videos from the channel
const channelRes = await fetch(
`${BASE_URL}/channel?${new URLSearchParams({ url: channelUrl, maxVideos: String(videosToFetch) })}`,
{ headers }
);
const channelData = await channelRes.json();
const videos = channelData.videos ?? [];
// Step 2 — Fetch comments for each video
const allComments = [];
for (const video of videos) {
const videoUrl = `https://www.youtube.com/watch?v=${video.videoId}`;
const commentsRes = await fetch(
`${BASE_URL}/comments?${new URLSearchParams({
url: videoUrl,
maxComments: String(commentsPerVideo),
sortBy: "top",
})}`,
{ headers }
);
const commentsData = await commentsRes.json();
allComments.push(...(commentsData.comments ?? []));
console.log(`${video.title}: ${commentsData.totalFetched} comments`);
}
return allComments;
}
fetchChannelComments("https://www.youtube.com/@MrBeast")
.then((comments) => console.log(`Total collected: ${comments.length}`))Contact us to set up your Enterprise account and get your API key. We'll get you up and running quickly.
Contact us →