# YouTube Community Posts Scraper (`crawlerbros/youtube-community-posts-scraper`) Actor

Scrape public YouTube community posts, images, polls, video attachments, and optionally exposed comments without cookies or API credentials.

- **URL**: https://apify.com/crawlerbros/youtube-community-posts-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (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 and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

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 examples already wired to this Actor's own input schema, see the [API](#api) section below.

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`).

# README

## YouTube Community Posts Scraper

Scrape public Community Posts from any channel: post text, visible reactions, images and multi-image galleries, video attachments, polls, and optional comments. Unavailable channels produce a structured status row instead of empty or fabricated output.

### What this actor does

- **Channel posts:** text, images, polls, videos, and shared content
- **Engagement:** like counts and comment counts per post
- **Optional comments:** fetch the comment threads under each post
- **Bulk channels:** multiple channels per run
- **Empty fields are omitted** — records only contain values that are actually populated.

### Output

Each post row contains `postId`, `channelId`, `channelHandle`, `contentText`, `publishedTimeText`, `voteCountText`, `commentCountText`, `images[]`, `videoAttachments[]`, `poll`, and optional `comments[]`. Channels without public posts produce a `recordType: "status"` row with `status: "no_public_posts"`.

### Input

| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| `channelUrls` | string\[] | Yes | - | Channel handles, URLs, or channel IDs |
| `maxPosts` | integer | No | 100 | Max posts per channel (1-10000) |
| `includeComments` | boolean | No | false | Include post comments |
| `maxComments` | integer | No | 100 | Max comments per post (1-1000) |
| `market` | string | No | `"US"` | Country code for localized content |

#### Example input

```json
{
  "channelUrls": ["@MrBeast", "@BLACKPINK"],
  "maxPosts": 20,
  "includeComments": true,
  "maxComments": 10
}
```

### Examples

#### Example: posts only

```json
{
  "channelUrls": ["@MrBeast"],
  "maxPosts": 20
}
```

#### Example: posts with comments

```json
{
  "channelUrls": ["@MrBeast"],
  "maxPosts": 10,
  "includeComments": true,
  "maxComments": 20
}
```

### Use cases

- **Community management** — monitor what creators post to their community tab
- **Audience research** — analyse engagement on polls and announcements
- **Content archiving** — keep a record of time-limited community posts
- **Competitive tracking** — follow competitor announcements

### FAQ

**What is the Community tab?**

YouTube's social feed on a channel where creators post text, images, polls, and videos outside the regular upload feed.

**Why do some channels return no posts?**

Not every channel uses the Community tab; a status message explains when none are available.

**Do I need cookies?**

No. Posts are read from public channel pages.

**Can I get comments on posts?**

Yes — enable `includeComments` and set `maxComments`.

### YouTube Scraper Suite

This actor is part of a complete YouTube data extraction toolkit. Explore the full suite:

| Actor | Description |
|-------|-------------|
| [YouTube Ads Scraper](https://apify.com/crawlerbros/youtube-ads-scraper) | Google Ads Transparency ads by advertiser, keyword, and country |
| [YouTube Channel Profile Scraper](https://apify.com/crawlerbros/youtube-channel-profile-scraper) | Full channel profiles with About data, playlists, and community posts |
| [YouTube Channel Scraper](https://apify.com/crawlerbros/youtube-channel-scraper) | Channel metadata, subscriber counts, and full video catalogs |
| [YouTube Channel Scraper Fast](https://apify.com/crawlerbros/youtube-channel-scraper-fast) | Streamlined channel scraper for high-volume and speed-sensitive workflows |
| [YouTube Comment Scraper](https://apify.com/crawlerbros/youtube-comment-scraper) | Comments, replies, likes, author info, and pinned/hearted status |
| [YouTube Email Scraper](https://apify.com/crawlerbros/youtube-email-scraper) | Creator contact emails from channel pages, Instagram, TikTok, and Linktree |
| [YouTube Hashtag Scraper](https://apify.com/crawlerbros/youtube-hashtag-scraper) | Videos and Shorts tagged with specific hashtags |
| [YouTube Live Chat Scraper](https://apify.com/crawlerbros/youtube-live-chat-scraper) | Live and replay chat messages with author and timing metadata |
| [YouTube Playlist Scraper](https://apify.com/crawlerbros/youtube-playlist-scraper) | Videos from playlists plus channel playlist discovery |
| [YouTube Search Scraper](https://apify.com/crawlerbros/youtube-search-scraper) | Search results including videos, channels, and playlists |
| [YouTube Search Suggestions Scraper](https://apify.com/crawlerbros/youtube-search-suggestions-scraper) | Autocomplete keyword suggestions with ready search URLs |
| [YouTube Shorts Scraper](https://apify.com/crawlerbros/youtube-shorts-scraper) | Shorts from channels or hashtags with full view and like metadata |
| [YouTube SponsorBlock Segments Scraper](https://apify.com/crawlerbros/youtube-sponsorblock-scraper) | SponsorBlock segments (sponsor, intro, outro, and more) for any video |
| [YouTube Transcript Scraper](https://apify.com/crawlerbros/youtube-transcript-scraper) | Timed transcripts and captions with optional Whisper AI fallback |
| [YouTube Trending Scraper](https://apify.com/crawlerbros/youtube-trending-scraper) | Ranked trending videos by category — Gaming, Music, News, Movies |
| [YouTube Video Details Scraper](https://apify.com/crawlerbros/youtube-video-details-scraper) | Comprehensive video metadata, chapters, endscreen, captions, and comments |
| [YouTube Video Downloader](https://apify.com/crawlerbros/youtube-video-downloader) | Download videos, playlists, and channels in any quality with metadata |

# Actor input Schema

## `channelUrls` (type: `array`):

Public YouTube channel URLs, handles, or channel IDs.

## `maxPosts` (type: `integer`):

Maximum number of public post rows per channel.

## `includeComments` (type: `boolean`):

Include comments only when YouTube exposes them in the public post response.

## `maxComments` (type: `integer`):

Maximum public comments to retain on each post row when enabled.

## `market` (type: `string`):

Country code used for the public localized YouTube page.

## Actor input object example

```json
{
  "channelUrls": [
    "https://www.youtube.com/@MrBeast",
    "https://www.youtube.com/@RickAstleyYT"
  ],
  "maxPosts": 10,
  "includeComments": false,
  "maxComments": 100,
  "market": "US"
}
```

# Actor output Schema

## `posts` (type: `string`):

Dataset containing all scraped community post rows with attachments and comments.

# 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 = {
    "channelUrls": [
        "https://www.youtube.com/@MrBeast",
        "https://www.youtube.com/@RickAstleyYT"
    ],
    "maxPosts": 10,
    "includeComments": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/youtube-community-posts-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 = {
    "channelUrls": [
        "https://www.youtube.com/@MrBeast",
        "https://www.youtube.com/@RickAstleyYT",
    ],
    "maxPosts": 10,
    "includeComments": False,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/youtube-community-posts-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 '{
  "channelUrls": [
    "https://www.youtube.com/@MrBeast",
    "https://www.youtube.com/@RickAstleyYT"
  ],
  "maxPosts": 10,
  "includeComments": false
}' |
apify call crawlerbros/youtube-community-posts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawlerbros/youtube-community-posts-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/Oyixqm7AzjZ3yovHD/builds/fteXniHQlggInkJtM/openapi.json
