# Export top YouTube comments with replies

**Use case:** 

Exports the top comments on a YouTube video, including replies, with author, text, likes and date. Use it for audience research, sentiment analysis or picking giveaway winners from any video.

## Input

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "sortBy": "top",
  "includeReplies": true,
  "maxItems": 100
}
```

## Output

```json
{
  "videoId": {
    "label": "Video Id"
  },
  "authorName": {
    "label": "Author Name"
  },
  "text": {
    "label": "Text"
  },
  "likeCount": {
    "label": "Like Count"
  },
  "replyCount": {
    "label": "Reply Count"
  },
  "publishedTimeText": {
    "label": "Published Time Text"
  },
  "isReply": {
    "label": "Is Reply"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The YouTube Comments Scraper Actor is ready to run with the inputs already set for "Export top YouTube comments with replies". [Sign up or log in](https://console.apify.com/create-task-from-example/TYFA8XP45bBiEIfbm) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Export top YouTube comments with replies" task

The YouTube Comments Scraper Actor will start running based on the input automatically. You can also change all the input fields, like video urls or ids, sort by, and more, to match your specific use case.

### 3. Receive the "Export top YouTube comments with replies" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as video id, author name, text, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Export top YouTube comments with replies" task via API](https://apify.com/piotrv1001/youtube-comments-scraper.md).

## FAQ

### What does the YouTube comments with replies task export?

The YouTube comments with replies task exports each comment's text, author name and channel, like count, reply count, relative publish time, pinned, edited and creator-heart flags, and comment link.

### How are replies linked to their parent comment?

The YouTube comments with replies task marks every row as a comment or a reply; replies carry the parent comment ID, so you can rebuild each thread in a spreadsheet or database.

### How do I export comments from my own video?

The YouTube comments with replies task takes YouTube video links or 11-character video IDs, one per line. Replace the example video with yours, or add several videos to one run.

### Can I get the newest comments instead of the top ones?

The YouTube comments with replies task sorts by top comments; switch sort by to newest. Turn include replies off if you only want top-level comments, since replies count toward the limit.

### How is the YouTube comments with replies task billed?

The YouTube comments with replies task is billed per comment or reply saved, plus a tiny start fee per run. Lower max comments per video to cap the cost; current rates are on the Actor's Pricing tab.

### Can I export YouTube comments to CSV or Excel for sentiment analysis?

The YouTube comments with replies task results download as CSV, Excel or JSON, or flow through the Apify API, Google Sheets, Make, Zapier or n8n into your analysis tool.

## About this Actor

This example demonstrates how to use [YouTube Comments Scraper](https://apify.com/piotrv1001/youtube-comments-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/piotrv1001/youtube-comments-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/piotrv1001/youtube-comments-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`).
