# Youtube Video/Shorts Details Scraper Pro -  Fast (`beyondops/youtube-metadata-scraper-pro-v2`) Actor

Extract Views, Likes, and Dates. Handles Shorts & Videos. Bypasses Sign-in walls with Cookie support.

- **URL**: https://apify.com/beyondops/youtube-metadata-scraper-pro-v2.md
- **Developed by:** [BeyondOps](https://apify.com/beyondops) (community)
- **Categories:** Social media, AI, Integrations
- **Stats:** 197 total users, 54 monthly users, 100.0% runs succeeded, 2 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/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 Metadata Architect (Pro Scraper)

**Extract Views, Likes, Upload Dates, and Channel Info from thousands of YouTube Videos & Shorts in seconds.**

Unlike other scrapers that attempt to download the entire video file (wasting bandwidth and money), this Actor is engineered strictly for **Metadata Extraction**. It talks directly to YouTube's internal APIs using a smart rotation of Android, iOS, and Web clients to ensure maximum success rates.

***

### ✨ Key Features

- **⚡ Blazing Fast:** Uses Async Parallel Processing to scrape 5-10 videos simultaneously.
- **📱 Shorts & Video Support:** Automatically detects and handles both formats seamlessly.
- **🛡️ Smart Anti-Ban System:** Rotates between Android, iOS, and Web clients to bypass blocks.
- **🍪 Login Support:** Input your `cookies.txt` to access Age-Restricted content or bypass "Sign in" walls.
- **🗑️ Dead Video Detection:** Instantly identifies "Private", "Deleted", or "Unavailable" videos and marks them as `deleted/private` in your report (instead of crashing).
- **📉 Clean Export:** Formatted specifically for Excel/CSV. Dates are standardized to `YYYY-MM-DD`.

***

### 🛠️ Input Configuration

#### 1. Video URLs (Required)

Simply paste a list of YouTube links. You can mix standard video links and Shorts links.

- `https://www.youtube.com/watch?v=...`
- `https://www.youtube.com/shorts/...`

#### 2. Netscape Cookies (Optional but Recommended)

If you encounter **"Sign in to confirm you’re not a bot"** errors or need to scrape **Age-Restricted (18+)** content, you must provide cookies.

**How to get cookies:**

1. Install a browser extension like **"Get cookies.txt LOCALLY"** (Chrome/Firefox).
2. Log in to YouTube in your browser.
3. Open the extension and click "Export".
4. Paste the text content into the **Netscape Cookies** field in this Actor.

***

### 📊 Output Data

The Actor pushes data to the default dataset. You can export this as **CSV**, **JSON**, or **Excel**.

#### Column Dictionary

| Column | Description |
| :--- | :--- |
| `channel` | Name of the YouTube channel/uploader. |
| `channel_url` | Direct link to the channel page. |
| `upload_date` | Date the video was published (Format: `YYYY-MM-DD`). |
| `url` | The original link you provided. |
| `title` | Video title. |
| `duration` | Length of the video in seconds. |
| `views` | Total view count. |
| `likes` | Total like count. |
| `comment_count` | Total number of comments. |
| `description` | First 200 characters of the video description. |
| `status` | `success`, `failed`, or `deleted/private`. |

***

### ❓ Troubleshooting

#### "Sign in to confirm you’re not a bot"

YouTube has flagged your request.

- **Solution:** Paste your Cookies into the input field. This proves you are a real user.

#### "Video unavailable" / "Private video"

The actor will not retry these links. It will instantly mark the status as `deleted/private` so you can filter them out of your report.

#### Proxies

This Actor is optimized for **Residential Proxies**. If you have an Apify plan with Residential access, the Actor automatically selects them for the highest success rate. If not, it falls back to standard datacenter proxies (which may require Cookies to work reliably).

***

#### 👨‍💻 Developer Notes

- **Engine:** Python 3.11 + `yt-dlp` (Custom Fork)
- **Concurrency:** Auto-scaled to 5 concurrent threads.
- **Maintenance:** Updated weekly to match YouTube's API changes.

# Actor input Schema

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

List of YouTube links to scrape

## `cookies` (type: `string`):

Paste Netscape-formatted cookies here to bypass 'Sign in' errors and Age Restrictions. (Use an extension like 'Get cookies.txt LOCALLY' to export them).

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/shorts/5w-qgG-iJ2M"
  ]
}
```

# Actor output Schema

## `scrapedData` (type: `string`):

Download the results in CSV, JSON, or Excel.

# 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/5w-qgG-iJ2M"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("beyondops/youtube-metadata-scraper-pro-v2").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/5w-qgG-iJ2M",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("beyondops/youtube-metadata-scraper-pro-v2").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/5w-qgG-iJ2M"
  ]
}' |
apify call beyondops/youtube-metadata-scraper-pro-v2 --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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