# 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:** 327 total users, 58 monthly users, 100.0% runs succeeded, 3 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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# 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(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 '{
  "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": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,beyondops/youtube-metadata-scraper-pro-v2"
        }
    }
}
```

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/OHhM6h3gLTxouTLiP/builds/heHDBTipR9ogCLMNS/openapi.json
