# YouTube Channel Scraper for Comments & Transcripts (`runtime/youtube-channel-scraper`) Actor

Scrape YouTube channel videos, comments, transcripts, channel IDs, handles, views, engagement metrics, velocity, quality scores, and outlier signals.

- **URL**: https://apify.com/runtime/youtube-channel-scraper.md
- **Developed by:** [scraping automation](https://apify.com/runtime) (community)
- **Categories:** Social media, Videos, Automation
- **Stats:** 115 total users, 0 monthly users, 100.0% runs succeeded, 10 bookmarks
- **User rating**: 4.18 out of 5 stars

## Pricing

$25.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period. You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

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

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

## YouTube Channel Scraper: Comments & Transcripts

Extract YouTube channel videos, search results, comments, transcripts, channel
identity fields, normalized engagement metrics, velocity, quality scores, and
outlier signals.

### Best for

- SEO and content teams researching topics, titles, transcripts, and hashtags
- Brand monitoring teams collecting comments and channel mentions
- Creator economy analysts comparing video performance and publishing cadence
- Automation users sending YouTube data to Sheets, Make, Zapier, n8n, or BI tools

### Quick start

Start with fast listing mode before turning on detail, comments, or transcripts.

```json
{
  "channel": "https://www.youtube.com/@Dior",
  "max_videos": 10,
  "video_details": false,
  "comments_max": 0,
  "transcript_mode": "off",
  "output_mode": "compact",
  "include_run_metadata": true,
  "safe_mode": true,
  "failOnNoResults": true,
  "timeout": 300,
  "useApifyProxy": true
}
```

Use a smaller detailed run when you need comments or transcripts:

```json
{
  "channel": "https://www.youtube.com/@Dior",
  "max_videos": 3,
  "video_details": true,
  "comments_max": 10,
  "comments_strategy": "auto",
  "transcript_mode": "auto",
  "output_mode": "compact",
  "include_run_metadata": true,
  "safe_mode": true,
  "timeout": 900,
  "useApifyProxy": true
}
```

### Common workflows

- **Channel monitoring**: collect recent videos, views, dates, hashtags, and
  channel identity fields on a schedule.
- **Competitor analysis**: compare `views`, `likes`, `engagementRate`,
  `viewVelocity`, `performanceScore`, and `isOutlier`.
- **Brand comment research**: enable comments and use `comments_user_search` to
  inspect specific authors or brand mentions.
- **SEO and AI workflows**: enable transcripts for small runs, then export
  transcript segments and descriptions to AI summarizers.

### Useful input fields

| Field | Use |
| --- | --- |
| `channel` | YouTube channel URL, handle, or channel ID. |
| `search_query` | Search globally, or within a channel when `channel` is set. |
| `max_videos` | Keep low for detailed runs; increase for listing mode. |
| `video_details` | Opens video pages for descriptions, metrics, comments, and transcripts. |
| `comments_max` | Comments per video. Use `0` for fast listing runs. |
| `transcript_mode` | `off`, `auto`, `api`, `ui`, or `ui_strict`. |
| `output_mode` | `compact` for automation, `full` for research, `minimal` for light exports. |
| `safe_mode` | More stable navigation for large or fragile runs. |
| `useApifyProxy` | Recommended for cloud runs and larger channels. |

### Output fields

The dataset can include:

- `channelId`
- `channelHandle`
- `channelTitle`
- `title`
- `url`
- `views`
- `likes`
- `commentCount`
- `publishedAtISO`
- `durationSeconds`
- `hashtags`
- `descriptionLinks`
- `comments`
- `transcript`
- `transcriptSegments`
- `engagementRate`
- `viewVelocity`
- `performanceScore`
- `qualityScore`
- `qualityWarnings`
- `extractionStatus`

### Settings that convert best

- For first runs, use `video_details: false`, `comments_max: 0`, and
  `transcript_mode: "off"`.
- For comments/transcripts, keep `max_videos` small and increase only after a
  successful sample run.
- Use `output_mode: "compact"` for no-code automations.
- Split large channel monitoring into scheduled smaller runs instead of one
  heavy run.

### Cost and runtime expectations

Listing mode is much faster than detail mode. Comments and transcripts require
extra navigation and can time out on some videos. If a run is slow or aborted,
reduce `max_videos`, disable transcripts, set `comments_max` lower, and rerun a
small sample before scaling.

### Limitations

YouTube may hide likes, comments, transcripts, or exact dates by market, video,
age restriction, privacy settings, or UI changes. Transcript extraction is best
effort and may require authenticated cookies for some videos. Keep
`qualityWarnings` and `extractionStatus` in downstream workflows.

### Support

If a run returns unexpected data, open an issue from the Actor page with the
input used, the run ID, and the result you expected.

# Actor input Schema

## `channel` (type: `string`):

YouTube channel URL (e.g. https://www.youtube.com/@Nike). Required unless using global search with search\_query only. Supports @handle, /channel/ID, /c/name, /user/name formats.

## `search_query` (type: `string`):

Search term. If channel provided: searches within channel. If no channel: performs global YouTube search across all videos.

## `max_videos` (type: `integer`):

Maximum number of videos to extract from the listing page. Recommended: 5-10 for quick tests, 30-100 for listing only, 10-30 when video\_details=true.

## `timeout` (type: `integer`):

Maximum runtime in seconds. Recommended: 300 (5 min) for quick tests with 5 videos, 900 (15 min) for listing only, 1800+ (30+ min) when video\_details=true with many comments.

## `video_details` (type: `boolean`):

Visit each video page to extract description, likes, comment count, comments, replies (optional), transcript (optional). Recommended: enable for comprehensive data.

## `comments_max` (type: `integer`):

Number of top-level comments to extract per video. Higher values increase processing time. Recommended: 5-10 for quick tests, 10-30 for most use cases, up to 200 for detailed analysis.

## `comments_user_search` (type: `string`):

Only keep comments whose author contains this substring (case-insensitive).

## `comments_strategy` (type: `string`):

auto = API then UI fallback, api = Innertube only, ui = UI only

## `includeReplies` (type: `boolean`):

Replies extraction is best-effort via UI fallback.

## `output_mode` (type: `string`):

full = complete payload, compact = automation-friendly without heavy text blobs, minimal = smallest payload for routing/alerts.

## `include_run_metadata` (type: `boolean`):

Adds runMeta fields (runId/taskId/startedAt/mode) to each output item for automation traceability.

## `extract_transcript` (type: `boolean`):

Legacy switch. If enabled and transcript\_mode is not set, actor uses transcript\_mode=auto.

## `transcript_mode` (type: `string`):

auto = API then UI fallback, api = captionTracks/API only, ui = front click flow (more -> transcript), ui\_strict = UI-only with extra diagnostics, off = disable transcript extraction.

## `session_cookies` (type: `array`):

Optional array of cookie objects to run in authenticated session (improves transcript availability on some videos).

## `cookie_string` (type: `string`):

Optional semicolon-separated cookies (e.g. SID=...; HSID=...). Parsed as YouTube cookies.

## `safe_mode` (type: `boolean`):

Blocks heavy resources, uses safer waits/timeouts. Recommended on large runs.

## `failOnNoResults` (type: `boolean`):

Fail the run when the channel or search listing stores no videos. Useful for validation and monitoring; leave disabled for normal jobs that may intentionally return empty datasets.

## `ui_mode` (type: `string`):

simple: quiet. pro: same behavior but intended for power users. debug: extra screenshots/logs.

## `useApifyProxy` (type: `boolean`):

Recommended.

## `proxyConfiguration` (type: `object`):

Configure Apify Proxy / custom proxies.

## Actor input object example

```json
{
  "channel": "https://www.youtube.com/@Nike",
  "search_query": "",
  "max_videos": 5,
  "timeout": 300,
  "video_details": true,
  "comments_max": 5,
  "comments_user_search": "",
  "comments_strategy": "auto",
  "includeReplies": false,
  "output_mode": "full",
  "include_run_metadata": false,
  "extract_transcript": false,
  "transcript_mode": "auto",
  "safe_mode": true,
  "failOnNoResults": false,
  "ui_mode": "simple",
  "useApifyProxy": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": []
  }
}
```

# Actor output Schema

## `allVideos` (type: `string`):

Open the complete dataset with video metadata, channel fields, performance scores, comments, transcript segments, and quality diagnostics.

# 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 = {
    "channel": "https://www.youtube.com/@Nike",
    "useApifyProxy": true,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": []
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("runtime/youtube-channel-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 = {
    "channel": "https://www.youtube.com/@Nike",
    "useApifyProxy": True,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": [],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("runtime/youtube-channel-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 '{
  "channel": "https://www.youtube.com/@Nike",
  "useApifyProxy": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": []
  }
}' |
apify call runtime/youtube-channel-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,runtime/youtube-channel-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/Vi3sbNnWysn7mKE6W/builds/Q3kjlUH7LaJYIlshN/openapi.json
