# YouTube Video Scraper  | Search, Channel, Playlist & Video (`scrapepilot/youtube-video-scraper-search-channel-playlist-video`) Actor

Scrape YouTube search results, channel videos, playlists, and single videos with dynamic-rendering support. Extract title, URL, video ID, channel info, views, duration, published date, thumbnail, and description in clean JSON for automation, research, and content tracking.

- **URL**: https://apify.com/scrapepilot/youtube-video-scraper-search-channel-playlist-video.md
- **Developed by:** [Scrape Pilot](https://apify.com/scrapepilot) (community)
- **Categories:** Videos, Social media, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

$6.99/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/platform/actors/running/actors-in-store#rental-actors

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Video Scraper — Search, Channel, Playlist & Single Video Data Extractor

> **The most reliable YouTube Video Scraper on Apify.** Extract video titles, views, likes, channel info, thumbnails, durations, and descriptions from YouTube search results, channels, playlists, and single video pages — powered by real browser rendering. No YouTube API key needed.

---

> 🆓 **Try FREE for 2 hours** — no credit card needed. Then just **$6.99/month** for unlimited YouTube video scraping across any search, channel, playlist, or video URL.

---

### 📌 Table of Contents

- [What Is This Actor?](#what-is-this-actor)
- [Why This Is the Best YouTube Video Scraper](#why-this-is-the-best-youtube-video-scraper)
- [💰 Pricing](#-pricing)
- [4 Scraping Modes](#4-scraping-modes)
- [Use Cases](#use-cases)
- [Output Fields (Full Reference)](#output-fields-full-reference)
- [Input Parameters](#input-parameters)
- [Example Inputs & Outputs](#example-inputs--outputs)
- [How the YouTube Video Scraper Works](#how-the-youtube-video-scraper-works)
- [Supported URL Formats](#supported-url-formats)
- [Proxy Configuration](#proxy-configuration)
- [Performance & Speed](#performance--speed)
- [FAQ](#faq)
- [Changelog](#changelog)
- [Legal & Terms of Use](#legal--terms-of-use)

---

### 🔍 What Is This Actor?

**YouTube Video Scraper** is a production-grade Apify actor that extracts complete video data from YouTube — search results, full channel libraries, playlists, and individual video pages — using a real browser engine that renders YouTube's dynamic JavaScript content exactly as a human user would see it.

This YouTube video scraper requires **no YouTube Data API key**, no Google account, and no login. It handles all four major YouTube content types in one unified interface: keyword search results, channel video grids, playlist video lists, and single video detail pages. Every run returns clean, structured JSON records with titles, view counts, durations, thumbnails, channel info, subscriber counts, and upload dates.

Whether you are a marketer analyzing YouTube search rankings, a researcher building a video dataset, a content creator tracking competitor channels, or a developer feeding YouTube data into an analytics pipeline — this YouTube video scraper gives you the data you need without API quotas or rate limits.

---

### 🚀 Why This Is the Best YouTube Video Scraper

| Feature | This Actor | YouTube Data API v3 | Generic Scrapers |
|---|---|---|---|
| **No API key required** | ✅ | ❌ Required + quota | ✅ |
| **Real browser rendering** | ✅ Full JS render | ❌ N/A | ⚠️ |
| **Search results scraping** | ✅ | ✅ | ⚠️ |
| **Full channel video grid** | ✅ With scroll | ✅ | ⚠️ |
| **Playlist extraction** | ✅ | ✅ | ⚠️ |
| **Single video detail** | ✅ | ✅ | ⚠️ |
| **Subscriber count** | ✅ | ✅ | ❌ |
| **Duration extraction** | ✅ | ✅ | ⚠️ |
| **Thumbnail URL** | ✅ | ✅ | ⚠️ |
| **API quota limits** | ✅ None | ❌ 10,000 units/day | ✅ |
| **Dynamic content (JS)** | ✅ Full render | ❌ N/A | ❌ |
| **Price** | **$6.99/mo** | Free (limited quota) | Varies |

> **This YouTube video scraper uses a real browser** — it sees exactly what a user sees, including dynamically loaded video cards, subscriber counts, and view statistics rendered by YouTube's React frontend.

---

### 💰 Pricing

#### 🆓 Free Trial — 2 Hours, No Credit Card

Start your first YouTube video scraper run **immediately** with a full 2-hour free trial. No credit card. No signup friction. Click **Try for free** and paste your first YouTube URL or search query in under 60 seconds.

During the free trial you get:
- ✅ All 4 scraping modes — Search, Channel, Playlist, Single Video
- ✅ Full output — titles, views, subscribers, thumbnails, durations, descriptions
- ✅ Automatic scroll for loading more results
- ✅ Complete JSON output ready for dataset export

#### 💳 Paid Plan — $6.99/Month

After the free trial, continue with **$6.99/month** — less than the cost of a single stock video clip. You get:

- ✅ **Unlimited runs** — scrape any YouTube search, channel, playlist, or video, as often as you need
- ✅ **No YouTube API quota** — zero daily limits, zero per-request costs
- ✅ **All 4 scraping modes** active
- ✅ **Apify scheduling** — automate weekly channel monitoring or daily search tracking
- ✅ **Webhooks** — push results to Slack, Google Sheets, email, or your app
- ✅ **Apify API access** — integrate YouTube data into any pipeline

#### 💡 What $6.99/Month Gets You vs Alternatives

| Tool | Price | API Key | Quota | All 4 Modes |
|---|---|---|---|---|
| **This YouTube Video Scraper** | **$6.99/mo** | ❌ Not needed | ✅ Unlimited | ✅ |
| YouTube Data API v3 | Free | ✅ Required | ❌ 10K units/day | ⚠️ |
| SerpApi (YouTube) | $50/mo | ✅ Required | ❌ Credits | ⚠️ |
| ScraperAPI | $29/mo | ✅ Required | ❌ Credits | ❌ |
| Manual research | Free | ❌ | ✅ | ✅ Hours wasted |

> 🎯 **$6.99/month with no API key and no quota limits** — the most affordable way to get unlimited YouTube data for your projects.

---

### 🎬 4 Scraping Modes

This YouTube video scraper supports four distinct input modes — auto-detected from the URL you provide:

#### 🔍 Mode 1: YouTube Search Scraper
Provide a keyword or phrase and extract the top video results from YouTube search — exactly what appears on the search results page, in order.

**Example use:** `"python tutorial 2024"`, `"best lo-fi music"`, `"product review iPhone 15"`

**What you get:** Video title, channel name, views, upload date, duration, thumbnail, description snippet, video URL — for every result on the page.

#### 📢 Mode 2: YouTube Channel Scraper
Provide a channel URL and extract all (or up to your max) videos from the channel's video grid — with automatic scroll to load more results.

**Example use:** Scrape all videos from a competitor's channel, monitor a creator's full library, collect all episodes of a video series.

**What you get:** All video fields plus channel name and subscriber count, extracted directly from the channel header.

#### 📋 Mode 3: YouTube Playlist Scraper
Provide a playlist URL and extract all videos in the playlist in order — including title, channel, duration, and direct video URL.

**Example use:** Extract all videos in a course playlist, archive a curated video collection, scrape a YouTube music playlist.

#### 🎬 Mode 4: Single Video Scraper
Provide a single YouTube video URL and extract the complete detail page — title, views, likes, channel name, subscriber count, upload date, and full description.

**Example use:** Track performance of a specific video over time, extract metadata for a video you want to analyze, pull description text for content research.

---

### 🎯 Use Cases

#### 📊 YouTube SEO & Content Research
Use this YouTube video scraper to extract search results for your target keywords — see which videos rank at the top, analyze their titles, thumbnail strategies, and view counts to inform your own content creation.

#### 📈 Competitor Channel Monitoring
Scrape a competitor's full YouTube channel library. Track how many videos they publish, which formats get the most views, and what topics they are covering — automatically, every week.

#### 🏗️ Building YouTube Data Pipelines
Feed YouTube video data into your analytics dashboard, recommendation engine, or content CMS. This YouTube video scraper returns clean JSON that integrates with any database or data pipeline via the Apify API.

#### 🎓 Academic & Research Datasets
Build structured YouTube video datasets for media research, disinformation studies, content moderation research, or social science analysis. Extract metadata at scale without hitting YouTube API quotas.

#### 🔔 Automated Content Monitoring
Schedule this YouTube video scraper to run daily or weekly on specific channels or search queries. Use Apify webhooks to alert your team whenever new videos matching your criteria appear.

#### 💼 Influencer & Creator Research
Extract subscriber counts, view statistics, and content topics from multiple YouTube channels for influencer marketing research and brand partnership evaluation.

#### 📱 App & Platform Development
Build YouTube-powered features into your app without managing YouTube API quotas. Use this scraper as your data source for search, channel listing, or video metadata display features.

#### 📰 Journalism & Media Monitoring
Track YouTube videos related to news events, political topics, or public figures. Monitor specific channels for new uploads and extract engagement data as part of media research workflows.

---

### 📋 Output Fields (Full Reference)

#### 🔍 Search & Channel Mode Fields

| Field | Type | Description | Example |
|---|---|---|---|
| `title` | string | Video title | `"Python Tutorial for Beginners — Full Course"` |
| `video_id` | string | YouTube 11-character video ID | `"dQw4w9WgXcQ"` |
| `video_url` | string | Full YouTube video page URL | `"https://www.youtube.com/watch?v=..."` |
| `channel_name` | string | Creator channel name | `"Programming with Mosh"` |
| `channel_url` | string | Creator channel page URL | `"https://www.youtube.com/@programmingwithmosh"` |
| `views_text` | string | Human-readable view count | `"4.2M views"` |
| `views` | integer | Parsed numeric view count | `4200000` |
| `uploaded` | string | Relative upload time | `"3 months ago"` |
| `duration` | string | Video duration (MM:SS or HH:MM:SS) | `"6:14:07"` |
| `duration_seconds` | integer | Duration in seconds | `22447` |
| `thumbnail` | string | Video thumbnail image URL | `"https://i.ytimg.com/vi/.../hqdefault.jpg"` |
| `description` | string | Description snippet (max 300 chars) | `"Learn Python programming from scratch..."` |

#### 📢 Channel Mode — Extra Fields

| Field | Type | Description | Example |
|---|---|---|---|
| `subscribers` | string | Channel subscriber count | `"3.89M subscribers"` |

#### 🎬 Single Video Mode — Extra Fields

| Field | Type | Description | Example |
|---|---|---|---|
| `published_date` | string | Video publish date | `"Nov 1, 2024"` |
| `likes` | string | Like count (formatted) | `"142K"` |
| `subscribers` | string | Channel subscriber count | `"2.1M subscribers"` |
| `description` | string | Full video description (max 1000 chars) | `"In this video we cover..."` |

---

### ⚙️ Input Parameters

```json
{
  "url":          "https://www.youtube.com/@mkbhd",
  "query":        "",
  "max_results":  20,
  "proxyConfiguration": {
    "useApifyProxy":    true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
````

| Parameter | Type | Default | Description |
|---|---|---|---|
| `url` | string | `""` | Any YouTube URL — video, channel, playlist, or search results page. Auto-detected. |
| `query` | string | `""` | YouTube keyword search query. Used when no URL is provided. |
| `max_results` | integer | `20` | Maximum number of video records to return |
| `proxyConfiguration` | object | Off | Apify proxy settings — recommended for large runs and channel scraping |

> **Note:** Provide either `url` or `query` — not both. If `url` is provided, `query` is ignored. The scraping mode (search / channel / playlist / video) is auto-detected from the URL structure.

***

### 📦 Example Inputs & Outputs

#### Example 1: YouTube Search Scraper

**Input:**

```json
{
  "query":       "machine learning tutorial 2024",
  "max_results": 10
}
```

**Output:**

```json
[
  {
    "title":            "Machine Learning Full Course — 6 Hours | 2024",
    "video_id":         "abc123xyz45",
    "video_url":        "https://www.youtube.com/watch?v=abc123xyz45",
    "channel_name":     "freeCodeCamp.org",
    "channel_url":      "https://www.youtube.com/@freecodecamp",
    "views_text":       "2.1M views",
    "views":            2100000,
    "uploaded":         "8 months ago",
    "duration":         "6:03:47",
    "duration_seconds": 21827,
    "thumbnail":        "https://i.ytimg.com/vi/abc123xyz45/hqdefault.jpg",
    "description":      "Learn machine learning from scratch with this comprehensive 6-hour course..."
  }
]
```

***

#### Example 2: YouTube Channel Scraper

**Input:**

```json
{
  "url":         "https://www.youtube.com/@mkbhd",
  "max_results": 15
}
```

**Output:**

```json
[
  {
    "title":        "iPhone 16 Review: The Everyday Smartphone",
    "video_id":     "xyz789abc12",
    "video_url":    "https://www.youtube.com/watch?v=xyz789abc12",
    "channel_name": "Marques Brownlee",
    "channel_url":  "https://www.youtube.com/@mkbhd",
    "subscribers":  "18.9M subscribers",
    "views_text":   "5.3M views",
    "views":        5300000,
    "uploaded":     "1 month ago",
    "duration":     "17:42",
    "duration_seconds": 1062,
    "thumbnail":    "https://i.ytimg.com/vi/xyz789abc12/hqdefault.jpg"
  }
]
```

***

#### Example 3: YouTube Playlist Scraper

**Input:**

```json
{
  "url":         "https://www.youtube.com/playlist?list=PLxxxxxxxxxxxxxx",
  "max_results": 50
}
```

**Output:** Up to 50 video records from the playlist — in order — each with title, video ID, channel name, duration, thumbnail, and direct video URL.

***

#### Example 4: Single YouTube Video

**Input:**

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

**Output:**

```json
[
  {
    "title":          "Rick Astley — Never Gonna Give You Up (Official Music Video)",
    "video_id":       "dQw4w9WgXcQ",
    "video_url":      "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "channel_name":   "Rick Astley",
    "channel_url":    "https://www.youtube.com/@RickAstleyVEVO",
    "views_text":     "1.45B views",
    "likes":          "16M",
    "subscribers":    "4.2M subscribers",
    "published_date": "Oct 25, 2009",
    "description":    "The official video for 'Never Gonna Give You Up' by Rick Astley..."
  }
]
```

***

#### Example 5: YouTube Search via URL

**Input:**

```json
{
  "url": "https://www.youtube.com/results?search_query=best+python+projects"
}
```

**Output:** Top YouTube search result videos for "best python projects" — with titles, views, channels, durations, and thumbnails — in the exact order YouTube ranks them.

***

### ⚙️ How the YouTube Video Scraper Works

This YouTube video scraper uses a **real Chromium browser** — not a lightweight HTTP request — to load and render YouTube pages exactly as a human user would see them. Here is the step-by-step process:

#### Step 1 — URL Detection

The actor automatically detects what type of content you want: search results, channel, playlist, or single video — from the URL structure. A search query is converted to a YouTube search URL automatically.

#### Step 2 — Browser Launch

A headless Chromium browser starts with anti-detection settings — a real Chrome user agent, `en-US` locale, `1280×800` viewport, and navigator webdriver property hidden — to appear as a genuine user to YouTube.

#### Step 3 — Page Navigation

The browser navigates to the YouTube URL with smart navigation handling — `commit` mode first (for pages with redirects), then `domcontentloaded` as fallback — ensuring the page loads reliably even when YouTube redirects or lazy-loads content.

#### Step 4 — Content Loading & Scroll

The actor waits for the relevant YouTube content selectors to appear, then progressively scrolls the page to trigger YouTube's lazy-loading. Each scroll loads more video cards, which are collected incrementally until `max_results` is reached or no new content loads.

#### Step 5 — JavaScript Data Extraction

Custom JavaScript runs directly in the browser page, reading from YouTube's rendered DOM — extracting every data point from the actual video card elements: titles, links, view counts, durations, thumbnails, channel names, subscriber counts, and upload timestamps.

#### Step 6 — Data Enrichment

Raw extracted data is enriched: duration strings like `"6:14:07"` are parsed to seconds, thumbnail URLs are generated from video IDs for cards missing images, and view count text like `"4.2M"` is parsed to numeric integers.

***

### 🔗 Supported URL Formats

| Mode | URL Format | Example |
|---|---|---|
| **Search** | `/results?search_query=...` | `youtube.com/results?search_query=python` |
| **Channel** | `/@handle` | `youtube.com/@mkbhd` |
| **Channel** | `/channel/UC...` | `youtube.com/channel/UCBcRF18a7Qf58cCRy5xuWwQ` |
| **Channel** | `/c/name` | `youtube.com/c/ProgrammingWithMosh` |
| **Channel** | `/user/name` | `youtube.com/user/TechChannel` |
| **Playlist** | `/playlist?list=PL...` | `youtube.com/playlist?list=PLxxxxxx` |
| **Video** | `/watch?v=...` | `youtube.com/watch?v=dQw4w9WgXcQ` |
| **Video** | `youtu.be/...` | `youtu.be/dQw4w9WgXcQ` |
| **Query** | (text input) | `"python tutorial for beginners"` |

***

### 🌐 Proxy Configuration

#### Recommended Setup

```json
{
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

#### When to Use Proxy

- **Channel scraping with 50+ videos** — scroll-heavy runs benefit from residential IPs
- **High-frequency scheduled runs** — avoid YouTube temporarily rate-limiting your scraper
- **Geo-restricted content** — use a proxy in the target region to access region-specific results
- **Large batch runs** — any run with `max_results` above 50

#### When Proxy Is Optional

- **Small runs** — under 20 results from a single URL
- **One-off searches** — single keyword searches or single video extractions
- **Development and testing** — low-volume testing runs

The actor uses a real Chromium browser with anti-detection settings, which handles most YouTube access without proxy for small volumes.

***

### ⚡ Performance & Speed

#### Speed Benchmarks

| Mode | Max Results | Estimated Time |
|---|---|---|
| Single video | 1 | ~10–15 seconds |
| Search results | 20 | ~20–40 seconds |
| Search results | 50 | ~1–2 minutes |
| Channel videos | 20 | ~30–60 seconds |
| Channel videos | 100 | ~3–5 minutes |
| Playlist | 50 | ~1–2 minutes |

#### How Scroll Affects Speed

The actor scrolls the page to load more YouTube results. Each scroll adds approximately 10–20 new results and takes 1.5–2.5 seconds. For `max_results: 100`, expect 5–8 scroll cycles. Longer scroll runs are more affected by proxy quality and network speed.

#### Scheduling for Automated Monitoring

Use Apify's built-in scheduler to run this YouTube video scraper automatically — daily, weekly, or monthly. Combine with webhooks to push new video data to Google Sheets, Slack, email, or your analytics dashboard without manual intervention.

***

### ❓ FAQ

**Q: Do I need a YouTube API key?**
A: No. This YouTube video scraper uses a real browser to render and extract YouTube pages — no YouTube Data API, no Google account, no API key required. There are also no daily quota limits.

**Q: How is this different from the YouTube Data API?**
A: The YouTube Data API is free but limited to 10,000 units per day, requires a Google account and API key, and is subject to quota restrictions. This YouTube video scraper has no quota, no API key requirement, and returns data from the actual rendered page — including data points the API sometimes hides or delays.

**Q: Can I scrape all videos from a YouTube channel?**
A: Yes. Provide the channel URL with `max_results` set to however many videos you need. The actor scrolls the channel page automatically to load more video cards. For very large channels (1,000+ videos), run multiple times with increasing scroll counts.

**Q: Why do some search results show `"N/A"` for views?**
A: YouTube sometimes does not display view counts on search result cards for very new videos or live streams. In those cases, `views_text` will be empty or absent.

**Q: Does this work for YouTube Shorts?**
A: YouTube Shorts appear in channel grids and search results and are extracted like regular videos. The `duration` field will reflect their short length (under 60 seconds).

**Q: Can I get the full video description?**
A: Full descriptions (up to 1000 characters) are extracted in **Single Video mode** only. In Search and Channel modes, a snippet (up to 300 characters) is returned when visible on the card.

**Q: What is the 2-hour free trial?**
A: The free trial gives you complete access to all 4 scraping modes and all output fields for 2 hours with no credit card required. After the trial, subscribe for $6.99/month to continue with unlimited runs.

**Q: Can I export results to Excel or Google Sheets?**
A: Yes — download the dataset as CSV from the Apify Output tab (opens correctly in Excel and Google Sheets), or use Apify's Google Sheets integration to push results automatically after each run.

**Q: Does this scraper work for YouTube channels with millions of subscribers?**
A: Yes. Channel size does not affect extraction — the actor scrapes whatever is visible in the channel's video grid after scrolling. Set `max_results` to control how many videos to collect.

**Q: Can I track the same channel over time?**
A: Yes — schedule this YouTube video scraper to run weekly on a channel URL. Compare results across runs to track new uploads, view count growth, and engagement trends over time.

***

### 📜 Changelog

#### v2.0.0 (Current)

- ✅ Improved navigation strategy — `commit` mode first with `ERR_ABORTED` redirect handling
- ✅ Channel mode: extracts channel name and subscriber count from header using 7 selector fallbacks
- ✅ Channel mode: multi-source metadata spans for views and upload date
- ✅ View count parsing: `"4.2M views"` → `4200000` numeric integer
- ✅ Thumbnail fallback: generates `hqdefault.jpg` URL from video ID when no thumbnail on card
- ✅ Duration seconds: auto-parsed from duration string (`"6:14:07"` → `22447`)
- ✅ Anti-detection: navigator webdriver property hidden, real Chrome user agent
- ✅ Smart scroll: progressive scroll with new-item detection and early stop
- ✅ URL prefix cleaning: strips accidental `"URL: "`, `"Link: "` prefixes from input

#### v1.0.0

- ✅ Initial release with search and channel scraping
- ✅ Playwright browser rendering
- ✅ Basic title, views, duration, thumbnail extraction

***

### ⚖️ Legal & Terms of Use

This YouTube video scraper extracts publicly accessible video metadata from YouTube — the same information visible to any user browsing YouTube without an account.

**Please follow these guidelines:**

- Use extracted data for legitimate research, content analysis, SEO, and business intelligence purposes
- Respect YouTube's Terms of Service — do not use this tool to circumvent YouTube's access controls or scrape at volumes that impact YouTube's services
- Extracted metadata (titles, view counts, descriptions, thumbnails) is factual public information — its use for research and analysis is broadly accepted
- Do not use extracted video URLs or thumbnails for unauthorized commercial redistribution of YouTube's content
- YouTube video content (the actual video files) remains subject to YouTube's and creators' copyright

***

### 🤝 Support & Feedback

- **Bug or broken mode?** Contact via the Apify actor page — we fix issues fast
- **Feature request?** Suggest via the Apify Community forum or actor page
- **Loving it?** Please leave a ⭐ review — it helps other marketers and researchers find this YouTube video scraper!

***

> 🆓 **2-hour free trial** → 💳 **$6.99/month after** — the most affordable YouTube video scraper with real browser rendering and no API key.

***

<p align="center">
  <strong>Built with ❤️ on Apify · YouTube Video Scraper — Search, Channel, Playlist & Video</strong><br/>
  <em>Extract YouTube video data from any URL or search query — no API key, no quota, no limits</em>
</p>

# Actor input Schema

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

YouTube search keyword. E.g: 'python tutorial', 'cooking recipes 2024'

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

Paste any YouTube URL — search results, channel page, playlist, or single video

## `max_results` (type: `integer`):

Maximum number of videos to scrape (1–200)

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

Optional. YouTube works without proxy in most cases.

## Actor input object example

```json
{
  "query": "python tutorial",
  "max_results": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "query": "python tutorial",
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapepilot/youtube-video-scraper-search-channel-playlist-video").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 = {
    "query": "python tutorial",
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapepilot/youtube-video-scraper-search-channel-playlist-video").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "query": "python tutorial",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call scrapepilot/youtube-video-scraper-search-channel-playlist-video --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapepilot/youtube-video-scraper-search-channel-playlist-video",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "YouTube Video Scraper  | Search, Channel, Playlist & Video",
        "description": "Scrape YouTube search results, channel videos, playlists, and single videos with dynamic-rendering support. Extract title, URL, video ID, channel info, views, duration, published date, thumbnail, and description in clean JSON for automation, research, and content tracking.",
        "version": "0.0",
        "x-build-id": "U1CQnB7HNF3LgTUGy"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapepilot~youtube-video-scraper-search-channel-playlist-video/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapepilot-youtube-video-scraper-search-channel-playlist-video",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/scrapepilot~youtube-video-scraper-search-channel-playlist-video/runs": {
            "post": {
                "operationId": "runs-sync-scrapepilot-youtube-video-scraper-search-channel-playlist-video",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/scrapepilot~youtube-video-scraper-search-channel-playlist-video/run-sync": {
            "post": {
                "operationId": "run-sync-scrapepilot-youtube-video-scraper-search-channel-playlist-video",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "query": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "YouTube search keyword. E.g: 'python tutorial', 'cooking recipes 2024'"
                    },
                    "url": {
                        "title": "YouTube URL (optional)",
                        "type": "string",
                        "description": "Paste any YouTube URL — search results, channel page, playlist, or single video"
                    },
                    "max_results": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Maximum number of videos to scrape (1–200)",
                        "default": 20
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration (Optional)",
                        "type": "object",
                        "description": "Optional. YouTube works without proxy in most cases."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
