# YouTube Scraper — Channels, Videos & Search (`cryptosignals/youtube-scraper`) Actor

Scrape YouTube channels, videos, and search results. Get title, channel, views, likes, comments, duration, publish date, and description. Ideal for content research and creator analytics. PPE pricing — pay only for results.

- **URL**: https://apify.com/cryptosignals/youtube-scraper.md
- **Developed by:** [Web Data Labs](https://apify.com/cryptosignals) (community)
- **Categories:** Social media
- **Features:** Limited permissions
- **Stats:** 65 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00 / 1,000 result scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 Scraper — Channels, Videos, Search & Comments (No API Key Required)

Extract YouTube channel data, video statistics, search results, and comment threads — **no API key needed**. No Google Cloud account, no OAuth, no quota limits. Export to **JSON, CSV, Excel**, or connect via **Zapier / Make.com** integration.

### Why Use This YouTube Scraper?

YouTube is the world's largest video platform with over 2 billion monthly active users. The official YouTube Data API requires a Google Cloud account, API key setup, and has strict quota limits. This scraper bypasses all of that — giving you the same data without any API key or setup.

**No API key needed.** No Google Cloud account, no OAuth credentials, no quota limits. Just configure your input, run the actor, and download structured data.

### Features

- **Channel scraping** — get subscriber counts, video lists, and channel metadata
- **Video statistics** — views, likes, comments, duration, tags, descriptions, and more
- **YouTube search** — search YouTube programmatically and get structured results
- **Comment threads** — pull a video's comments and replies as flat, structured rows
- **No API key needed** — zero setup, no Google Cloud account, no OAuth, no quotas
- **Fast & reliable** — handles rate limiting and anti-bot measures automatically
- **JSON & CSV export** — download results in JSON, CSV, Excel, XML, or RSS
- **Zapier / Make.com integration** — connect to 5,000+ apps via webhooks
- **Multiple URL formats** — supports @username, /c/channel, /channel/UC..., watch?v=, and youtu.be links
- **Scheduled runs** — set up recurring scrapes to track channel growth and video performance

### Input Schema

| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| `action` | string | Yes | `search` | One of: `channel`, `video`, `search`, `comments` |
| `url` | string | For channel/video/comments | — | YouTube URL (channel or video) |
| `query` | string | For search | — | Search query string |
| `maxItems` | integer | No | `5` | Max rows to return (default: 5, max: 200) |
| `includeReplies` | boolean | No | `true` | Comments action only — include reply rows |
| `sortBy` | string | No | `top` | Comments action only — `top` or `new` |
| `minLikes` | integer | No | `0` | Comments action only — skip comments below this like count |
| `proxyConfiguration` | object | No | off | Comments action only — opt-in Apify Proxy |

Defaults and limits above are read from the actor's own input schema; the **Input** tab on this page is always the authoritative copy.

#### Action Types

- **`channel`** — Scrape a YouTube channel's metadata and recent videos. Requires `url`.
- **`video`** — Get complete metadata for a single YouTube video. Requires `url`.
- **`search`** — Search YouTube and get structured results. Requires `query`.
- **`comments`** — Get the comment threads of a single video. Requires `url`.

#### Example Inputs

**Scrape a channel:**

```json
{
  "action": "channel",
  "url": "https://www.youtube.com/@mkbhd",
  "maxItems": 5
}
```

**Get video details:**

```json
{
  "action": "video",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
```

**Search YouTube:**

```json
{
  "action": "search",
  "query": "python programming tutorial",
  "maxItems": 50
}
```

**Get a video's comments:**

```json
{
  "action": "comments",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "maxItems": 50,
  "includeReplies": true,
  "sortBy": "top"
}
```

### Output Schema

#### Video Details Output

```json
{
  "type": "video",
  "id": "dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "channel": "Rick Astley",
  "channelUrl": "https://www.youtube.com/@RickAstleyYT",
  "views": 1752745940,
  "likes": 18859741,
  "comments": 2400000,
  "duration": 213,
  "durationString": "3:33",
  "uploadDate": "20091025",
  "description": "The official video for...",
  "tags": ["rick astley", "never gonna give you up"],
  "thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
  "categories": ["Music"],
  "language": "en"
}
```

#### Channel Video Output

```json
{
  "type": "channelVideo",
  "channel": "MKBHD",
  "channelUrl": "https://www.youtube.com/@mkbhd",
  "id": "D4QyStJWgCc",
  "title": "Nothing Phone 4A/Pro Review",
  "url": "https://www.youtube.com/watch?v=D4QyStJWgCc",
  "views": 1204240,
  "duration": 724.0,
  "thumbnail": "https://i.ytimg.com/vi/D4QyStJWgCc/hqdefault.jpg"
}
```

#### Search Result Output

```json
{
  "type": "searchResult",
  "query": "python tutorial",
  "id": "K5KVEU3aaeQ",
  "title": "Python Full Course for Beginners",
  "url": "https://www.youtube.com/watch?v=K5KVEU3aaeQ",
  "channel": "Programming with Mosh",
  "views": 5756711,
  "duration": 7341.0,
  "thumbnail": "https://i.ytimg.com/vi/K5KVEU3aaeQ/hqdefault.jpg"
}
```

#### Comment Output

One row per comment. Replies are **flat rows**, not nested — rebuild a thread by
grouping on `parentCommentId`.

```json
{
  "type": "comment",
  "id": "Ugzge340dBgB75hWBm54AaABAg",
  "videoId": "dQw4w9WgXcQ",
  "commentId": "Ugzge340dBgB75hWBm54AaABAg",
  "text": "can confirm: he never gave us up",
  "author": "@YouTube",
  "authorChannelUrl": "https://www.youtube.com/@YouTube",
  "authorId": "UCBR8-60-B28hp2BmDPdntcQ",
  "likeCount": 313000,
  "publishedAt": "1 year ago",
  "publishedTs": 1757548800,
  "updatedAt": null,
  "isReply": false,
  "parentCommentId": null,
  "isPinned": true,
  "authorIsUploader": false,
  "authorIsVerified": true,
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&lc=Ugzge340dBgB75hWBm54AaABAg"
}
```

Field notes, so nothing here is a surprise:

- **The `comments` field on a `video` row is a COUNT**, not an array. Comment
  text only comes from `action: "comments"`.
- **`publishedAt` is relative text** as YouTube renders it (`"1 year ago"`), not
  an ISO timestamp. `publishedTs` is a unix approximation derived from that same
  relative text — treat it as accurate to the day, not the second.
- **`parentCommentId` is the DIRECT parent**, in compound `a.b` form for a reply
  to a reply. The separate
  [YouTube Comments Scraper](https://apify.com/cryptosignals/youtube-comments-scraper)
  sets it to the thread's top-level comment instead — if you are migrating, that
  is the one field whose meaning differs.
- **There is no `replyCount`.** The extractor behind this action does not report
  one, and a count of "replies we happened to fetch under your `maxItems`" would
  read as `0` next to a thread with hundreds of replies. If you need a true reply
  count, use the comments scraper linked above.
- Replies are capped per thread so that one popular thread cannot consume your
  whole `maxItems` budget.
- A video with comments turned off, a live stream with chat instead of comments,
  and a request YouTube refused all look identical to the extractor. This action
  therefore **fails the run** rather than finishing with zero rows — you are not
  charged either way.

### Code Examples

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

## Search YouTube
run = client.actor("cryptosignals/youtube-scraper").call(run_input={
    "action": "search",
    "query": "python programming tutorial",
    "maxItems": 50
})

## Fetch results
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{item['title']} — {item.get('views', 0):,} views")
    print(f"  Channel: {item.get('channel', 'N/A')}")
    print(f"  URL: {item['url']}")
    print("---")
```

```python
## Get detailed video statistics
run = client.actor("cryptosignals/youtube-scraper").call(run_input={
    "action": "video",
    "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"Title: {item['title']}")
    print(f"Views: {item['views']:,} | Likes: {item.get('likes', 0):,}")
    print(f"Duration: {item.get('durationString', 'N/A')}")
    print(f"Tags: {', '.join(item.get('tags', []))}")
```

```python
## Scrape a channel's recent videos
run = client.actor("cryptosignals/youtube-scraper").call(run_input={
    "action": "channel",
    "url": "https://www.youtube.com/@mkbhd",
    "maxItems": 30
})

videos = list(client.dataset(run["defaultDatasetId"]).iterate_items())
total_views = sum(v.get("views", 0) for v in videos)
print(f"Channel: {videos[0].get('channel', 'Unknown')} | {len(videos)} videos | {total_views:,} total views")
```

#### JavaScript

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

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

// Search YouTube
const run = await client.actor('cryptosignals/youtube-scraper').call({
    action: 'search',
    query: 'machine learning explained',
    maxItems: 30
});

// Fetch results
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach(item => {
    console.log(`${item.title} — ${item.views?.toLocaleString()} views`);
    console.log(`  Channel: ${item.channel} | ${item.url}`);
});
```

```javascript
// Get video details
const videoRun = await client.actor('cryptosignals/youtube-scraper').call({
    action: 'video',
    url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'
});

const { items: videos } = await client.dataset(videoRun.defaultDatasetId).listItems();
const video = videos[0];
console.log(`${video.title}`);
console.log(`Views: ${video.views?.toLocaleString()} | Likes: ${video.likes?.toLocaleString()}`);
console.log(`Duration: ${video.durationString} | Upload: ${video.uploadDate}`);
```

### Use Cases

#### Market Research & Competitor Analysis

Track competitor channels, analyze their most popular videos, and discover trending content in your niche. Monitor view counts and engagement metrics over time.

#### Content Creator Analytics

Analyze any YouTube channel's performance — find their top-performing videos, track upload frequency, and benchmark against competitors.

#### SEO & Keyword Research

Search YouTube for keywords to understand what content ranks well. Find gaps in content coverage and discover high-demand topics with low competition.

#### Influencer Marketing

Evaluate YouTube influencers for sponsorship opportunities. Analyze subscriber counts, view-to-subscriber ratios, and content quality before reaching out.

#### Academic Research & Data Science

Collect YouTube data for academic studies, sentiment analysis, trend research, and social media analytics projects.

#### Lead Generation

Find YouTube channels in specific niches for outreach, sponsorship opportunities, or partnership development. Export channel data for your CRM.

#### Social Media Monitoring

Track brand mentions, product reviews, and industry discussions on YouTube with automated search queries. Set up recurring scrapes for ongoing monitoring.

#### Podcast & Media Research

Discover popular YouTube shows and interviews in your industry. Track episode frequency, guest appearances, and audience engagement.

### Supported URL Formats

| Format | Example |
|--------|---------|
| @username | `https://www.youtube.com/@mkbhd` |
| /c/channel | `https://www.youtube.com/c/channelname` |
| /channel/UC... | `https://www.youtube.com/channel/UCBcRF18a7Qf58cCRy5xuWwQ` |
| watch?v= | `https://www.youtube.com/watch?v=dQw4w9WgXcQ` |
| youtu.be | `https://youtu.be/dQw4w9WgXcQ` |

### Integrations

Connect YouTube Scraper with your favorite tools:

- **Zapier** — Trigger workflows when new data is scraped. Send YouTube data to Google Sheets, Slack, email, or 5,000+ apps.
- **Make.com (Integromat)** — Build complex automation workflows with YouTube data as a trigger or data source.
- **Google Sheets** — Export results directly to spreadsheets for collaborative analysis.
- **Webhooks** — Send results to any HTTP endpoint in real-time.
- **API** — Access results programmatically via the Apify API in Python, JavaScript, or any language.
- **Scheduled runs** — Set up daily or weekly scraping schedules to track channel growth.

### FAQ

#### Do I need a YouTube API key?

No! This scraper works without any API key, OAuth credentials, or Google Cloud setup. No API key needed — it extracts data from YouTube's public pages directly.

#### Is this scraper free to use?

No. This actor uses **pay-per-event (PPE)** pricing: you are charged for each result delivered, plus Apify platform compute. Current per-result rates are on the **Pricing** tab of this actor's Store page. Apify's free plan includes platform credit you can use to try a small run.

#### How many results can I scrape?

Up to `maxItems` rows per run — a maximum of 200 — for channel videos, search results and comments. For single video details, each run returns one complete result. The 200-row ceiling is this actor's own `maxItems` limit; it is not a comment-volume feature. For very large comment pulls, use the dedicated [YouTube Comments Scraper](https://apify.com/cryptosignals/youtube-comments-scraper), which is a separate, still-published actor with its own limits.

#### Can I get the text of a video's comments?

Yes — run `action: "comments"` with the video URL. Note that the `comments` field on a `video` row is the video's comment *count*; the comment text lives in the `comments` action's rows.

#### Can I export to CSV or JSON?

Yes. Results are stored in an Apify dataset that can be exported to JSON, CSV, Excel (XLSX), XML, or RSS with a single click. You can also download via the API.

#### Does this download videos?

No. This scraper only extracts metadata (titles, views, likes, etc.). It does not download any video or audio content.

#### How often is the data updated?

Every run fetches fresh, real-time data directly from YouTube. There is no caching — you always get the latest statistics.

#### Can I scrape private or unlisted videos?

No. This scraper only works with publicly available YouTube content.

#### Can I use this with Zapier or Make.com?

Yes! Apify has native integrations with both Zapier and Make.com. Trigger workflows automatically whenever a scraping run completes.

#### What output formats are available?

You can download results in JSON, CSV, Excel (XLSX), XML, HTML, or RSS format.

#### How does this compare to the YouTube Data API?

The YouTube Data API requires a Google Cloud account, API key setup, and has a quota of 10,000 units/day. This scraper has no such limitations — no setup, no quotas, no API key needed.

### Avoiding YouTube Blocks & Rate Limits

YouTube is one of the more aggressive platforms when it comes to blocking datacenter IP addresses. High-volume scraping from cloud infrastructure often results in CAPTCHAs, empty responses, or outright IP bans — even with reasonable request delays.

Residential proxies solve this by routing requests through real ISP addresses that YouTube treats as normal browser traffic. I run my own YouTube scraping pipelines through [ThorData's residential proxy network](https://thordata.partnerstack.com/partner/0a0x4nzh) — their rotating IPs across 195+ countries mean each request appears to come from a different real user, which avoids the blocks you get with datacenter proxies.

For light usage (a few hundred videos per day), the actor handles YouTube's limits fine on its own. Proxies become important when you're scaling up.

### Legal & Compliance

This actor scrapes only **publicly available metadata** from YouTube. It does not download video or audio content, bypass access controls, or access any private data.

**Important considerations:**

- Comply with YouTube's Terms of Service and your local data protection laws (GDPR, CCPA, etc.) when using scraped data.
- Do not use this tool for spam, harassment, or any illegal purpose.
- The data extracted (view counts, titles, descriptions) is the same information visible to any YouTube visitor.
- The actor does not download or store videos — it only extracts metadata and statistics.
- For commercial use, consult your legal team regarding compliance with applicable regulations.
- Respect content creators' intellectual property rights and privacy.

This tool is intended for legitimate purposes such as market research, content analysis, competitive intelligence, academic study, and SEO research.

### Pricing

This actor uses **pay-per-event (PPE)** pricing. You pay for each result this actor returns, plus platform compute. See the **Pricing** tab on this Store page for the current per-result rate. The actor is not free and is not compute-only.

### Limitations

- Public content only — cannot access private, unlisted, or age-restricted videos
- Maximum 200 rows per run for channel videos, search and comments
- Comments: one video per run, and a run that finds no comments fails rather than returning an empty dataset
- Metadata and comments only — does not download video or audio files
- YouTube may change their page structure — the actor uses yt-dlp for reliable extraction
- Some video fields (tags, categories) may not be available for all videos

***

### Related Scrapers by CryptoSignals

- [TikTok Scraper](https://apify.com/cryptosignals/tiktok-scraper) — Short-form video profiles & hashtags
- [Pinterest Scraper](https://apify.com/cryptosignals/pinterest-scraper) — Visual content, pins & boards
- [Reddit Scraper](https://apify.com/cryptosignals/reddit-scraper) — Community posts & discussions

👉 [See all our scrapers](https://apify.com/cryptosignals)

***

*Found this actor useful? [Leave a review](https://apify.com/cryptosignals/youtube-scraper#reviews) - it helps a lot. Something broken? Report it on the [Issues tab](https://apify.com/cryptosignals/youtube-scraper/issues).*

# Actor input Schema

## `action` (type: `string`):

What to scrape: 'channel' for channel info and videos, 'video' for single video details, 'search' for YouTube search results, 'comments' for the comment threads of one video.

## `url` (type: `string`):

YouTube URL for the channel, video or comments action. Examples: https://www.youtube.com/@mkbhd, https://www.youtube.com/watch?v=dQw4w9WgXcQ

## `query` (type: `string`):

Search query for the 'search' action. Leave empty to get trending videos instead. Example: 'python tutorial'

## `maxItems` (type: `integer`):

Maximum number of results to return (channel videos, search results, or comment rows).

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

Comments action only. Include reply rows as well as top-level comments. Replies are flat rows linked by parentCommentId.

## `sortBy` (type: `string`):

Comments action only. 'top' returns YouTube's most-relevant order, 'new' returns newest first.

## `minLikes` (type: `integer`):

Comments action only. Skip comments with fewer likes than this.

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

Comments action only, and off by default. Enable Apify Proxy if YouTube refuses comment requests from the run's IP. Every other action runs direct.

## Actor input object example

```json
{
  "action": "channel",
  "url": "https://www.youtube.com/@mkbhd",
  "query": "python tutorial",
  "maxItems": 5,
  "includeReplies": true,
  "sortBy": "top",
  "minLikes": 0,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# 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 = {
    "action": "channel",
    "url": "https://www.youtube.com/@mkbhd",
    "query": "python tutorial",
    "maxItems": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("cryptosignals/youtube-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 = {
    "action": "channel",
    "url": "https://www.youtube.com/@mkbhd",
    "query": "python tutorial",
    "maxItems": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("cryptosignals/youtube-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 '{
  "action": "channel",
  "url": "https://www.youtube.com/@mkbhd",
  "query": "python tutorial",
  "maxItems": 5
}' |
apify call cryptosignals/youtube-scraper --silent --output-dataset

```

## MCP server setup

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