# Youtube Scraper (`happitap/youtube-scraper`) Actor

Extract YouTube data without coding. Scrape video details, channel info, playlists, search results, and subtitles. Download channel name, subscribers, views, likes, and more in minutes using this fast, reliable YouTube scraper.

- **URL**: https://apify.com/happitap/youtube-scraper.md
- **Developed by:** [HappiTap](https://apify.com/happitap) (community)
- **Categories:** Videos, Social media, Developer tools
- **Stats:** 53 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 results

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

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

## What's an Apify Actor?

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

## How to integrate an Actor?

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

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

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

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

# README

## 📹 YouTube Scraper - Simple & Affordable

> **Extract YouTube data without coding!** Get video details, channel info, playlists, search results, and subtitles in minutes.

### 🎯 What Can You Do With This?

This tool helps you extract public information from YouTube videos and channels. Perfect for:

- **Content Creators**: Research trending topics and competitor videos
- **Marketers**: Find influencers and analyze video performance
- **Researchers**: Collect data for academic studies
- **Business Owners**: Monitor brand mentions and reviews
- **Students**: Gather information for projects

### ✨ What Data Can You Get?

#### 📺 From Videos:

- Video title and description
- View count, likes, and comments count
- Upload date and duration
- Channel name and subscriber count
- Video tags and categories
- Thumbnail images
- **Subtitles/Transcripts** (if available)

#### 👤 From Channels:

- Channel name and description
- Subscriber count
- Total views
- All videos from the channel
- Channel banner and profile picture

#### 📋 From Playlists:

- Playlist title and description
- All videos in the playlist
- Video count and total duration

#### 🔍 From Search:

- Search results for any keyword
- Filter by upload date
- Sort by relevance, views, or date
- Separate regular videos, shorts, and streams

### 🚀 How to Use (Super Easy!)

#### Step 1: Choose What to Scrape

You have **3 simple options**:

**Option A: Scrape by URL** 🔗

- Paste any YouTube link (video, channel, playlist)
- Example: `https://www.youtube.com/watch?v=dQw4w9WgXcQ`

**Option B: Search by Keyword** 🔑

- Type what you want to find
- Example: "how to cook pasta"

**Option C: Upload a List** 📄

- Upload a CSV file with multiple URLs
- Great for bulk scraping!

#### Step 2: Set Your Limits

Tell us how much data you want:

- **Max videos**: How many videos to extract (default: 50)
- **Max shorts**: How many YouTube Shorts (default: 0)
- **Max streams**: How many live streams (default: 0)

💡 **Tip**: Start small (10-20 videos) to test, then increase!

#### Step 3: Optional Filters

**Filter by Date:**

- Last hour, day, week, month, or year
- Or set a custom date range

**Sort Results:**

- Relevance (recommended)
- Upload date (newest first)
- View count (most popular)
- Rating (highest rated)

**Get Subtitles:**

- Toggle "Download subtitles" to YES
- Get transcripts in multiple languages
- Available formats: SRT, plain text

#### Step 4: Click Start!

That's it! Your data will be ready in minutes.

### 📊 Example Output

Here's what you'll get (in JSON, CSV, or Excel):

```json
{
  "title": "How to Make Perfect Pasta",
  "url": "https://www.youtube.com/watch?v=abc123",
  "views": 1250000,
  "likes": 45000,
  "comments": 3200,
  "duration": "8:45",
  "uploadDate": "2024-01-15",
  "channelName": "Cooking Master",
  "channelSubscribers": 500000,
  "description": "Learn to make perfect pasta...",
  "tags": ["cooking", "pasta", "recipe"],
  "subtitles": "Welcome to my cooking channel..."
}
```

### 💰 Cost-Effective Pricing

We've optimized this scraper to be **affordable**:

| What You Get | Estimated Cost |
|-------------|----------------|
| 100 videos | ~$0.10 |
| 500 videos | ~$0.50 |
| 1,000 videos | ~$1.00 |
| 5,000 videos | ~$5.00 |

**Free tier**: Get $5 free credits when you sign up!

#### 💡 Cost-Saving Tips:

1. **Start small**: Test with 10-20 videos first
2. **Skip subtitles**: Only enable if you need them (saves 30% cost)
3. **Use filters**: Narrow your search to get exactly what you need
4. **Set limits**: Don't scrape more than you need
5. **Avoid duplicates**: Use unique URLs only

### 🎓 Common Use Cases

#### For Content Creators:

```
Search: "your niche + tutorial"
Max videos: 50
Sort by: View count
Get: Trending topics and successful video formats
```

#### For Marketers:

```
Input: Competitor channel URL
Max videos: 100
Enable: Subtitles
Get: Content strategy insights
```

#### For Researchers:

```
Search: "your research topic"
Date filter: Last year
Max videos: 200
Get: Recent discussions and trends
```

#### For Business Monitoring:

```
Search: "your brand name"
Sort by: Upload date
Max videos: 50
Get: Brand mentions and reviews
```

### 📥 Download Your Data

Export in multiple formats:

- **JSON**: For developers and APIs
- **CSV**: For Excel and Google Sheets
- **Excel**: Ready-to-analyze spreadsheets
- **HTML**: View in browser

### 🔧 Advanced Features

#### Scrape YouTube Shorts

Set "Max shorts" to get short-form videos separately.

#### Scrape Live Streams

Set "Max streams" to get live and upcoming streams.

#### Get Subtitles in Multiple Languages

- Auto-generated subtitles
- Manual subtitles (if available)
- Multiple language support

#### Date Range Filtering

Perfect for tracking content over time:

- Last 24 hours
- Last week
- Last month
- Custom date range

### ❓ Frequently Asked Questions

#### Is this legal?

Yes! We only extract **public data** that anyone can see on YouTube. No login required.

#### Do I need coding skills?

**No!** This is a no-code tool. Just fill in the form and click start.

#### How long does it take?

- 10 videos: ~30 seconds
- 100 videos: ~2-3 minutes
- 1,000 videos: ~15-20 minutes

#### Can I scrape private videos?

No, only public videos are accessible.

#### Can I get video dislikes?

No, YouTube removed public dislike counts in 2021.

#### What about copyright?

You can extract data, but respect copyright when using video content.

#### Can I automate this?

Yes! Use our API or schedule runs. Perfect for daily monitoring.

### 🛠️ Technical Details

**Built with:**

- Node.js for speed
- Efficient data extraction
- Smart rate limiting
- Proxy support included

**Optimizations:**

- Minimal memory usage
- Fast parallel processing
- Automatic retry on errors
- Smart caching

### 🆘 Need Help?

**Common Issues:**

**"No results found"**

- Check your URL is correct
- Try a different search term
- Increase max videos limit

**"Scraper timed out"**

- Reduce the number of videos
- Try again in a few minutes

**"Subtitles not available"**

- Not all videos have subtitles
- Try different videos

### 📞 Support

- **Questions?** Check our FAQ above
- **Bug found?** Report on the Issues tab
- **Feature request?** Let us know!

### 🎉 Get Started Now!

1. Click the **"Try for free"** button
2. Add your YouTube URLs or search terms
3. Click **"Start"**
4. Download your data!

**No credit card required for the free tier!**

***

### 📋 Quick Start Checklist

- \[ ] Sign up for free Apify account
- \[ ] Open YouTube Scraper
- \[ ] Add YouTube URL or search term
- \[ ] Set max videos (start with 10-20)
- \[ ] Click "Start"
- \[ ] Download results in your preferred format

**That's it! You're ready to extract YouTube data like a pro!** 🚀

***

*Made with ❤️ for content creators, marketers, and researchers*

# Actor input Schema

## `startUrls` (type: `array`):

📺 **Paste YouTube links here!**

You can add:

- Video URLs: `https://www.youtube.com/watch?v=VIDEO_ID`
- Channel URLs: `https://www.youtube.com/@ChannelName`
- Playlist URLs: `https://www.youtube.com/playlist?list=PLAYLIST_ID`
- Search URLs: `https://www.youtube.com/results?search_query=keyword`

💡 **Tip**: Leave empty if you want to search by keywords instead!

## `searchKeywords` (type: `array`):

🔍 **Search YouTube by keywords!**

Examples:

- "how to cook pasta"
- "python tutorial for beginners"
- "best smartphones 2024"

💡 **Tip**: Use quotes for exact phrases. Leave empty if you're using URLs above.

## `maxVideos` (type: `integer`):

📊 **How many regular videos to extract?**

Recommended:

- Testing: 10-20 videos
- Small project: 50-100 videos
- Large project: 500+ videos

💰 **Cost**: ~$0.005 per video

## `maxShorts` (type: `integer`):

📱 **How many YouTube Shorts to extract?**

Set to 0 to skip shorts entirely.

💡 **Tip**: Shorts are separate from regular videos

## `maxStreams` (type: `integer`):

🔴 **How many live streams to extract?**

Includes:

- Currently live streams
- Upcoming scheduled streams
- Past stream recordings

Set to 0 to skip streams.

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

📈 **How to sort search results?**

- **Relevance**: Best match for your search
- **Upload Date**: Newest videos first
- **View Count**: Most popular videos
- **Rating**: Highest rated videos

## `dateFilter` (type: `string`):

📅 **Only get videos uploaded within:**

- **Any time**: No date filter (default)
- **Last hour**: Very recent uploads
- **Today**: Uploaded today
- **This week**: Last 7 days
- **This month**: Last 30 days
- **This year**: Last 365 days

## `downloadSubtitles` (type: `boolean`):

📝 **Extract video subtitles?**

✅ **Enable this to get:**

- Auto-generated subtitles
- Manual subtitles (if available)
- Multiple languages
- Full video transcripts

⚠️ **Note**: Adds ~30% to processing time and cost. Only enable if you need transcripts!

## `subtitleLanguage` (type: `string`):

🌍 **Preferred subtitle language**

Examples:

- `en` for English
- `es` for Spanish
- `fr` for French
- `de` for German
- `auto` for automatic detection

💡 **Tip**: If your language isn't available, we'll try to get English subtitles.

## `includeChannelInfo` (type: `boolean`):

👤 **Get channel information?**

Includes:

- Channel name and description
- Subscriber count
- Total channel views
- Channel creation date

💡 **Tip**: Useful for influencer research!

## `includeTags` (type: `boolean`):

🏷️ **Extract video tags/keywords?**

Useful for:

- SEO research
- Content strategy
- Trend analysis

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

🌐 **Proxy configuration** (Advanced)

Use proxies to avoid rate limiting. Datacenter proxies are recommended for YouTube.

💡 **Tip**: Leave default settings for best results!

## `maxConcurrency` (type: `integer`):

⚡ **How many videos to process at once?**

- **Lower (1-3)**: Slower but more reliable, cheaper
- **Higher (5-10)**: Faster but may hit rate limits

💡 **Recommended**: 3 for best balance

## `maxRetries` (type: `integer`):

🔄 **How many times to retry failed requests?**

Recommended: 3 retries

💡 **Tip**: Higher retries = more reliable but slower

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    }
  ],
  "maxVideos": 50,
  "maxShorts": 0,
  "maxStreams": 0,
  "sortBy": "relevance",
  "dateFilter": "any",
  "downloadSubtitles": false,
  "subtitleLanguage": "en",
  "includeChannelInfo": true,
  "includeTags": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxConcurrency": 3,
  "maxRetries": 3
}
```

# Actor output Schema

## `videos` (type: `string`):

All scraped videos with complete metadata

# 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 = {
    "startUrls": [
        {
            "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("happitap/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 = {
    "startUrls": [{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("happitap/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 '{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call happitap/youtube-scraper --silent --output-dataset

```

## MCP server setup

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