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

YouTube video details scraper: paste video URLs or ids, get title, description, channel, exact views and likes, comments, publish date, duration, tags, category, chapters, caption languages and Shorts, live, members-only and age flags. Monitor mode tracks like, comment and view changes.

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

## Pricing

from $0.80 / 1,000 result items

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

Paste YouTube video URLs or ids and get one clean row per video: title, full description, channel, exact view and like counts, comment count, publish date, duration, tags, category, chapters, caption languages, thumbnails, and flags for Shorts, live streams, members-only and age-restricted videos. No API key, no login.

**Try it:** the prefilled example returns 3 rows in about 30 seconds and costs about $0.004. Results cost $1.00 per 1,000.

Coverage: public, unlisted and age-restricted videos by URL or id. Private and deleted videos are skipped and not charged. Exact publish time (with time zone) and category come from YouTube's web player; when YouTube withholds it, the row has the publish date and no category. Comment count is YouTube's rounded display ("46K"), flagged with `commentCountIsApprox`.

### Why this one

- **Likes, comments and views tracker.** Monitor mode keeps state per video and, on each scheduled run, returns only the videos whose likes or comments changed, or whose views moved by at least `minViewChangePercent` (5 % by default) when you add `views` to `trackFields`. Each row carries the previous values in `previous`, and the summary can go to a webhook or Telegram. The most used YouTube video details actor has one input field (`videoIds`) and no monitor or change field.
- **Chapters, caption languages and status flags in every row.** `chapters` (title and start second), `captionLanguages`, `defaultLanguage`, `isShort`, `liveStatus`, `isMembersOnly`, `isAgeRestricted`, `isFamilySafe` and `playability`. The leader documents `id`, `title`, `description`, `channelId`, `channelTitle`, `thumbnail` and `viewCount`.
- **Typed, exact numbers.** `viewCount`, `likeCount`, `durationSeconds` and `commentCount` are integers. Views are exact, and likes are exact whenever YouTube shows the like button's full count (19,492,537, not "19M"); `likeCountIsApprox` says which. The leader's README says `viewCount`, `likeCount` and `lengthSeconds` can be strings.
- **One row per video.** Repeated URLs in the input are merged, links that are not videos are listed in the run's `ADAPTER_STATS` record instead of failing the run.

### What you get

Real rows from the example dataset (5 Nov 2026):

| title | channel | published | duration (s) | views | likes | comments | chapters | short |
|---|---|---|---|---|---|---|---|---|
| Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster) | Rick Astley | 2009-10-24T23:57:33-07:00 | 213 | 1,834,031,195 | 19,492,722 | 2.4M | 0 | no |
| Learn Python - Full Course for Beginners \[Tutorial] | freeCodeCamp.org | 2018-07-11 | 16,012 | 49,550,691 | 1,123,620 | 46K | 35 | no |
| Python Basics: Your FIRST Program in Under a Minute! | The Programmers Realm | 2024-06-21 | 25 | 1,799,922 | 22,719 | 163 | 0 | yes |

Full row: `id`, `videoId`, `url`, `title`, `description`, `channelName`, `channelId`, `channelUrl`, `channelHandle`, `channelSubscribers`, `channelSubscribersText`, `channelVerified`, `publishedAt`, `publishedDate`, `uploadedAt`, `durationSeconds`, `viewCount`, `likeCount`, `likeCountIsApprox`, `commentCount`, `commentCountText`, `commentCountIsApprox`, `commentsTurnedOff`, `concurrentViewers`, `tags`, `category`, `thumbnails`, `thumbnailUrl`, `isLive`, `isLiveContent`, `liveStatus`, `liveStartedAt`, `liveEndedAt`, `isShort`, `isMembersOnly`, `isAgeRestricted`, `isFamilySafe`, `isUnlisted`, `chapters`, `captionLanguages`, `hasAutoCaptions`, `defaultLanguage`, `playability`, `detailsComplete`, `scrapedAt`, and in monitor mode `trackedViewCount`, `changeType`, `changedFields`, `previous`.

### Use cases

- **Enrich a video list**: paste URLs from a spreadsheet or another actor's dataset and get stats, duration and tags for each.
- **Campaign and creator tracking**: run monitor mode daily on sponsored or competitor videos and get only the ones whose likes, comments or views moved, with the previous numbers.
- **Content research**: compare chapters, tags, categories and caption languages across a set of videos.

