Apinoa Docs

Comments

Get a YouTube video's comments, or one comment's replies.

View raw .mdx
GET | POST /v1/youtube/comments

Send parameters as a query string with GET, or as a JSON body with POST. Both are equivalent.

What to Pass

PassReadsNotes
postThe video's comments
commentThe replies under one commentPass the comment's moreReplies.cursor

Pass one source per call. Every identifier also takes the page URL.

Parameters

ParameterTypeRequiredNotes
commentstringA comment's replies: the comment's moreReplies.cursor.
cursorstringOpaque cursor from the previous page's cursor. Pass it alone for the next page.
poststringThe video's comments: video id or URL.

Request

curl "https://gateway.apinoa.com/v1/youtube/comments?post=dQw4w9WgXcQ" \
  -H "x-api-key: $APINOA_API_KEY"

Response

Returns Page of Comment in data. A real response, shortened: arrays keep their first entries and long text is cut.

{
  "success": true,
  "data": {
    "platform": "youtube",
    "items": [
      {
        "platform": "youtube",
        "id": "UgwxEqSh_78DU_MOKpt4AaABAg",
        "postId": "dQw4w9WgXcQ",
        "author": {
          "platform": "youtube",
          "id": "UCTfgDEMJhUnGz24yinDMenQ",
          "handle": "Hushoo",
          "url": "https://www.youtube.com/channel/UCTfgDEMJhUnGz24yinDMenQ",
          "avatarUrl": "https://yt3.ggpht.com/P9RPosH04c98bezAE4mu4YdgOHEtBOnDTfrrP1jWMyor_75pjbDedjPhrnos2JrFS3cSsCcv=s88-c-k-c0x00ffffff-no-rj"
        },
        "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&lc=UgwxEqSh_78DU_MOKpt4AaABAg",
        "text": "Never thought the video was taken down, not even for a second. I just wanted to hear my boy Rick Astley again.",
        "metrics": {
          "likes": 8800,
          "replies": 56
        },
        "replies": [],
        "moreReplies": {
          "count": 56,
          "cursor": "Eg0SC2RRdzR3OVdnWGNRGAYygwEaUBIaVWd3eEVxU2hfNzhEVV9NT0twdDRBYUFCQWciAggAKhhVQ3VBWEZrZ3N3MUw3eGFDZm5kNUpKT3cyC2RRdzR3OVd…"
        },
        "ext": {
          "publishedTime": "2 months ago"
        }
      }
    ],
    "cursor": "fWtM9OdtTGvNZO8XzAg9URvLjj1sGB7endioxe1hwTIq6H96l5s0stIq60va4k-Swq93GAxmyCjOaOGWh7HuwkzYtmSPF6SVy5Vc0tbpNzBLJrvQGkiTGOV…",
    "total": 2460495,
    "ext": {
      "post": {
        "platform": "youtube",
        "id": "dQw4w9WgXcQ",
        "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "author": {
          "platform": "youtube",
          "id": "UCuAXFkgsw1L7xaCfnd5JJOw",
          "handle": "RickAstleyYT",
          "displayName": "Rick Astley",
          "url": "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw",
          "avatarUrl": "https://yt3.ggpht.com/_ShEGOdg-t5YGJse14Ooq6FYBZqX_QSlhaTNjG06miYusm5lWm1UroLyVxnYtahADfRTVLtuVQ=s176-c-k-c0x00ffffff-n…",
          "verified": true,
          "counts": {
            "followers": 4550000
          }
        },
        "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
        "text": "The official video for “Never Gonna Give You Up” by Rick Astley. \n\nNever: The Autobiography 📚 OUT NOW! \nFollow this lin…",
        "media": [
          {
            "type": "video",
            "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
            "thumbnailUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg"
          }
        ],
        "metrics": {
          "views": 1830040413,
          "likes": 19495047,
          "comments": 2460495
        },
        "ext": {
          "dateText": "Oct 25, 2009",
          "relativeDate": "16 years ago"
        }
      }
    }
  }
}

Errors

StatusCodeMeaning
400INVALID_CURSORThe cursor is not one this operation returned. Start again without it.
400INVALID_PARAMSA parameter is missing, unknown or out of range. The message names it.
401UNAUTHORIZEDThe x-api-key header is missing, or the key is revoked or unknown.
402INSUFFICIENT_BALANCEThe balance does not cover this call. Top up in the dashboard.
404NOT_FOUNDThe account, post or group does not exist, or is private, deleted or age-restricted.
429MARKETPLACE_SATURATEDToo many concurrent calls. Retry after the Retry-After seconds.
502UPSTREAM_ERRORThe platform answered with something unusable. Retry with backoff.

Every code is listed in Errors. Failed calls are not billed.

Pricing

Price $0.001 per call, plus $0.001 for each extra call it makes — at most 1 more, so $0.002 in total. List price; the rate steps down above 1,000 calls a day.

On this page