# YouTube Post Comments Scraper – Community Discussion (`scrapingmonkey/youtube-post-comments-scraper`) Actor

Collect public YouTube community-post comments with text, authors, likes, reply indicators, and source-post context. Paginate comments and export individual rows.

- **URL**: https://apify.com/scrapingmonkey/youtube-post-comments-scraper.md
- **Developed by:** [ScrapingMonkey](https://apify.com/scrapingmonkey) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

Collect public comments from YouTube community posts, with the source post retained on each row. **YouTube Post Comments Scraper** returns comment text, authors, likes, reply indicators, and the post's available text, channel, images, poll, or shared-content context.

Use it to study audience responses to channel announcements, polls, and image posts. Set a page budget per post and export a comment dataset that keeps the discussion connected to what the channel published.

| At a glance | Details |
|---|---|
| 📥 Input | Full YouTube community-post URLs |
| 📤 Output | Comments, author details, public reactions, and source-post context |
| 🔐 Login required | No YouTube credentials or cookies |
| ⚡ Processing | Up to 5 requests concurrently with automatic retries |
| 💾 Delivery | One row per collected comment, including any replies embedded in the returned pages |

### What the YouTube community post comments scraper extracts 🔎

The Actor follows the public comment collection for each selected community post. Available fields include:

- Comment ID, permalink, text, and published-time label
- Likes, source count labels, reply count, and available parent-comment reference
- Author channel identity, handle, avatar variants, and public account indicators
- Pinned and creator-heart details, comment links, and mentions when exposed
- Source-post text, URL, publication label, channel, reactions, and comment count
- Available source-post images, video references, poll or quiz details, and shared-post context
- Collection position for the comment within the submitted post

### How to scrape YouTube community post comments 🚀

1. Add full community-post links to `inputList`.
2. Set `pagesPerInput` for the comment-page budget per post.
3. Run the Actor and review comments and failed results.
4. Export the rows or group them by `post_id` in your analysis.

```json
{
  "inputList": [
    "https://www.youtube.com/post/UgkxOoOJQb2h2PnigPD6OnmPvt8Tpbd0wRhP"
  ],
  "pagesPerInput": 2
}
```

### YouTube community post comments data fields and output 📦

| Field group | Included data |
|---|---|
| Comment | ID, URL, text, published-time label, likes, and reply count |
| Author | Channel identity, handle, URL, avatars, and visible account indicators |
| Discussion context | Parent reference, reply level, pinned or hearted indicators, links, and mentions |
| Source post | Post identity, text, author, publication label, reactions, and public comment count |
| Post attachments | Available images, video references, poll or quiz fields, and supplied shared-post details |
| Collection | Input, result status, and position within the submitted post |

Complete illustrative success item. The content and values below are fictional examples, not a live result:

```json
{
  "input": "https://www.youtube.com/post/UgExampleTrailNotes",
  "status": "success",
  "id": "UgExampleThread01",
  "url": "https://www.youtube.com/post/UgExampleTrailNotes?lc=UgExampleThread01",
  "parent_comment_id": null,
  "text": "Which section has the most shade?",
  "published_text": "1 day ago",
  "likes": 7,
  "likes_text": "7",
  "replies_count": 2,
  "reply_level": 0,
  "is_pinned": false,
  "pinned_text": null,
  "is_hearted": false,
  "hearted_by": null,
  "creator_thumbnail": null,
  "is_liked": null,
  "author.id": "UCaaaaaaaaaaaaaaaaaaaaaa",
  "author.name": "Maya Park",
  "author.handle": "@trailjournal",
  "author.url": "https://www.youtube.com/@trailjournal",
  "author.avatar_url": "https://example.com/maya-avatar.jpg",
  "author.avatar_thumbnails.url": [
    "https://example.com/maya-avatar-small.jpg",
    "https://example.com/maya-avatar.jpg"
  ],
  "author.avatar_thumbnails.width": [
    80,
    160
  ],
  "author.avatar_thumbnails.height": [
    80,
    160
  ],
  "author.is_verified": false,
  "author.is_creator": false,
  "author.is_artist": null,
  "author.is_current_user": null,
  "links.text": [],
  "links.url": [],
  "mentions.channel_id": [],
  "mentions.name": [],
  "mentions.url": [],
  "comments_total": 18,
  "post_id": "UgExampleTrailNotes",
  "source_post.id": "UgExampleTrailNotes",
  "source_post.url": "https://www.youtube.com/post/UgExampleTrailNotes",
  "source_post.type": "post",
  "source_post.text": "Two views from our weekend route. Route notes #Hiking",
  "source_post.links.text": [
    "Route notes"
  ],
  "source_post.links.url": [
    "https://example.com/trail"
  ],
  "source_post.mentions.channel_id": [],
  "source_post.mentions.name": [],
  "source_post.mentions.url": [],
  "source_post.published_text": "2 days ago",
  "source_post.is_edited": false,
  "source_post.likes": 42,
  "source_post.likes_text": "42",
  "source_post.comments_count": 18,
  "source_post.comments_text": "18 comments",
  "source_post.is_liked": null,
  "source_post.is_members_only": false,
  "source_post.attachment_type": "images",
  "source_post.image_url": "https://example.com/forest-path.jpg",
  "source_post.images.url": [
    "https://example.com/forest-path.jpg",
    "https://example.com/forest-viewpoint.jpg"
  ],
  "source_post.images.thumbnails.url": [
    [
      "https://example.com/forest-path-small.jpg",
      "https://example.com/forest-path.jpg"
    ],
    [
      "https://example.com/forest-viewpoint-small.jpg",
      "https://example.com/forest-viewpoint.jpg"
    ]
  ],
  "source_post.images.thumbnails.width": [
    [
      640,
      1280
    ],
    [
      640,
      1280
    ]
  ],
  "source_post.images.thumbnails.height": [
    [
      360,
      720
    ],
    [
      360,
      720
    ]
  ],
  "source_post.video.id": null,
  "source_post.video.url": null,
  "source_post.video.type": null,
  "source_post.video.title": null,
  "source_post.video.description": null,
  "source_post.video.thumbnail_url": null,
  "source_post.video.thumbnails.url": null,
  "source_post.video.thumbnails.width": null,
  "source_post.video.thumbnails.height": null,
  "source_post.video.duration_seconds": null,
  "source_post.video.duration_text": null,
  "source_post.video.views": null,
  "source_post.video.views_text": null,
  "source_post.video.published_text": null,
  "source_post.video.badges": null,
  "source_post.video.is_live": null,
  "source_post.video.is_upcoming": null,
  "source_post.video.is_premiere": null,
  "source_post.video.is_members_only": null,
  "source_post.video.stream_status": null,
  "source_post.video.scheduled_start_time": null,
  "source_post.video.accessibility_text": null,
  "source_post.video.author.id": null,
  "source_post.video.author.name": null,
  "source_post.video.author.handle": null,
  "source_post.video.author.url": null,
  "source_post.video.author.avatar_url": null,
  "source_post.video.author.avatar_thumbnails.url": null,
  "source_post.video.author.avatar_thumbnails.width": null,
  "source_post.video.author.avatar_thumbnails.height": null,
  "source_post.video.author.is_verified": null,
  "source_post.poll.choices.text": null,
  "source_post.poll.choices.votes_percent": null,
  "source_post.poll.choices.image_url": null,
  "source_post.poll.choices.thumbnails.url": null,
  "source_post.poll.choices.thumbnails.width": null,
  "source_post.poll.choices.thumbnails.height": null,
  "source_post.poll.choices.is_selected": null,
  "source_post.poll.total_votes": null,
  "source_post.poll.total_votes_text": null,
  "source_post.quiz.question": null,
  "source_post.quiz.choices.text": null,
  "source_post.quiz.choices.is_selected": null,
  "source_post.shared_post.id": null,
  "source_post.shared_post.url": null,
  "source_post.shared_post.type": null,
  "source_post.shared_post.text": null,
  "source_post.shared_post.links.text": null,
  "source_post.shared_post.links.url": null,
  "source_post.shared_post.mentions.channel_id": null,
  "source_post.shared_post.mentions.name": null,
  "source_post.shared_post.mentions.url": null,
  "source_post.shared_post.published_text": null,
  "source_post.shared_post.is_edited": null,
  "source_post.shared_post.likes": null,
  "source_post.shared_post.likes_text": null,
  "source_post.shared_post.comments_count": null,
  "source_post.shared_post.comments_text": null,
  "source_post.shared_post.is_liked": null,
  "source_post.shared_post.is_members_only": null,
  "source_post.shared_post.attachment_type": null,
  "source_post.shared_post.image_url": null,
  "source_post.shared_post.images.url": null,
  "source_post.shared_post.images.thumbnails.url": null,
  "source_post.shared_post.images.thumbnails.width": null,
  "source_post.shared_post.images.thumbnails.height": null,
  "source_post.shared_post.video.id": null,
  "source_post.shared_post.video.url": null,
  "source_post.shared_post.video.type": null,
  "source_post.shared_post.video.title": null,
  "source_post.shared_post.video.description": null,
  "source_post.shared_post.video.thumbnail_url": null,
  "source_post.shared_post.video.thumbnails.url": null,
  "source_post.shared_post.video.thumbnails.width": null,
  "source_post.shared_post.video.thumbnails.height": null,
  "source_post.shared_post.video.duration_seconds": null,
  "source_post.shared_post.video.duration_text": null,
  "source_post.shared_post.video.views": null,
  "source_post.shared_post.video.views_text": null,
  "source_post.shared_post.video.published_text": null,
  "source_post.shared_post.video.badges": null,
  "source_post.shared_post.video.is_live": null,
  "source_post.shared_post.video.is_upcoming": null,
  "source_post.shared_post.video.is_premiere": null,
  "source_post.shared_post.video.is_members_only": null,
  "source_post.shared_post.video.stream_status": null,
  "source_post.shared_post.video.scheduled_start_time": null,
  "source_post.shared_post.video.accessibility_text": null,
  "source_post.shared_post.video.author.id": null,
  "source_post.shared_post.video.author.name": null,
  "source_post.shared_post.video.author.handle": null,
  "source_post.shared_post.video.author.url": null,
  "source_post.shared_post.video.author.avatar_url": null,
  "source_post.shared_post.video.author.avatar_thumbnails.url": null,
  "source_post.shared_post.video.author.avatar_thumbnails.width": null,
  "source_post.shared_post.video.author.avatar_thumbnails.height": null,
  "source_post.shared_post.video.author.is_verified": null,
  "source_post.shared_post.poll.choices.text": null,
  "source_post.shared_post.poll.choices.votes_percent": null,
  "source_post.shared_post.poll.choices.image_url": null,
  "source_post.shared_post.poll.choices.thumbnails.url": null,
  "source_post.shared_post.poll.choices.thumbnails.width": null,
  "source_post.shared_post.poll.choices.thumbnails.height": null,
  "source_post.shared_post.poll.choices.is_selected": null,
  "source_post.shared_post.poll.total_votes": null,
  "source_post.shared_post.poll.total_votes_text": null,
  "source_post.shared_post.quiz.question": null,
  "source_post.shared_post.quiz.choices.text": null,
  "source_post.shared_post.quiz.choices.is_selected": null,
  "source_post.shared_post.author.id": null,
  "source_post.shared_post.author.name": null,
  "source_post.shared_post.author.handle": null,
  "source_post.shared_post.author.url": null,
  "source_post.shared_post.author.avatar_url": null,
  "source_post.shared_post.author.avatar_thumbnails.url": null,
  "source_post.shared_post.author.avatar_thumbnails.width": null,
  "source_post.shared_post.author.avatar_thumbnails.height": null,
  "source_post.shared_post.author.is_verified": null,
  "source_post.shared_post.description_links": null,
  "source_post.shared_post.hashtags": null,
  "source_post.author.id": "UCaaaaaaaaaaaaaaaaaaaaaa",
  "source_post.author.name": "Trail Journal",
  "source_post.author.handle": "@trailjournal",
  "source_post.author.url": "https://www.youtube.com/@trailjournal",
  "source_post.author.avatar_url": "https://example.com/trail-avatar.jpg",
  "source_post.author.avatar_thumbnails.url": [
    "https://example.com/trail-avatar-small.jpg",
    "https://example.com/trail-avatar.jpg"
  ],
  "source_post.author.avatar_thumbnails.width": [
    80,
    160
  ],
  "source_post.author.avatar_thumbnails.height": [
    80,
    160
  ],
  "source_post.author.is_verified": false,
  "source_post.description_links": [],
  "source_post.hashtags": [
    "#Hiking"
  ],
  "position": 1,
  "source_post.shared_post.shared_post": null
}
```

Each comment occupies one row in one table, with the same literal dotted keys in JSON. Source-post fields repeat on each comment to preserve context. Author-avatar, link, mention, and source-media columns align within their groups. Nested thumbnail lists retain the image or choice they belong to; the first outer list describes the first image or choice. Optional attachment types remain null when absent.

Missing optional fields can be `null`, empty strings, or empty lists. Some flags default to `false` when no signal is present. A failed row retains `input`, sets `status` to `failed`, and leaves the result-data fields null.

### Input requirements and coverage ⚙️

| Parameter | Type | Default | Rules |
|---|---|---|---|
| `inputList` | array of strings | Required | At least one /post/ URL or supported legacy channel /community URL containing an lb post reference. Bare IDs are invalid. |
| `pagesPerInput` | integer | `1` | Minimum 1, with no fixed upper limit. Limits result pages for each input; YouTube controls page size. |

Accepted links use /post/POST\_ID or a supported legacy channel /community URL with an `lb` parameter identifying the post. Use the full URL on YouTube; bare post IDs, video links, and a channel's community tab without a post reference are invalid.

The Actor paginates comment pages, including replies already present in those responses. It does not independently open every reply thread. There is no sorting parameter or fixed number of comments per page.

Post attachment fields describe the source post. Their presence does not mean images, videos, or shared posts were separately downloaded or crawled.

Each input has its own collection order and duplicate tracking. Repeated results within that input are skipped; the same result may appear again under another input. Repeated input entries are processed separately.

The page budget counts result pages. Requests needed to open the collection do not consume it. Collection ends at the budget or when YouTube stops providing a usable next page. If collection ends without any results, the Actor saves a failed row for that input. An empty end after saved results does not add a failure.

### YouTube community discussion use cases 🎯

#### Announcement-feedback research

Collect questions and reactions to selected channel announcements while keeping the original message with each comment.

#### Poll and image-post analysis

Read public discussion alongside the post's available poll choices or images without treating comments as votes.

#### Community engagement reporting

Compare comment text, likes, reply indicators, and source-post reactions across a defined post sample.

#### Repeated discussion collection

Use comment and post IDs to compare newly observed responses with earlier datasets in your own workflow.

### Pricing and billable comment rows 💰

Check the Actor's **Pricing** tab for the current charging model and rate.

Under dataset-item pricing, each saved success or failed row can be billable. Automatic retries do not independently create extra rows. Repeated input entries can produce repeated billable results.

Every saved visible reply is a comment result under dataset-item pricing. Source-post images, poll choices, and shared-content fields remain in the comment row and do not create separate dataset items.

### YouTube Post Comments Scraper API and integrations 🔌

Use the Actor ID from the **API** tab as `$ACTOR_ID` and your Apify token as `$APIFY_TOKEN`.

```bash
curl -X POST "https://api.apify.com/v2/acts/$ACTOR_ID/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"inputList":["https://www.youtube.com/post/UgkxOoOJQb2h2PnigPD6OnmPvt8Tpbd0wRhP"],"pagesPerInput":2}'
```

This request starts a run. Retrieve the default dataset after completion, or use schedules and webhooks to connect it to a recurring workflow. Export JSON, CSV, or Excel, or send selected fields to Google Sheets, Make, Zapier, or your own application.

### Reliability and limits ⚠️

Temporary request failures are retried. Invalid or unavailable targets produce failed rows while other inputs can continue. A later-page failure can add a failed row alongside results already saved for the same input.

A community post may be public while its comments are disabled or inaccessible. Deleted, restricted, or hidden comments may not appear, and public totals can exceed the rows collected.

Published times remain YouTube's text labels. Numeric reactions can come from rounded labels; keep the source text when interpreting counts. Source-post media and optional account indicators depend on the response and may be absent.

### Frequently asked questions ❓

#### Can I use a channel's community tab URL?

Only when a supported legacy URL contains an `lb` parameter selecting a specific post. Otherwise provide the post's /post/ link.

#### Does it collect video comments?

Use YouTube Video Comments Scraper for video discussion. This Actor expects community-post links.

#### Are replies included?

Replies already exposed in the requested comment pages can be saved as rows. The Actor does not separately paginate every hidden reply thread.

#### Why are video or poll fields null?

Those columns describe optional source-post attachments. An image post can have no video or poll, and the public page may omit optional details.

#### Does each source-post image become a separate row?

No. Images, thumbnail variants, poll choices, and shared-post details remain inside the comment row.

#### Will submitting the same post twice duplicate the collection?

Yes. Repeated input entries are processed separately. Remove duplicates before running if that is not wanted.

### Support, responsible use, and related actors 🛟

For a reproducible issue, share the run ID, a safe public input, and the field or behavior you expected through the Actor's support channel. Keep tokens and other credentials out of support messages.

Use public content in accordance with applicable privacy, copyright, contractual, and platform requirements.

# Actor input Schema

## `inputList` (type: `array`):

Add full YouTube community post URLs in /post/ format or legacy channel /community links containing lb. Raw post IDs are not accepted.

## `pagesPerInput` (type: `integer`):

Number of result pages to collect for each input. YouTube controls the page size. Results are saved after each page; collection stops when the list ends. Bootstrap requests do not count as result pages.

## Actor input object example

```json
{
  "inputList": [
    "https://www.youtube.com/post/UgkxOoOJQb2h2PnigPD6OnmPvt8Tpbd0wRhP"
  ],
  "pagesPerInput": 1
}
```

# Actor output Schema

## `results` (type: `string`):

Success and failed rows. Check the status column.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "inputList": [
        "https://www.youtube.com/post/UgkxOoOJQb2h2PnigPD6OnmPvt8Tpbd0wRhP"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapingmonkey/youtube-post-comments-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "inputList": ["https://www.youtube.com/post/UgkxOoOJQb2h2PnigPD6OnmPvt8Tpbd0wRhP"] }

# Run the Actor and wait for it to finish
run = client.actor("scrapingmonkey/youtube-post-comments-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "inputList": [
    "https://www.youtube.com/post/UgkxOoOJQb2h2PnigPD6OnmPvt8Tpbd0wRhP"
  ]
}' |
apify call scrapingmonkey/youtube-post-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapingmonkey/youtube-post-comments-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/oxBDaVKwbeNdauinb/builds/ewQlxhi4FSsRevoBx/openapi.json
