# YouTube Comments

Get comments from a YouTube video.

- **Documentation:** [https://scrappa.co/docs/youtube-api/youtube_comments](https://scrappa.co/docs/youtube-api/youtube_comments)
- **API group:** YouTube API
- **Endpoint:** `GET https://scrappa.co/api/youtube/comments`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `video_id` | string | Yes | YouTube video ID |
| `limit` | integer | No | Number of comments |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/youtube/comments?video_id=dQw4w9WgXcQ"
```

## Example response

```json
{
    "videoId": "dQw4w9WgXcQ",
    "videoTitle": "Rick Astley - Never Gonna Give You Up",
    "sort": "top",
    "comments": [
        {
            "id": "UgzG...",
            "text": "This is a comment...",
            "author": "Username",
            "authorChannelId": "UCxxxxx",
            "likeCount": 1000,
            "publishedTime": "2 years ago"
        }
    ],
    "pagination": {
        "totalComments": 2500000,
        "hasMore": true
    },
    "metadata": {
        "commentsDisabled": false
    }
}
```

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