### Input

| Field | Meaning | Default |
|---|---|---|
| `videoUrls` | Watch URLs, `youtu.be` links, `/shorts/`, `/embed/`, `/live/` links or bare 11-character ids | prefill: three videos |
| `completeDetails` | When YouTube withholds the player on the watch page, ask its player API for duration, tags and caption tracks | `true` |
| `maxProxyTier` | Highest proxy tier used when YouTube walls a request (`none`, `datacenter`, `residential`); this caps the proxy cost | `residential` |
| `trackFields` | Monitor mode: which numbers make a video count as changed (`likes`, `comments`, `views`) | `likes`, `comments` |
| `minViewChangePercent` | Monitor mode with `views`: report views only after they moved this many percent since the last report | `5` |
| `maxItems` | Stop after this many rows | `100` |
| `mode` | `scrape`, or `monitor` (only videos whose tracked numbers changed) | `scrape` |
| `monitorStateId`, `webhookUrl`, `telegramBotToken`, `telegramChatId` | Monitor-mode state key and alert targets | empty |

### Monitor mode

Save the input as a task, set `"mode": "monitor"` and schedule it. The first run reads every video and records the tracked numbers as the baseline; it pushes no rows and charges only `monitor-check` ($0.005). Later runs push a video when a tracked number changed (`changeType: "changed"`, `changedFields`, `previous`) or when you added it to the list (`changeType: "new"`).

By default likes and comments are tracked. Views grow on every run of a popular video, so they are tracked only when you add `views` to `trackFields`, through `trackedViewCount`: it moves to the current view count only when views changed by at least `minViewChangePercent` since the last reported value, so a slowly growing video does not cost a `change` event on every run.

Every video on the list is read each run and `maxItems` caps the pushed rows. In monitor mode, videos already known skip the player API (all tracked numbers come from the watch page), so their rows may have `detailsComplete: false`; a newly added video gets full details. A run with no changes charges only the check; a run YouTube blocks completely charges nothing. On 5 Nov 2026 a run 40 seconds after the baseline on the three prefilled videos returned two rows (likes changed on two of them), for example `{"id": "dQw4w9WgXcQ", "changeType": "changed", "changedFields": ["likeCount"], "previous": {"likeCount": 19492725}, "likeCount": 19492729}`.

```json
{
  "mode": "monitor",
  "monitorStateId": "my-campaign",
  "videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
  "webhookUrl": "https://your-endpoint.example.com/hook"
}
```

### Limits

- Comment count is YouTube's rounded display above 999 (`46K` becomes 46000). Views are exact; likes are exact unless `likeCountIsApprox` is true.
- "Made for kids" is not shown to logged-out viewers and is not returned; `isFamilySafe` is.
- When YouTube refuses the player on every allowed proxy tier, the row still has title, description, channel, views, likes, comments, date and chapters, with `detailsComplete: false` and no duration, tags or captions.
- Channel subscribers are YouTube's rounded display. No viewer or commenter data is collected.

### Pricing

| Event | Price |
|---|---|
| result | $1.00 per 1,000 videos |
| monitor-check | $0.005 per monitor run |
| change | $1.00 per 1,000 changed videos |

You pay only for pushed rows. A row with `detailsComplete: false` is charged as a full result.

Platform usage is billed by Apify on top, and most of it is proxy traffic. Measured on the prefilled run of 5 Nov 2026 (`ftvnB6QFq6x3mrmVg`):

- Watch pages start without a proxy and move to datacenter or residential only when YouTube walls them. In every run on 5 Nov 2026 they needed no proxy, so this part cost compute only: about $0.0001 per video.
- When YouTube withholds the player on the watch page (two of the three prefilled videos), the player API answered only through the residential proxy: about 42 KB per video, about $0.0003 per video.
- The prefilled run of 3 videos used $0.0012 of platform usage in total, $0.0007 of it residential proxy traffic.

`maxProxyTier` caps this: with `datacenter` or `none` no residential traffic is used, and videos whose player is withheld come back with `detailsComplete: false` (no duration, tags or captions). `completeDetails: false` skips the player API entirely.

