YouTube Comments Scraper

Collect comments on YouTube videos with likes and replies.

by ApifyReady 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 and connect one from your dashboard later.

Other tools for this job

Compare all 13 →

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

inputobject · required

Provider-specific public source, URL or search criteria.

maxItemsinteger · optional

Maximum number of records to return.

minimum: 1 · maximum: 200

Output

item_countnumber
itemsarray

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.