---
title: "Comments"
description: "Get a YouTube video's comments, or one comment's replies."
---

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

| Pass | Reads | Notes |
|---|---|---|
| `post` | The video's comments |  |
| `comment` | The replies under one comment | Pass the comment's `moreReplies.cursor` |

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

## Parameters

| Parameter | Type | Required | Notes |
|---|---|---|---|
| `comment` | string |  | A comment's replies: the comment's `moreReplies.cursor`. |
| `cursor` | string |  | Opaque cursor from the previous page's `cursor`. Pass it alone for the next page. |
| `post` | string |  | The video's comments: video id or URL. |

## Request

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

```js tab="JavaScript"
const params = new URLSearchParams({ post: "dQw4w9WgXcQ" });
const res = await fetch(`https://gateway.apinoa.com/v1/youtube/comments?${params}`, {
  headers: { "x-api-key": process.env.APINOA_API_KEY },
});
const { success, data, error } = await res.json();
```

```python tab="Python"
import os

import requests

res = requests.get(
    "https://gateway.apinoa.com/v1/youtube/comments",
    params={"post": "dQw4w9WgXcQ"},
    headers={"x-api-key": os.environ["APINOA_API_KEY"]},
)
body = res.json()
```

## Response

Returns [`Page`](/docs/api-reference/sns/response-schema#page) of [`Comment`](/docs/api-reference/sns/response-schema#comment) in `data`. A real response, shortened: arrays keep their first entries and long text is cut.

```json
{
  "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

| Status | Code | Meaning |
|---|---|---|
| 400 | `INVALID_CURSOR` | The `cursor` is not one this operation returned. Start again without it. |
| 400 | `INVALID_PARAMS` | A parameter is missing, unknown or out of range. The message names it. |
| 401 | `UNAUTHORIZED` | The `x-api-key` header is missing, or the key is revoked or unknown. |
| 402 | `INSUFFICIENT_BALANCE` | The balance does not cover this call. Top up in the dashboard. |
| 404 | `NOT_FOUND` | The account, post or group does not exist, or is private, deleted or age-restricted. |
| 429 | `MARKETPLACE_SATURATED` | Too many concurrent calls. Retry after the `Retry-After` seconds. |
| 502 | `UPSTREAM_ERROR` | The platform answered with something unusable. Retry with backoff. |

Every code is listed in [Errors](/docs/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](https://apinoa.com/en/pricing); the rate steps down above 1,000 calls a day.
