# YouTube Scraper — Videos, Channels, Comments, Likes & Dislikes (`arpitgandhi1934/youtube-scraper`) Actor

Scrape YouTube without the API limits. Search videos by keyword or scrape a whole channel by name — with views, likes, dislikes, comments, subtitles, and full metadata. No login, no API key. Export to JSON, CSV, or Excel.

- **URL**: https://apify.com/arpitgandhi1934/youtube-scraper.md
- **Developed by:** [Arpit Gandhi](https://apify.com/arpitgandhi1934) (community)
- **Categories:** Videos, Social media, Developer tools
- **Stats:** 2 total users, 0 monthly users, 98.8% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 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/platform/actors/running/actors-in-store#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 — Videos, Channels, Comments & More

**Pull YouTube data in bulk — without the API limits, without logging in.** Search for videos, scrape an entire channel by name, extract comments, get likes and dislikes, subtitles, and full metadata. Clean, structured data ready for Excel, JSON, or your app. 🎬

> 🚫 No login · 🔑 No API key · 🤖 No setup · ⚡ Fast · 🌍 Any video, channel, or topic

***

### 🧭 What can it do?

There are **4 simple ways** to use it. Pick whichever fits — you can even mix them in one run.

| You want… | Use this input | Example |
|---|---|---|
| 🔎 Videos about a **topic** | **Search terms** | `"lofi hip hop"` |
| 📺 **A creator's whole channel** | **Channels** | `"Fireship"` |
| 🎧 **A playlist's** videos | **Start URLs** | a playlist link |
| 📹 **Specific videos** | **Start URLs** | one or more video links |

Every result comes back with the same rich data: title, views, likes, dislikes, duration, upload date, channel, subscribers, description — plus optional **comments** and **subtitle info**.

***

### 🚀 Quick start (30 seconds)

1. Pick an input — type a **search term**, a **channel name**, or paste a **YouTube link**.
2. Set **Max items** — how many videos you want.
3. (Optional) Turn on **comments**, **dislikes**, or **subtitles**.
4. Click **Start**. Download as JSON, CSV, or Excel.

That's it. No account, no keys, nothing to configure.

***

### 📖 The 4 ways to use it — with examples

#### 1️⃣ Search for videos 🔎

Type keywords, just like the YouTube search bar. Get the top matching videos.

```json
{ "searchTerms": ["apify tutorial"], "maxItems": 50 }
```

#### 2️⃣ Scrape a whole channel 📺 *(great for creators!)*

Just type the **channel name** — no URL needed. Get **every video** with full stats. Perfect for tracking your own channel or a competitor's.

```json
{ "channels": ["Fireship"], "maxItems": 100 }
```

You can also use an `@handle` or a channel URL:

```json
{ "channels": ["@RickAstleyYT", "MrBeast"], "maxItems": 200 }
```

#### 3️⃣ Scrape a playlist 🎧

Paste a playlist link to get all its videos.

```json
{ "startUrls": ["https://www.youtube.com/playlist?list=PLxxxxxx"], "maxItems": 100 }
```

#### 4️⃣ Scrape specific videos 📹

Paste one or more video links.

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

#### ➕ Add comments and dislikes to any of the above 💬👎

```json
{
  "channels": ["Fireship"],
  "maxItems": 50,
  "maxComments": 20,
  "includeDislikes": true
}
```

***

### ⚙️ All input options

| Field | What it does | Default |
|---|---|---|
| 🔎 **Search terms** | Keywords to search on YouTube | — |
| 📺 **Channels** | Channel **name**, `@handle`, or URL → all their videos | — |
| 🔗 **Start URLs** | Video, channel, playlist, or search links | — |
| 🔢 **Max items** | How many videos per search / channel / playlist | `10` |
| 💬 **Max comments per video** | Number of top comments to pull (`0` = none) | `0` |
| 👎 **Include dislikes** | Add an estimated dislike count | `off` |
| 📝 **Include subtitles** | List/attempt subtitle download | `off` |
| 🧾 **Full video details** | Category, keywords, exact duration | `off` |

*(You need at least one of: Search terms, Channels, or Start URLs.)*

***

### 📤 What you get (output)

**One clean row per video.** Here's a real example:

```json
{
  "id": "dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video)",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "thumbnailUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
  "viewCount": 1792628321,
  "likes": 19243762,
  "dislikes": 514894,
  "duration": "3:33",
  "date": "Oct 24, 2009",
  "channelName": "Rick Astley",
  "channelUrl": "https://www.youtube.com/@RickAstleyYT",
  "numberOfSubscribers": 4520000,
  "text": "The official video for “Never Gonna Give You Up”...",
  "commentsCount": 3,
  "comments": [
    {
      "author": "@YouTube",
      "text": "can confirm: he never gave us up",
      "likes": 268000,
      "replyCount": 412,
      "publishedTime": "2 years ago"
    }
  ],
  "fromYTUrl": "https://www.youtube.com/@RickAstleyYT",
  "scrapedAt": "2026-07-14T12:00:00.000Z"
}
```

#### 📋 Every field explained

| Field | Description |
|---|---|
| 🆔 `id`, 🔗 `url` | Video ID and link |
| 🏷️ `title` | Video title |
| 🖼️ `thumbnailUrl` | Highest-res thumbnail |
| 👀 `viewCount` | Number of views |
| 👍 `likes` | Exact like count |
| 👎 `dislikes` | Estimated dislikes *(only if enabled)* |
| ⏱️ `duration` | Video length (e.g. `3:33`) |
| 📅 `date` | Upload date |
| 📺 `channelName`, `channelUrl`, `channelId` | Channel info |
| 📈 `numberOfSubscribers` | Channel subscriber count |
| 📝 `text` | Full video description |
| 🏷️ `category`, `keywords` | Category and tags *(with Full details)* |
| 💬 `commentsCount`, `comments` | Comments: author, text, likes, replies, time |
| 🗣️ `availableSubtitles`, `subtitles` | Subtitle languages (+ SRT if available) |
| 🔗 `fromYTUrl` | Where this result came from |
| 📅 `scrapedAt` | When it was scraped |

***

### 💡 Who is this for?

- 🎥 **Creators** — track your channel's performance, or study competitors' videos, views, and engagement
- 📣 **Marketers & brands** — find influencers, monitor mentions, analyze what's trending
- 🔬 **Researchers** — study topics, opinions, and comment sentiment at scale
- 🤖 **AI & data teams** — feed video metadata and comments into your pipelines
- 🏢 **Agencies** — build reports and dashboards from live YouTube data

***

### ❓ FAQ

**Do I need a YouTube account or API key?**
No. It uses YouTube's public data. Nothing to log in to, nothing to set up.

**Can I really scrape a channel just by its name?**
Yes! Type `"Fireship"` (or an `@handle`, or a channel URL) in the **Channels** field and it pulls all their videos with full stats. This is the easiest way to do channel analytics.

**Can it get dislikes?**
Yes, as an **estimate**. YouTube removed public dislikes in 2021, so we use the community *Return YouTube Dislike* database — accurate for older videos, a solid estimate for newer ones. Turn on **Include dislikes** to add it.

**Can I get comments?**
Yes. Set **Max comments per video** to how many you want (e.g. `20`). Each comment includes the author, text, likes, reply count, and time.

**What about subtitles?**
The scraper lists every video's available subtitle **languages**. Downloading the subtitle **text** depends on YouTube availability (they recently locked this behind bot-checks), so it's best-effort.

**How many videos can I scrape?**
Thousands per input. Very large runs may fluctuate depending on YouTube.

**Which proxy should I use?**
The default (Apify Proxy) works great. Residential is available if you ever need it.

***

### 🔒 Notes

- Scrapes **publicly available** data only.
- Please respect copyright and privacy laws (e.g. GDPR) when handling personal data like comments.
- Not affiliated with YouTube.

*Channel, playlist, video, search, and comments are all supported today. Subtitle text download is best-effort. Questions or a bug? Open an issue on the actor's Issues tab.*

# Actor input Schema

## `searchTerms` (type: `array`):

Keywords to search on YouTube, as you'd type in the search bar. One or more.

## `channels` (type: `array`):

Channel names, @handles, or channel URLs — pulls all their videos with full data. Great for creator analytics. One or more.

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

YouTube video, channel, playlist, or search URLs. One or more.

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

Max videos per search term.

## `enrich` (type: `boolean`):

Fetch each video's full metadata (likes, description, keywords, category). Off = fast search-feed fields only.

## `includeSubtitles` (type: `boolean`):

Download available subtitles/transcripts (auto + manual) as SRT.

## `includeDislikes` (type: `boolean`):

Add an estimated dislike count via Return YouTube Dislike (3rd-party estimate — YouTube removed public dislikes in 2021).

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

Proxy — RESIDENTIAL required (datacenter IPs hit YouTube bot challenges).

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

How many top comments to pull per video (0 = none).

## Actor input object example

```json
{
  "searchTerms": [
    "lofi hip hop"
  ],
  "channels": [
    "@RickAstleyYT"
  ],
  "maxItems": 10,
  "enrich": true,
  "includeSubtitles": false,
  "includeDislikes": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxComments": 0
}
```

# 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 = {
    "searchTerms": [
        "lofi hip hop"
    ],
    "channels": [
        "@RickAstleyYT"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("arpitgandhi1934/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 = {
    "searchTerms": ["lofi hip hop"],
    "channels": ["@RickAstleyYT"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("arpitgandhi1934/youtube-scraper").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 '{
  "searchTerms": [
    "lofi hip hop"
  ],
  "channels": [
    "@RickAstleyYT"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call arpitgandhi1934/youtube-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/feZD4ZsfLqVo4o5Hg/builds/Y1OyirHEI4HSb2gUK/openapi.json
