Skip to content

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`.

GEThttps://api.maviapi.com/v1/sites/youtube/comments5 credits per call

Parameters

NameRequiredExampleDescription
video_idstring in queryOptionaldQw4w9WgXcQ11-character video id or video URL
sortstring in queryOptionaltoptop or newest
page_tokenstring in queryOptionalNone`next_page_token` or a comment's `replies_token` from a previous call (video_id/sort then ignored)

Response fields

video_idstringe.g."dQw4w9WgXcQ"
total_commentsintegere.g.2462497
commentsobject[]13 fields
comment_idstringe.g."UgwPwTibxdgqCHZxktd4AaABAg"
textstringe.g."My algebra teacher said that this was a link to the test answers"
publishedstringe.g."7 years ago"
is_replybooleane.g.false
author_namestringe.g."@bdr8823"
author_channel_idstringe.g."UCdi6tGxvFvTRGe-7dAn7m7w"
author_avatarstringe.g."https://yt3.ggpht.com/ytc/AIdro_kcDoQJUNDkDzTrA5kaF5ADVujN-6UcDjMP2Kydtw=s88-c-k-c0x00ffffff-no-rj"
author_is_verifiedbooleane.g.false
author_is_creatorbooleane.g.false
likes_textstringe.g."72K"
likesintegere.g.72000
repliesintegere.g.701
replies_tokenstringe.g."Eg0SC2RRdzR3OVdnWGNRGAYygwEaUBIaVWd3UHdUaWJ4ZGdxQ0haeGt0ZDRBYUFCQWciAggAKhhVQ3VBWEZrZ3N3MUw3eGFDZm5kNUpKT3cyC2RRdzR3OVdnWGNRQAFICoIBAggBQi9jb21tZW50LXJlcGxpZXMtaXRlbS1VZ3dQd1RpYnhkZ3FDSFp4a3RkNEFhQUJBZw%3D%3D"
next_page_tokenstringe.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
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.