YepAPI
YouTube API

Video Comments

Fetch comments and replies for any YouTube video with pagination.

POST/v1/youtube/comments
$0.01/call

Usage

const res = await fetch('https://api.yepapi.com/v1/youtube/comments', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ id: 'dQw4w9WgXcQ' }),
});
const { data } = await res.json();
console.log(data.commentsCount, data.data);
curl -X POST https://api.yepapi.com/v1/youtube/comments \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id": "dQw4w9WgXcQ"}'

Request Body

ParameterTypeRequiredDescriptionDefault
idstringYesYouTube video ID
sortstringNoSort: top or newtop
tokenstringNoContinuation token for pagination

Response

{
  "ok": true,
  "data": {
    "commentsCount": "2433931",
    "continuation": "Eg0SC...",
    "data": [
      {
        "commentId": "Ugzge340dBgB75hWBm54AaABAg",
        "authorText": "@YouTube",
        "authorChannelId": "UCBR8-60-B28hp2BmDPdntcQ",
        "authorIsChannelOwner": false,
        "authorThumbnail": [
          { "url": "https://yt3.ggpht.com/...=s88-c-k-c0x00ffffff-no-rj", "width": 88, "height": 88 }
        ],
        "textDisplay": "can confirm: he never gave us up",
        "likesCount": "223K",
        "replyCount": "961",
        "publishDate": "2025-05-13",
        "publishedAt": "2025-05-13T00:00:00Z",
        "publishedTimeText": "11 months ago",
        "replyToken": "Eg0SC...",
        "isVerified": true,
        "isArtist": false,
        "isCreator": false
      },
      {
        "commentId": "UgxIOV-sXAchpKX94cB4AaABAg",
        "authorText": "@ochkalov",
        "authorChannelId": "UCtbyFPryy7J4DR4xh5CRCvA",
        "authorIsChannelOwner": false,
        "textDisplay": "1987 : normal song \r\n2026 : national anthem of the universe",
        "likesCount": "126K",
        "replyCount": "933",
        "publishDate": "2020-04-13",
        "publishedAt": "2020-04-13T00:00:00Z",
        "publishedTimeText": "6 years ago (edited)",
        "isVerified": false
      }
    ]
  }
}

Response Fields

FieldTypeDescription
okbooleanWhether the request succeeded
data.commentsCountstringTotal number of comments on the video
data.continuationstringToken to fetch the next page of comments
data.dataobject[]Array of comment objects
data.data[].commentIdstringUnique identifier for the comment
data.data[].authorTextstringComment author's display name or handle
data.data[].authorChannelIdstringChannel ID of the comment author
data.data[].authorIsChannelOwnerbooleanWhether the author is the video's channel owner
data.data[].authorThumbnailobject[]Author's profile picture images
data.data[].textDisplaystringComment text content with formatting
data.data[].likesCountstringHuman-readable like count (e.g. 223K)
data.data[].replyCountstringNumber of replies to this comment
data.data[].publishDatestringComment date in YYYY-MM-DD format
data.data[].publishedAtstringComment date as ISO 8601 timestamp
data.data[].publishedTimeTextstringRelative time (e.g. 11 months ago, 6 years ago (edited))
data.data[].replyTokenstringToken to fetch replies for this comment
data.data[].isVerifiedbooleanWhether the commenter has a verified badge
data.data[].isArtistbooleanWhether the commenter is an Official Artist
data.data[].isCreatorbooleanWhether the commenter is the video creator

Use the continuation token to paginate through comments.

On this page