# Build a YouTube Comment Sentiment Analysis Dataset

**Use case:** 

This actor collects the raw comments and replies for sentiment analysis of a YouTube video. Paste a video URL and it returns up to max_comments comments with replies, each carrying comment_content, comment_user, comment_time, and comment_like_count. Export to CSV or JSON and feed it into your own sentiment, emotion, or toxicity model. It gathers comments only, not sentiment scores.

## Input

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=kJQP7kiw5Fk"
  ],
  "max_comments": 500,
  "max_replies": 10
}
```

## Output

```json
{
  "video_url": {
    "label": "Video Link",
    "format": "Link"
  },
  "post_like_count": {
    "label": "Post Like Count",
    "format": "text"
  },
  "post_comment_count": {
    "label": "Post Comment Count",
    "format": "text"
  },
  "comment_user": {
    "label": "Comment User",
    "format": "text"
  },
  "comment_content": {
    "label": "Comment Content",
    "format": "text"
  },
  "comment_time": {
    "label": "Comment Time",
    "format": "text"
  },
  "comment_like_count": {
    "label": "Comment Like Count",
    "format": "text"
  },
  "comment_reply_count": {
    "label": "Comment Reply Count",
    "format": "text"
  },
  "reply_user": {
    "label": "Reply User",
    "format": "text"
  },
  "reply_content": {
    "label": "Reply Content",
    "format": "text"
  },
  "reply_time": {
    "label": "Reply Time",
    "format": "text"
  },
  "reply_like_count": {
    "label": "Reply Like Count",
    "format": "text"
  },
  "crawl_time": {
    "label": "Crawl Time",
    "format": "text"
  }
}
```

## About this Actor

This example demonstrates how to use [YouTube Comments & Replies Scraper](https://apify.com/delicious_zebu/youtube-comments-replies-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/delicious_zebu/youtube-comments-replies-scraper.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/delicious_zebu/youtube-comments-replies-scraper.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
