# YouTube / YouTube Video Comments

Fetch a page of public comments for a video or Short.

```
GET /api/v1/youtube/comments
```

Auth: `Authorization: Bearer <SOCIFY_KEY>`  
Credits: 2 credits per request

## Parameters

| Name | Required | Description | Example |
|------|----------|-------------|---------|
| `id` | yes | YouTube video or Short id. | `9lhtFHpNfms` |
| `cursor` | no | Pagination cursor from a previous nextCursor. |  |

## Example

```bash
curl -s 'https://trysocify.com/api/v1/youtube/comments?id=9lhtFHpNfms' \
  -H "Authorization: Bearer $SOCIFY_KEY"
```

## Response fields

| Field | Type | Description |
|-------|------|-------------|
| `comments` | array | Comment entries for this page. |
| `nextCursor` | string | Pass as cursor for the next page. |
## Sample response

Successful lookups wrap the payload in `{ ok, platform, resource, params, data, meta }`. `data` is shown below.

```json
{
  "ok": true,
  "platform": "youtube",
  "resource": "comments",
  "params": {
    "id": "9lhtFHpNfms"
  },
  "data": {
    "comments": [
      {
        "author": "viewer123",
        "likes": 42,
        "text": "great video"
      }
    ],
    "nextCursor": "Eg0SC2NLYmI1dHBlcnhjGAYyJS..."
  },
  "meta": {
    "credits_charged": 2,
    "latency_ms": 420,
    "platform": "youtube",
    "resource": "comments",
    "path": "/api/v1/youtube/comments"
  }
}
```

## Links

- HTML docs: https://trysocify.com/docs/api/youtube/comments
- SEO page: https://trysocify.com/youtube/comments
- OpenAPI: https://trysocify.com/openapi.json
- Catalog: https://trysocify.com/catalog.json
