# YouTube Comments Scraper

Collect comments on YouTube videos with likes and replies.

by Apify Ready to run $0.0025 per result · $0.25 per 100 results

## Example

### You ask your agent

“Get the top comment on this YouTube video: youtube.com/watch?v=xObhZ0Ga7EQ”

### You get

**Title:** How to extract data from YouTube with YouTube Scraper

**Type:** comment

**Author:** @Apify

**Comment:** Try YouTube Scraper for FREE at https://apify.it/4cjeX9W

**Page URL:** https://www.youtube.com/watch?v=xObhZ0Ga7EQ

**Vote count:** 2

**Reply count:** 1

**Comments count:** 14

**What your agent sends and gets back (JSON)**

Your agent works out the exact inputs, such as IDs, dates and settings, from what you ask.

### Request

```
{
  "tool_id": "apify.streamers-youtube-comments-scraper",
  "input": {
    "input": {
      "startUrls": [
        {
          "url": "https://www.youtube.com/watch?v=xObhZ0Ga7EQ"
        }
      ],
      "sortCommentsBy": "TOP_COMMENTS"
    },
    "maxItems": 1
  }
}
```

### Response

```
{
  "items": [
    {
      "cid": "UgwFI4huqYX7iVc683N4AaABAg",
      "type": "comment",
      "title": "How to extract data from YouTube with YouTube Scraper",
      "author": "@Apify",
      "comment": "Try YouTube Scraper for FREE at https://apify.it/4cjeX9W",
      "pageUrl": "https://www.youtube.com/watch?v=xObhZ0Ga7EQ",
      "videoId": "xObhZ0Ga7EQ",
      "voteCount": 2,
      "replyCount": 1,
      "commentsCount": 14,
      "hasCreatorHeart": false,
      "publishedTimeText": "4 years ago (edited)",
      "authorIsChannelOwner": true
    }
  ],
  "item_count": 1
}
```

## Use it with your agent

Copy the prompt and paste it into your agent, then tell it what you need.

Read https://scrollport.com/start. Use my existing Scrollport connection, or help me connect if needed. Help me use YouTube Comments Scraper (tool ID: apify.streamers-youtube-comments-scraper). Ask me for the details you need, then show me the result.

Provider access is included. If your agent isn't connected to Scrollport yet, it will help you set that up.

No agent yet? [Create your account on the web](https://scrollport.com/sign-up) and connect one from your dashboard later.

## Other tools for this job

[Compare all 13 →](https://scrollport.com/tools/youtube-data-api)

- [Search YouTube channels by keyword](https://scrollport.com/tools/providers/tikhub/youtube-web-v2-search-channels) TikHub $0.0025 per request $0.0025 per request
- [YouTube channel profile by channel id](https://scrollport.com/tools/providers/tikhub/youtube-web-get-channel-info) TikHub $0.0025 per request $0.0025 per request
- [YouTube channel Shorts by channel id](https://scrollport.com/tools/providers/tikhub/youtube-web-get-channel-short-videos) TikHub $0.0025 per request $0.0025 per request

## Questions

**Is YouTube Comments Scraper by Apify free?**

Scrollport has no free tier: it costs $0.0025 per result ($0.25 per 100 results), paid per use from a prepaid wallet with no subscription. Connecting your first agent adds $1 of trial credit, so you can try it before adding funds.

**Do I need an API key from Apify?**

No. Your agent runs it through your Scrollport connection (MCP, the Scrollport CLI or the HTTP API), and Scrollport handles access to Apify, so you don't sign up with Apify or manage an API key.

## Details

**About this tool**

Collect comments on up to five YouTube videos by URL, top comments or newest first. maxItems is split evenly across the videos. Each comment includes text, author handle, published time, likes, reply count, whether the creator liked it and the video's title and comment count. You're charged per comment returned. The worked example shows selected fields: long text is shortened, nested lists keep one item and expiring media links are left out.

**All inputs and outputs**

### Input

`input` object · required

Provider-specific public source, URL or search criteria.

`maxItems` integer · optional

Maximum number of records to return.

minimum: 1 · maximum: 200

### Output

`item_count` number

`items` array

Result records.

**Errors and limits**

- `upstream_error`: The scraper could not return usable results; the wallet was not charged.Check the input and limits, or retry later.

---

Canonical page: https://scrollport.com/tools/providers/apify/streamers-youtube-comments-scraper
