# YouTube Video Details Scraper (`serentity/youtube-video-details-scraper`) Actor

Full metadata for any YouTube video by URL or ID: title, description, exact publish date, views, likes, comment count, duration, tags, chapters, hashtags, channel with subscriber count. One item per video, no API key, no quota.

- **URL**: https://apify.com/serentity/youtube-video-details-scraper.md
- **Developed by:** [Tarik Cerkezovic](https://apify.com/serentity) (community)
- **Categories:** Videos, Developer tools, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 video details

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

Everything the video page knows about a video, as one clean item: title, full description, exact publish date, view count, like count, comment count, duration, creator tags, hashtags, chapters with timestamps, thumbnail, and the channel with its handle and subscriber count. Give it URLs or IDs, get metadata back. No YouTube API key, no daily quota, no login.

Built for content research, analytics dashboards, dataset building and agents that need facts about a video before deciding what to do with it. Pair it with the transcript, comments and channel actors from the same author for the full picture.

### What you get

| Field | Description |
|---|---|
| `videoId`, `url`, `title`, `description` | The video |
| `publishedAt`, `publishedText`, `publishedType` | Exact date (YYYY-MM-DD) as shown on the page, and whether it was published, premiered, streamed or is live now |
| `viewCount`, `likeCount`, `commentCount` and their `...Text` versions | Engagement, exact where YouTube shows it exactly |
| `durationSeconds`, `durationText` | Length |
| `tags`, `hashtags` | Creator keyword tags and hashtags above the title |
| `chapters` | `title`, `startSeconds`, `startText` for each chapter |
| `thumbnailUrl`, `isLive`, `isLiveContent` | Largest thumbnail; live now; is or was a stream |
| `channelId`, `channelName`, `channelHandle`, `channelUrl`, `channelAvatarUrl`, `subscriberCount` | The channel |
| `partial` | Set only when duration, tags and thumbnail could not be fetched; the rest is complete |
| `error`, `errorMessage` | Only on items that could not be fetched |

### Sample output

```json
{
  "videoId": "ZAzWPE9CItg",
  "url": "https://www.youtube.com/watch?v=ZAzWPE9CItg",
  "title": "AI Crisis in Math: Navier-Stokes, Riemann Hypothesis & Complexity Theory | Lex Fridman Podcast #503",
  "description": "Terence Tao and Scott Aaronson ...",
  "channelId": "UCSHZKyawb77ixDdsGog4iWA",
  "channelName": "Lex Fridman",
  "channelHandle": "@lexfridman",
  "channelUrl": "https://www.youtube.com/@lexfridman",
  "subscriberCount": 5070000,
  "subscriberCountText": "5.07M subscribers",
  "publishedAt": "2026-10-26",
  "publishedText": "Oct 26, 2026",
  "publishedType": "published",
  "viewCount": 1311345,
  "likeCount": 9050,
  "likeCountText": "9K",
  "commentCount": 1100,
  "commentCountText": "1.1K",
  "durationSeconds": 12867,
  "durationText": "3:34:27",
  "tags": ["lex fridman", "podcast", "math"],
  "chapters": [{ "title": "Introduction", "startSeconds": 0, "startText": "0:00" }],
  "thumbnailUrl": "https://i.ytimg.com/vi/ZAzWPE9CItg/maxresdefault.jpg",
  "isLive": false,
  "isLiveContent": false,
  "input": "ZAzWPE9CItg",
  "fetchedAt": "2026-11-05T17:10:00.000Z"
}
```

### Input

| Field | Type | Default | What it does |
|---|---|---|---|
| `videoUrls` | array of strings | required | Video URLs or IDs. |
| `includeDescription` | boolean | `true` | Full description text. |
| `includeTags` | boolean | `true` | Creator keyword tags. |
| `includeChapters` | boolean | `true` | Chapters with start times. |
| `maxConcurrency` | integer | `5` | Videos in parallel. |
| `proxyConfiguration` | object | Apify datacenter proxy | Proxy for all requests. |
| `residentialFallback` | boolean | `true` | Retry a blocked video through residential proxies, only on a detected block. |

Minimal input:

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

### Errors

| `error` | Meaning | Charged? |
|---|---|---|
| `INVALID_INPUT` | Not a YouTube video URL or ID | no |
| `VIDEO_UNAVAILABLE` | Deleted, private or never existed | no |
| `BLOCKED` | YouTube refused the video page from every proxy tried | no |
| `FETCH_FAILED` | Network or parsing failure | no |

### Pricing

Pay per event: a small fixed amount per video item returned, plus Apify platform usage. Error items are free. Two small requests per video; a run of 100 videos finishes in well under a minute.

### Notes

- `publishedAt` is the exact date YouTube shows on the page ("Oct 26, 2026"), not a relative estimate. Live streams show "Started streaming ..." with `publishedType` `live`.
- `likeCount` is exact when YouTube exposes the exact number in the page's accessibility text, otherwise the rounded figure ("9K") is parsed.
- `commentCount` is the figure in the comments panel header, rounded the way YouTube rounds it ("1.1K").
- Tags are the creator's keyword list, which YouTube no longer displays but still ships in the metadata.

### Using it from code

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('serentity/youtube-video-details-scraper').call({ videoUrls: ['ZAzWPE9CItg'] });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].title, items[0].viewCount, items[0].publishedAt);
```

### Legal

The data is what YouTube shows to any visitor of a public video page. No login, no personal data beyond the public channel name and handle. Use it in line with YouTube's terms of service.

# Actor input Schema

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

YouTube video URLs or 11-character video IDs. Watch, youtu.be, Shorts, embed and live URLs all work. Duplicates are fetched once.

## `includeDescription` (type: `boolean`):

The full video description text.

## `includeTags` (type: `boolean`):

The creator's keyword tags (not shown on the page, but present in the video metadata).

## `includeChapters` (type: `boolean`):

Chapters with start times, when the video has them.

## `maxConcurrency` (type: `integer`):

Videos fetched in parallel.

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

Proxy used for the requests. Apify datacenter proxies are used by default.

## `residentialFallback` (type: `boolean`):

If YouTube blocks the datacenter proxy for a video, retry through Apify residential proxies. Only used on a detected block.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "dQw4w9WgXcQ"
  ],
  "includeDescription": true,
  "includeTags": true,
  "includeChapters": true,
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "residentialFallback": true
}
```

# Actor output Schema

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

No description

# 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=jNQXAC9IVRw",
        "dQw4w9WgXcQ"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("serentity/youtube-video-details-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=jNQXAC9IVRw",
        "dQw4w9WgXcQ",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("serentity/youtube-video-details-scraper").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=jNQXAC9IVRw",
    "dQw4w9WgXcQ"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call serentity/youtube-video-details-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,serentity/youtube-video-details-scraper"
        }
    }
}
```

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/LMIwAX62QoKQFRUr1/builds/4aCgO1pR1FbZDbvya/openapi.json
