# Youtube Video Data Scraper\[Best and Affordable] (`alpha-scraper/my-actor-1`)

🎬 Scrape YouTube videos fast! 🚀 Input: YouTube video link/playlist link 🎯 and get title, description, views, likes, upload date & channel info 📊 Perfect for research, analytics, or content creation ✨ All-in-one tool for unlimited data 🤑🔑{use RESIDENTIAL Proxy for fast Scraping}

- **URL**: https://beta-securitybyobscurity.apify.com/alpha-scraper/my-actor-1.md
- **Developed by:** [Alpha Scraper](https://beta-securitybyobscurity.apify.com/alpha-scraper) (community)
- **Categories:** Videos, Social media, Other
- **Stats:** 3 total users, 3 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$10.00/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

# README

## YouTube Video + Channel Enriched Scraper 🎬

**Extract detailed YouTube video metadata plus channel “About” text & social links — with human-readable counters.**
Built for Apify Actors using the Python SDK. Reads input with `Actor.get_input()` and writes dataset items with `Actor.push_data()`. (\[Apify Documentation]\[1])

***

### Features ✅

- Works with single videos or playlists (process all or a range of items).
- Enriches video data with **channel About** text and first **TikTok / Instagram / X** links found on the channel profile. (\[Google Help]\[2])
- Human-friendly counters (e.g., `1.4M`) alongside raw numbers.

***

### Input 🔧

Provide JSON to the actor:

| Field                | Type                           | Required | Default | Description                                                                                                               | Example                                                                                     |
| -------------------- | ------------------------------ | -------: | ------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| `startUrls`          | array<{url:string}> | string |        ✅ | —       | One or more YouTube video or playlist URLs.                                                                               | `[{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}]`                                   |
| `processAll`         | boolean                        |        ❌ | `false` | If `true`, process **all** items in a playlist. If `false`, limit via `playlistItems`.                                    | `true`                                                                                      |
| `playlistItems`      | string                         |        ❌ | `"1"`   | Playlist slice in yt-dlp format (e.g., `"1-10"`, `"1,3,5"`). Ignored when `processAll: true`.                             | `"1-25"`                                                                                    |
| `proxyConfiguration` | object                         |        ❌ | —       | Apify Proxy settings (datacenter/residential, country). Created with `Actor.create_proxy_configuration()` under the hood. | `{ "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "US" }` |
| `requestTimeoutSec`  | integer                        |        ❌ | `25`    | Timeout for fetching channel About/social links.                                                                          | `30`                                                                                        |

**Example input**

```json
{
  "startUrls": [
    { "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" },
    { "url": "https://www.youtube.com/playlist?list=PLxxxxxxxx" }
  ],
  "processAll": false,
  "playlistItems": "1-5",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "US"
  },
  "requestTimeoutSec": 25
}
```

***

### Output 📤

Each processed video yields a JSON object like below.

#### Example output

```json
{
  "title": "Never Gonna Give You Up",
  "video_id": "dQw4w9WgXcQ",
  "uploader": "Rick Astley",
  "upload_date": "20091024",
  "publish_date": "2009-10-24",
  "duration": 213,
  "duration_str": "3:33",

  "view_count": 1500000000,
  "view_count_str": "1.5B",
  "like_count": 12000000,
  "like_count_str": "12M",
  "dislike_count": null,

  "comment_count": 450000,
  "comment_count_str": "450K",

  "categories": ["Music"],
  "tags": ["Rick Astley", "80s"],
  "description": "The official video for “Never Gonna Give You Up”...",
  "thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",

  "channel_name": "Rick Astley",
  "channel_url": "https://www.youtube.com/@RickAstley",
  "channel_id": "UCuAXFkgsw1L7xaCfnd5JJOw",
  "channel_subscriber_count": 4100000,
  "channel_subscriber_count_str": "4.1M",

  "about": "Welcome to the official Rick Astley channel...",
  "tiktok": "https://www.tiktok.com/@example",
  "instagram": "https://www.instagram.com/example",
  "x": "https://x.com/example",

  "subtitles": null
}
```

#### Field reference

**Video metadata**

| Field          | Type            | Description                                           |
| -------------- | --------------- | ----------------------------------------------------- |
| `title`        | string          | Video title                                           |
| `video_id`     | string          | YouTube video ID                                      |
| `uploader`     | string | null  | Uploader name                                         |
| `upload_date`  | string | null  | Original upload date (`YYYYMMDD`)                     |
| `publish_date` | string | null  | ISO date derived from upload/timestamp (`YYYY-MM-DD`) |
| `duration`     | integer | null | Duration in seconds                                   |
| `duration_str` | string | null  | Human-readable duration (`H:MM:SS` or `M:SS`)         |
| `description`  | string | null  | Video description                                     |
| `categories`   | array | null   | Video categories                                      |
| `tags`         | array | null   | Video tags                                            |
| `thumbnail`    | string | null  | Thumbnail URL                                         |
| `url`          | string          | Video URL                                             |
| `subtitles`    | object | null  | Subtitles map from yt-dlp                             |

**Engagement (raw + humanized)**

| Field               | Type            | Description                  |
| ------------------- | --------------- | ---------------------------- |
| `view_count`        | integer | null | View count (raw)             |
| `view_count_str`    | string | null  | View count (e.g., `1.4M`)    |
| `like_count`        | integer | null | Like count (raw)             |
| `like_count_str`    | string | null  | Like count (e.g., `320K`)    |
| `comment_count`     | integer | null | Comment count (raw)          |
| `comment_count_str` | string | null  | Comment count (e.g., `5.6K`) |
| `dislike_count`     | integer | null | May be unavailable           |

**Channel enrichment**

| Field                          | Type            | Description                                       |
| ------------------------------ | --------------- | ------------------------------------------------- |
| `channel_name`                 | string | null  | Channel display name                              |
| `channel_url`                  | string | null  | Channel URL                                       |
| `channel_id`                   | string | null  | Channel ID                                        |
| `channel_subscriber_count`     | integer | null | Subscribers (raw, if exposed)                     |
| `channel_subscriber_count_str` | string | null  | Subscribers (e.g., `2.3M`)                        |
| `about`                        | string | null  | Channel “About” text                              |
| `tiktok`                       | string | null  | First TikTok link found on the channel profile    |
| `instagram`                    | string | null  | First Instagram link found on the channel profile |
| `x`                            | string | null  | First X/Twitter link found on the channel profile |

> Social/profile links are taken from **channel profile links** that creators can configure on YouTube. If none are set, these fields will be `null`. (\[Google Help]\[2])

***

# Actor input Schema

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

List of one or more YouTube video or playlist URLs

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

Use Apify Proxy or your own HTTP proxies

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=zxYjTTXc-J8"
    },
    {
      "url": "https://www.youtube.com/watch?v=TJPFYs_88-g"
    }
  ],
  "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 = {
    "startUrls": [
        {
            "url": "https://www.youtube.com/watch?v=zxYjTTXc-J8"
        },
        {
            "url": "https://www.youtube.com/watch?v=TJPFYs_88-g"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("alpha-scraper/my-actor-1").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=zxYjTTXc-J8" },
        { "url": "https://www.youtube.com/watch?v=TJPFYs_88-g" },
    ],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("alpha-scraper/my-actor-1").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 '{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=zxYjTTXc-J8"
    },
    {
      "url": "https://www.youtube.com/watch?v=TJPFYs_88-g"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call alpha-scraper/my-actor-1 --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Youtube Video Data Scraper[Best and Affordable]",
        "description": "🎬 Scrape YouTube videos fast! 🚀 Input: YouTube video link/playlist link 🎯 and get title, description, views, likes, upload date & channel info 📊 Perfect for research, analytics, or content creation ✨ All-in-one tool for unlimited data 🤑🔑{use RESIDENTIAL Proxy for fast Scraping}",
        "version": "0.0",
        "x-build-id": "aeedzGekEd8HXL7d9"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/alpha-scraper~my-actor-1/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-alpha-scraper-my-actor-1",
                "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/alpha-scraper~my-actor-1/runs": {
            "post": {
                "operationId": "runs-sync-alpha-scraper-my-actor-1",
                "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/alpha-scraper~my-actor-1/run-sync": {
            "post": {
                "operationId": "run-sync-alpha-scraper-my-actor-1",
                "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",
                "required": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "List of one or more YouTube video or playlist URLs",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Use Apify Proxy or your own HTTP proxies",
                        "default": {}
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
