# YouTube Video Scraper (`clappi/youtube-video-scraper`) Actor

Extract YouTube video and shorts data. Get title, description, views, likes, comments count, duration, publish date, thumbnails, channel name, subscriber count, and more. No limits or quotas. Download the data in JSON, CSV, and Excel.

- **URL**: https://apify.com/clappi/youtube-video-scraper.md
- **Developed by:** [Clappi](https://apify.com/clappi) (community)
- **Categories:** Videos, Automation, Social media
- **Stats:** 20 total users, 7 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.30 / 1,000 videos

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Video Scraper

Extract YouTube video data from any video or Short. Get title, description, views, likes, comments count, duration, publish date, thumbnails, channel name, subscriber count, and more. No limits or quotas. Download the data in JSON, CSV, and Excel.

### Why This Scraper?

- **Lightning Fast** - Optimized API calls, no browser overhead
- **No API Key Required** - Works without YouTube API credentials
- **Complete Data** - Full video metrics including top comment
- **Reliable** - Built-in fallbacks for data extraction
- **Simple** - Just paste URLs and run

### Input

| Field | Type | Description |
|-------|------|-------------|
| `videoUrls` | array | YouTube video/Shorts URLs |

#### Example Input

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/shorts/DC_8bBzC1rI"
  ]
}
```

### Output

Each video includes:

```json
{
  "url": "https://www.youtube.com/shorts/DC_8bBzC1rI",
  "videoId": "DC_8bBzC1rI",
  "status": "available",
  "title": "Video title here",
  "description": "Video description...",
  "views": 150671,
  "likes": 2943,
  "comments": 83,
  "channelName": "Channel Name",
  "channelId": "UCxxxxxxxxxxxxxxxx",
  "channelUrl": "https://www.youtube.com/@username",
  "username": "username",
  "thumbnailUrl": "https://i.ytimg.com/...",
  "channelThumbnailUrl": "https://yt3.ggpht.com/...",
  "subscriberCount": "2.87M subscribers",
  "datePosted": "2025-12-11T11:52:49-08:00",
  "durationSeconds": 20,
  "isLive": false,
  "topComment": {
    "text": "Great video!",
    "username": "commenter123",
    "authorName": "Commenter Name",
    "authorUrl": "https://www.youtube.com/@commenter123",
    "likes": 32,
    "dateCreated": "2025-12-11T21:13:16-08:00"
  },
  "scrapedAt": "2024-01-20T12:00:00.000Z"
}
```

### Supported URLs

- `https://www.youtube.com/watch?v=VIDEO_ID` - Regular videos
- `https://youtu.be/VIDEO_ID` - Short links
- `https://www.youtube.com/shorts/VIDEO_ID` - Shorts
- `https://www.youtube.com/embed/VIDEO_ID` - Embed links

### Use Cases

- **Content Analysis** - Track video performance metrics
- **Competitor Research** - Monitor competitor content engagement
- **Influencer Vetting** - Verify engagement rates and content quality
- **Trend Monitoring** - Track viral content and trends
- **Portfolio Building** - Collect content data for reporting

### Cost Estimation

This scraper is optimized for efficiency. Scraping 100 videos typically costs less than $0.10 in platform usage.

# Actor input Schema

## `videoUrls` (type: `array`):

List of YouTube video URLs to scrape. Supports regular videos, Shorts, and youtu.be links.

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

Proxy settings for the Actor. Use Apify Proxy or custom proxies to avoid blocking.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/shorts/DC_8bBzC1rI"
  ],
  "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 = {
    "videoUrls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "https://www.youtube.com/shorts/DC_8bBzC1rI"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("clappi/youtube-video-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 = { "videoUrls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "https://www.youtube.com/shorts/DC_8bBzC1rI",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("clappi/youtube-video-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 '{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/shorts/DC_8bBzC1rI"
  ]
}' |
apify call clappi/youtube-video-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/x7Em4N8Jfoo0I96iM/builds/zBg33c3Ugu5BuNU9L/openapi.json
