# YouTube Video Data Scraper \[FAST] | Stats & Insights (`apizy/youtube-video-detail-scraper`) Actor

Get full details on any YouTube video. Pull views, likes, comments, description, keywords, and channel info, plus engagement insights such as like rate and engagement rate. Batch many URLs for content and SEO research. Transparent pricing: pay $0.005 per video, only on success. Failures are free.

- **URL**: https://apify.com/apizy/youtube-video-detail-scraper.md
- **Developed by:** [Apizy](https://apify.com/apizy) (community)
- **Categories:** Videos, SEO tools, Social media
- **Stats:** 5 total users, 3 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Detail Scraper

Scrape full details from any YouTube video: title, description, views, likes, comment count, keywords, category, duration, channel info, and built-in engagement insights. Works on any video URL format and returns clean JSON in seconds.

You are only charged for videos that come back with real data. Failed requests and empty results are free.

### What does YouTube Video Detail Scraper do?

YouTube Video Detail Scraper pulls complete video metadata directly from YouTube and turns it into a clean, structured dataset ready to use.

It can extract:

- Video title, description, URL, publish date, and upload date
- View count, like count, and comment count (exact integers + raw string)
- Duration as a readable string, in seconds, and in milliseconds
- Category, keywords, thumbnail URL, and family safety status
- Channel name, channel ID, and channel URL
- Per-video engagement insights: like rate, comment rate, engagement rate, like-to-comment ratio, estimated watch hours, views per day, and duration category
- Optionally, a full list of countries where the video is available

### Why Scrape YouTube Video Details?

A video's metadata tells a story that goes beyond the surface numbers. Likes, comments, and duration together reveal how audiences actually respond to content, not just how many people watched, but how many cared enough to react.

Here are some ways you could use this data:

- Analyze engagement quality on your own or competitor videos
- Compare like rates and comment rates across videos in the same niche
- Build datasets for content strategy, SEO research, or keyword analysis
- Track how a video's stats evolve over multiple runs
- Feed structured video metadata into dashboards, spreadsheets, or AI pipelines

### How to Use

Scraping a YouTube video's full details takes about 2 seconds per video. No setup needed beyond the video URL.

1. Click **Try for free**
2. Enter one or more YouTube video URLs
3. Optionally enable **Include Available Countries** to get the full list of countries where the video is accessible
4. Click **Run**
5. When done, preview or download your data from the Dataset tab

### Input

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

**Batch input**

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/watch?v=QrT4S9i3agE",
    "https://youtu.be/WOzcFkld6_g"
  ],
  "includeAvailableCountries": false
}
```

#### Input Fields

| Field                       | Type    | Default | Description                                                                                           |
| --------------------------- | ------- | ------- | ----------------------------------------------------------------------------------------------------- |
| `videoUrls`                 | array   | none    | YouTube video URLs or video IDs **(required)**. Supports `watch?v=`, `youtu.be/`, and raw 11-char IDs |
| `includeAvailableCountries` | boolean | `false` | If `true`, adds a list of up to 249 country codes where the video is available                        |

### Output

Each video is saved as one item in the Dataset. The run summary goes to the Key-Value Store under `OUTPUT`.

**Video item**

```json
{
  "videoId": "dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "description": "The official video for \"Never Gonna Give You Up\" by Rick Astley...",
  "publishedAt": "2009-10-24",
  "uploadedAt": "2009-10-24",
  "category": "Music",
  "duration": "3:33",
  "durationSeconds": 213,
  "durationMs": 213000,
  "isLive": false,
  "isUnlisted": false,
  "isFamilySafe": true,
  "keywords": ["rick astley", "Never Gonna Give You Up", "rick roll"],
  "views": 1786979563,
  "likes": 19185631,
  "commentCount": 2400000,
  "commentCountRaw": "2.4M",
  "thumbnailUrl": "https://i.ytimg.com/vi_webp/dQw4w9WgXcQ/maxresdefault.webp",
  "channel": {
    "channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
    "name": "Rick Astley",
    "url": "http://www.youtube.com/@RickAstleyYT"
  },
  "insight": {
    "ageInDays": 6090,
    "viewsPerDay": 293428,
    "likeRate": 1.0736,
    "commentRate": 0.1343,
    "engagementRate": 1.2079,
    "likeToCommentRatio": 7.99,
    "estimatedWatchHours": 105729624.14,
    "durationCategory": "1–5 min"
  },
  "scrapedAt": "2026-06-27T17:55:01.413Z"
}
```

`availableCountries` is only included when `includeAvailableCountries` is set to `true` in the input.

**Run summary**

```json
{
  "summary": {
    "total": 3,
    "successCount": 3,
    "failedCount": 0,
    "totalCharged": 0.015,
    "startedAt": "2026-06-28T10:00:00.000Z",
    "finishedAt": "2026-06-28T10:00:06.000Z",
    "totalDurationSeconds": 6
  }
}
```

#### Output Fields

**Video data**

| Field                | Type    | Description                                                               |
| -------------------- | ------- | ------------------------------------------------------------------------- |
| `videoId`            | string  | YouTube video ID (11-character string)                                    |
| `title`              | string  | Full video title                                                          |
| `videoUrl`           | string  | Direct link to the video                                                  |
| `description`        | string  | Full video description text                                               |
| `publishedAt`        | string  | Publish date in `YYYY-MM-DD` format                                       |
| `uploadedAt`         | string  | Upload date in `YYYY-MM-DD` format (may differ from publish date)         |
| `category`           | string  | YouTube category (e.g. `Music`, `Gaming`, `Education`)                    |
| `duration`           | string  | Duration in `M:SS` or `H:MM:SS` format                                    |
| `durationSeconds`    | integer | Duration in seconds                                                       |
| `durationMs`         | integer | Duration in milliseconds                                                  |
| `isLive`             | boolean | `true` if the video is or was a live stream                               |
| `isUnlisted`         | boolean | `true` if the video is unlisted                                           |
| `isFamilySafe`       | boolean | `true` if YouTube marks the video as family safe                          |
| `keywords`           | array   | Tags set by the video creator                                             |
| `views`              | integer | View count                                                                |
| `likes`              | integer | Like count                                                                |
| `commentCount`       | integer | Comment count, normalized from the raw string (e.g. `2.4M` → `2400000`)   |
| `commentCountRaw`    | string  | Raw comment count as shown by YouTube (e.g. `"2.4M"`)                     |
| `thumbnailUrl`       | string  | Highest-quality thumbnail URL available                                   |
| `channel.channelId`  | string  | YouTube channel ID                                                        |
| `channel.name`       | string  | Channel display name                                                      |
| `channel.url`        | string  | Link to the channel page                                                  |
| `availableCountries` | array   | ISO country codes where the video is available (only if enabled in input) |
| `scrapedAt`          | string  | ISO timestamp of when the data was scraped                                |

**Insight** (nested inside each video item)

| Field                 | Type    | Description                                                         |
| --------------------- | ------- | ------------------------------------------------------------------- |
| `ageInDays`           | integer | Days since the video was published                                  |
| `viewsPerDay`         | integer | Average views per day since publish date                            |
| `likeRate`            | float   | `(likes / views) x 100`, percentage of viewers who liked            |
| `commentRate`         | float   | `(comments / views) x 100`, percentage of viewers who commented     |
| `engagementRate`      | float   | `((likes + comments) / views) x 100`, combined engagement signal    |
| `likeToCommentRatio`  | float   | `likes / comments`, high means quiet appreciation, low means debate |
| `estimatedWatchHours` | float   | `views x durationSeconds / 3600`, total watch time in hours         |
| `durationCategory`    | string  | One of: `< 1 min`, `1–5 min`, `5–15 min`, `15–30 min`, `30+ min`    |

### Pricing

Pay per successfully scraped video. Failed requests are free.

| Videos | Cost   | Est. time |
| ------ | ------ | --------- |
| 1      | $0.005 | ~2s       |
| 10     | $0.05  | ~20s      |
| 50     | $0.25  | ~2 min    |
| 100    | $0.50  | ~4 min    |

$0.005 per video.

### Notes

- All video URL formats work: `watch?v=`, `youtu.be/`, and raw 11-character video IDs.
- View counts, like counts, and comment counts are exact integers, not strings. Ready to sort, filter, and calculate without extra parsing.
- `likeRate` and `commentRate` are the most useful signals for content quality analysis. A video with 1M views and a 5% like rate outperforms one with 10M views and a 0.1% like rate.
- `likeToCommentRatio` distinguishes quietly appreciated content (high ratio) from content that drives active discussion (low ratio).
- `includeAvailableCountries` is off by default to keep output clean. Turn it on when you need geographic availability data.
- Invalid URLs are skipped and logged. The run continues without interruption.

### More Actors You Might Like

Built by the same team and backed by the same transparent pricing philosophy: no hidden attempts, no wasted credits, no charge for failed results.

| Actor                                                                                     | Description                                                                                          |
| ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| [YouTube Video Scraper](https://apify.com/apizy/youtube-video-scraper)                    | Scrape all videos from a channel with views, durations, thumbnails, and per-video insights.          |
| [YouTube Comment Scraper](https://apify.com/apizy/youtube-comment-scraper)                | Scrape comments from any video with author details, like counts, reply counts, and engagement flags. |
| [YouTube Channel Scraper](https://apify.com/apizy/youtube-channel-scraper)                | Channel profiles with subscriber counts, engagement rates, contact info, and social links.           |
| [YouTube Channel Scraper Fast](https://apify.com/apizy/youtube-channel-scraper-innertube) | Same channel data at faster speed. Better for large batches.                                         |
| [YouTube Transcript Scraper](https://apify.com/apizy/youtube-transcript-scraper)          | Extract the full transcript from any YouTube video, with optional timestamps per segment.            |

### Get in Touch

Have questions, need custom scraping solutions, or want to integrate with your existing stack? We're here to help!

- **Email:** apizy.studio@gmail.com

We build custom scraping solutions tailored to your specific needs that are fast, reliable, and transparent.

# Actor input Schema

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

List of YouTube video URLs or video IDs to scrape.

## `includeAvailableCountries` (type: `boolean`):

If true, includes the list of countries where the video is available (up to 249 country codes).

## Actor input object example

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

# Actor output Schema

## `results` (type: `string`):

Dataset containing detailed data per scraped YouTube video.

## `output` (type: `string`):

Complete run output including summary and all video results.

# 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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("apizy/youtube-video-detail-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"] }

# Run the Actor and wait for it to finish
run = client.actor("apizy/youtube-video-detail-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"
  ]
}' |
apify call apizy/youtube-video-detail-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "YouTube Video Data Scraper [FAST] | Stats & Insights",
        "description": "Get full details on any YouTube video. Pull views, likes, comments, description, keywords, and channel info, plus engagement insights such as like rate and engagement rate. Batch many URLs for content and SEO research. Transparent pricing: pay $0.005 per video, only on success. Failures are free.",
        "version": "0.0",
        "x-build-id": "93Idelx0i2kh12DMn"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/apizy~youtube-video-detail-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-apizy-youtube-video-detail-scraper",
                "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/apizy~youtube-video-detail-scraper/runs": {
            "post": {
                "operationId": "runs-sync-apizy-youtube-video-detail-scraper",
                "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/apizy~youtube-video-detail-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-apizy-youtube-video-detail-scraper",
                "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": [
                    "videoUrls"
                ],
                "properties": {
                    "videoUrls": {
                        "title": "Video URLs",
                        "type": "array",
                        "description": "List of YouTube video URLs or video IDs to scrape.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "includeAvailableCountries": {
                        "title": "Include Available Countries",
                        "type": "boolean",
                        "description": "If true, includes the list of countries where the video is available (up to 249 country codes).",
                        "default": false
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
