Answers / YouTube
How do I get the comments on a YouTube video with an API?
Send GET /v1/youtube/comments?id=VIDEO_ID with Authorization: Bearer YOUR_API_KEY. You can pass the 11-character ID or the full watch URL. Each comment comes back with its text, author, likes, reply count and a link that opens it on YouTube.
YouTube · comments · $0.003 a call · one verified website trial · updated 2026-11-13
Run it live
Calls run only when you press Run. Opening this page does not spend credit.
Loading…
Your results will appear here. Choose a platform and action, then press Run.
Real API calls require verification for one trial, or a signed-in account with prepaid credit.
From code
curl "https://posttodata.com/v1/youtube/comments?id=uIwm_mJ6HU8&limit=5" -H "Authorization: Bearer YOUR_API_KEY"import requests
r = requests.get(
"https://posttodata.com/v1/youtube/comments",
headers={"Authorization": "Bearer YOUR_API_KEY"},
params={"id": "uIwm_mJ6HU8", "limit": 5},
)
for item in r.json()["data"]["items"]:
print(item["url"], item.get("text") or item.get("title"))From your AI
Claude and ChatGPT clients that support OAuth can sign in without pasting a key. Follow the client setup guide. The command below is the API-key option for Claude Code.
claude mcp add --transport http posttodata https://posttodata.com/mcp --header "Authorization: Bearer YOUR_API_KEY"Then ask
“Read the comments on this YouTube video and list the three most common questions viewers ask.”
The model calls get_comments with platform youtube.
Good to know
- Comments list at $0.003 per successful call.
- No Google Cloud project or quota is involved.
- Comment dates are relative on YouTube, so published_at is null for comments.
Full reference in the docs. All YouTube endpoints are on the YouTube API page.
More answers