YouTube Comments API
One page (~20) of comments on a video, each with comment id, text, author (name, channel id, verified/creator flags), published time, like count, reply count, and a `replies_token` that, passed back as `page_token`, lists that comment's replies. Also returns the total comment count (first page) and `next_page_token`.
https://api.maviapi.com/v1/sites/youtube/comments5 credits per callParameters
| Name | Required | Example | Description |
|---|---|---|---|
video_idstring in query | Optional | dQw4w9WgXcQ | 11-character video id or video URL |
sortstring in query | Optional | top | top or newest |
page_tokenstring in query | Optional | None | `next_page_token` or a comment's `replies_token` from a previous call (video_id/sort then ignored) |
Response fields
video_ide.g."dQw4w9WgXcQ"total_commentse.g.2462497comments
comment_ide.g."UgwPwTibxdgqCHZxktd4AaABAg"texte.g."My algebra teacher said that this was a link to the test answers"publishede.g."7 years ago"is_replye.g.falseauthor_namee.g."@bdr8823"author_channel_ide.g."UCdi6tGxvFvTRGe-7dAn7m7w"author_avatare.g."https://yt3.ggpht.com/ytc/AIdro_kcDoQJUNDkDzTrA5kaF5ADVujN-6UcDjMP2Kydtw=s88-c-k-c0x00ffffff-no-rj"author_is_verifiede.g.falseauthor_is_creatore.g.falselikes_texte.g."72K"likese.g.72000repliese.g.701replies_tokene.g."Eg0SC2RRdzR3OVdnWGNRGAYygwEaUBIaVWd3UHdUaWJ4ZGdxQ0haeGt0ZDRBYUFCQWciAggAKhhVQ3VBWEZrZ3N3MUw3eGFDZm5kNUpKT3cyC2RRdzR3OVdnWGNRQAFICoIBAggBQi9jb21tZW50LXJlcGxpZXMtaXRlbS1VZ3dQd1RpYnhkZ3FDSFp4a3RkNEFhQUJBZw%3D%3D"next_page_tokene.g."Eg0SC2RRdzR3OVdnWGNRGAYy_gIK1AJnZXRfcmFua2VkX3N0cmVhbXMtLUNxWUJDSUFFRlJlMzBUZ2Ftd0VLbGdFSTJGOFFnQVFZQnlLTEFmc2otRzRRMWhYX2FNUzdBaHRxeHZsY0NfckRYRENXaG5idnlvc1FqYWQ1UHVUMUxOa3VmNUxCdWs3clJHR0pELWNvLXJPMjFVZVZFWWhGVzhMUnd2RnBFbXBrZ1lWQU94bFJack1jcFR2REtraHhEaXJBc0RvRVJNeVlGYW1NSmt0UUlWMXdMRzgyU0hrN3hjamMxZ0owUGtmWFNKcG82TEpYZjRzZW5fejctY0lJcVM3UjhraWNEd2NRRkJJRkNMc2dHQUFTQlFqQUlCZ0FFZ1VJaVNBWUFCSUZDSWdnR0FBU0JRaW9JQmdBRWdVSWhpQVlBQklIQ0lRZ0VBOFlBUklGQ0ljZ0dBQVNCd2lGSUJBRkdBRlFBRmdCIhEiC2RRdzR3OVdnWGNRMAB4ASgUQhBjb21tZW50cy1zZWN0aW9u"Example request
Set MAVI_KEY to your API key. A successful call costs 5 credits per call, and a failed call costs nothing.
curl 'https://api.maviapi.com/v1/sites/youtube/comments' \
-H "Authorization: Bearer $MAVI_KEY"YouTube Comments API questions
What you get, what it costs and how to call it.
What does the YouTube Comments API return?
One page (~20) of comments on a video, each with comment id, text, author (name, channel id, verified/creator flags), published time, like count, reply count, and a `replies_token` that, passed back as `page_token`, lists that comment's replies. Also returns the total comment count (first page) and `next_page_token`. The response has video_id, total_comments, comments and next_page_token.
Which parameters does the YouTube Comments API take?
Every parameter of GET /comments is optional. You can pass video_id, sort and page_token.
How much does one YouTube Comments API call cost?
One successful call costs 5 credits. A failed call costs nothing. On the Hobby plan ($49 a month for 250,000 credits), 1,000 calls cost about $0.98. The Free plan gives you 1,000 credits a month, with no credit card required. See plans and credit prices for everything after that.
How do I call the YouTube Comments API?
Send an HTTPS GET request to https://api.maviapi.com/v1/sites/youtube/comments with your API key in the Authorization header, as in the example request on this page. Create a key on your API keys page, or try the endpoint first in the console with the free test key.
Is the YouTube Comments API official?
No. It is an independent, hosted API from maviapi for the public data on youtube.com, and it is not made, endorsed or supported by YouTube. Its parameters and response fields are documented on this page.