### Related actors

- [YouTube Search Scraper](https://apify.com/datahamster/youtube-search-scraper): find videos by keyword, then paste the URLs here.
- [YouTube Transcript Scraper](https://apify.com/datahamster/youtube-transcript-scraper): full caption text of the same videos.
- [YouTube Comments](https://apify.com/datahamster/youtube-comments): comment texts and like counts.
- [YouTube Channel Monitor](https://apify.com/datahamster/youtube-channel-monitor): new uploads of whole channels.

### FAQ

**Does it need an API key or a Google account?** No. It reads what YouTube shows a logged-out visitor.

**What happens with a private or deleted video?** It is skipped and not charged; `ADAPTER_STATS` counts it.

**What if YouTube blocks the requests?** Each request moves up the proxy ladder up to `maxProxyTier`. A run where every video was walled ends as `blocked` in `RUN_SUMMARY` instead of an empty dataset.

### Changelog

- 0.1: first release. Batch video URLs, exact views and likes, chapters, caption languages, Shorts/live/members-only/age flags, monitor mode on likes, comments and views (with a minimum view change).

***

If this actor saved you time, a short review on its Store page helps other people find it. Missing a field or found a wrong value? Open an issue on the **Issues** tab.

# Actor input Schema

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

YouTube videos, one per line: a watch URL "https://www.youtube.com/watch?v=dQw4w9WgXcQ", a "https://youtu.be/dQw4w9WgXcQ" link, a "/shorts/<id>", "/embed/<id>" or "/live/<id>" link, or a bare 11-character id. Repeated videos are returned once.

## `completeDetails` (type: `boolean`):

true = when YouTube withholds the player on the watch page, ask its player API for duration, tags and caption tracks (often needs the residential proxy). false = return what the watch page shows: no extra request, but some rows have no duration, tags or captions.

## `maxProxyTier` (type: `string`):

Requests start without a proxy and move up only when YouTube walls them, up to this tier. Lower it to cap proxy cost; rows may then have detailsComplete false.

## `trackFields` (type: `array`):

Monitor mode only: a video is reported as changed when one of these numbers changed. Views grow on every run of a popular video; with "views" they are reported only after moving minViewChangePercent.

## `minViewChangePercent` (type: `integer`):

Monitor mode with "views" in the tracked numbers: report a video's views only when they changed by at least this many percent since the last report. 0 = every change.

## `maxItems` (type: `integer`):

Stop after this many videos (you are charged only for pushed rows)

## `mode` (type: `string`):

scrape = full results; monitor = only new/changed items since the previous run of this task

## `monitorStateId` (type: `string`):

Optional state id when not running as a saved task (monitor mode)

## `webhookUrl` (type: `string`):

POST a change summary here in monitor mode

## `telegramBotToken` (type: `string`):

Optional: bot token for monitor-mode change summaries

## `telegramChatId` (type: `string`):

Optional: chat id that receives monitor-mode summaries

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://youtu.be/rfscVS0vtbw",
    "https://www.youtube.com/shorts/nluUYtejoIE"
  ],
  "completeDetails": true,
  "maxProxyTier": "residential",
  "trackFields": [
    "likes",
    "comments"
  ],
  "minViewChangePercent": 5,
  "maxItems": 3,
  "mode": "scrape"
}
```

# Actor output Schema

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

All pushed rows (dataset, JSON)

## `resultsTable` (type: `string`):

Dataset in the Console viewer

## `runSummary` (type: `string`):

RUN_SUMMARY record

# 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://youtu.be/rfscVS0vtbw",
        "https://www.youtube.com/shorts/nluUYtejoIE"
    ],
    "maxItems": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("datahamster/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=dQw4w9WgXcQ",
        "https://youtu.be/rfscVS0vtbw",
        "https://www.youtube.com/shorts/nluUYtejoIE",
    ],
    "maxItems": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("datahamster/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=dQw4w9WgXcQ",
    "https://youtu.be/rfscVS0vtbw",
    "https://www.youtube.com/shorts/nluUYtejoIE"
  ],
  "maxItems": 3
}' |
apify call datahamster/youtube-video-details-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datahamster/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/5DWEEmQLTjdqgp32O/builds/z1RjdcOSwAy4hawgJ/openapi.json
