# YouTube Video Details Scraper: Views, Likes, Chapters, Shorts (`skillmerc/youtube-video-details-scraper`) Actor

Paste YouTube video or Shorts links and get one row per video: exact views, likes, publish date, duration, chapters, hashtags and channel, plus exact time and category for most videos. Works on Shorts, live and upcoming streams. No login, no API key.

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

## Pricing

from $0.35 / 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

For marketers, researchers and creators who track YouTube videos in a spreadsheet: paste video or Shorts links, get one row per video with exact views, likes, publish date, duration, chapters and channel, plus the exact time and category for most videos.

### What it does

- Takes watch links, youtu.be links, Shorts links (youtube.com/shorts/...), live links or bare 11-character video ids, in any mix.
- Returns one row per video with the public details YouTube shows on the video page.
- Gives Shorts the same full details as normal videos: exact views, likes, publish date and time, duration.
- Works on live streams (on air now or ended) and on upcoming premieres and streams.
- The same video given twice (for example as a watch link and as a Shorts link) is fetched and charged once.
- No login, no YouTube API key, no browser.

It does not fetch transcripts, comments, search results or channel lists, and never the video file. For a channel's Shorts list use our YouTube Channel Videos Scraper, then paste the URLs here. For transcripts, our "YouTube Transcript Scraper: Subtitles & Captions" actor does that.

### Input

| Field | What it means |
|-|-|
| `videoUrls` | Video links or ids, one per line. Required. |
| `includeChapters` | `true` (default) adds chapter titles and start times. `false` gives `chapters: null`. |
| `includeDescription` | `true` (default) adds the full description. `false` gives `description: null`. |

Example:

```json
{
  "videoUrls": ["https://www.youtube.com/watch?v=aircAruvnKk", "https://youtu.be/dQw4w9WgXcQ", "https://www.youtube.com/shorts/SZJ2328Wkzg"],
  "includeChapters": true,
  "includeDescription": true
}
```

### Output

One row per video. Every row has the same fields; a value YouTube does not show is `null`.

| Field | What it holds |
|-|-|
| `input` | The link or id you gave. |
| `videoId`, `url` | The video id and its link (a `/shorts/` link for Shorts). |
| `type` | `video`, `short`, `live` (a live stream, on air now or ended) or `upcoming`. |
| `title`, `description` | As written by the creator. |
| `channelTitle`, `channelId`, `channelHandle` | The channel that posted it. |
| `publishedAt` | Publish date and time in UTC. `publishedAtApproximate` is `true` when YouTube gave only the day. |
| `uploadDate` | Upload date and time in UTC, as YouTube gives it. |
| `durationSeconds` | Length in seconds. `null` while live or upcoming. |
| `viewCount` | Exact view count. `null` while live or upcoming. |
| `likeCount` | Exact likes. `null` if the creator hides them. |
| `commentCountText` | The comment count as YouTube shows it ("9.5K"). `null` if comments are off. |
| `category` | YouTube category, such as "Education". |
| `keywords` | The creator's tags. `null` when YouTube did not give them to us (see below); `[]` when the video has none. |
| `hashtags` | Hashtags shown above the title, or found in the description. |
| `chapters`, `chaptersSource` | `[{ title, startSeconds }]`. Source `description` (the creator's) or `auto` (YouTube's automatic chapters). |
| `isLive`, `isUpcoming`, `isShort` | Flags. `isLive` means on air now. |
| `isFamilySafe`, `isAgeRestricted` | Age-restricted videos are never listed, so `isAgeRestricted` is always `false` on a row. |
| `liveStartAt`, `liveEndAt` | Stream start and end times, when YouTube gives them. |
| `captionLanguages` | Language codes of the caption tracks (no caption text). `null` when YouTube did not give them to us. |
| `thumbnailUrl` | The largest JPG thumbnail. |
| `playerDataSource` | `web`, `music` or `tv`: which public player answer filled the row (see below). |
| `scrapedAt` | When the run read the page. |

Sample row from a real run (description and chapters cut short here):

```json
{
  "input": "https://www.youtube.com/watch?v=aircAruvnKk",
  "videoId": "aircAruvnKk",
  "url": "https://www.youtube.com/watch?v=aircAruvnKk",
  "type": "video",
  "title": "But what is a neural network? | Deep learning chapter 1",
  "description": "What are the neurons, why are there layers, and what is the math underlying it?\nHelp fund ...",
  "channelTitle": "3Blue1Brown",
  "channelId": "UCYO_jab_esuFRV4b17AJtAw",
  "channelHandle": "@3blue1brown",
  "publishedAt": "2017-10-05T15:11:25.000Z",
  "publishedAtApproximate": false,
  "uploadDate": "2017-10-05T15:11:25.000Z",
  "durationSeconds": 1120,
  "viewCount": 25350506,
  "likeCount": 571210,
  "commentCountText": "9.5K",
  "category": "Education",
  "keywords": null,
  "hashtags": [],
  "chapters": [
    { "title": "Introduction example", "startSeconds": 0 },
    { "title": "Series preview", "startSeconds": 67 },
    { "title": "What are neurons?", "startSeconds": 162 }
  ],
  "chaptersSource": "description",
  "isLive": false,
  "isUpcoming": false,
  "isShort": false,
  "isFamilySafe": true,
  "isAgeRestricted": false,
  "liveStartAt": null,
  "liveEndAt": null,
  "captionLanguages": null,
  "thumbnailUrl": "https://i.ytimg.com/vi/aircAruvnKk/hq720.jpg",
  "playerDataSource": "music",
  "scrapedAt": "2026-11-20T17:41:25.052Z"
}
```

The run also writes an `OUTPUT` record: rows delivered, counts by type, failures with reasons, and warnings.

### Tags and caption languages

YouTube often holds back its full web player data when the request comes from a cloud server such as Apify's. When that happens, the row is filled from the public video page and YouTube Music's public player instead (`playerDataSource: "music"`). Views, likes, exact date and time, duration, category, chapters and channel are all still there. Only `keywords` (tags) and `captionLanguages` are `null` on those rows, and `OUTPUT` says how many rows that was. In our test runs most rows came this way.

For music videos from record labels and artists, YouTube usually holds back the music player's data too. Those rows are filled from the public video page and YouTube's TV player answer (`playerDataSource: "tv"`): views, likes, duration, tags, chapters, description and channel are there, `publishedAt` is the day shown on the page, in US time, so it can be one day before the UTC date (`publishedAtApproximate: true`), and `uploadDate`, `category`, `isFamilySafe` and `captionLanguages` are `null`. The TV player answer says when a video is age-restricted, and those are never listed.

### Pricing

Pay per event: you pay for each video row delivered.

| Apify plan | Price per 1,000 videos |
|---|---|
| Free | USD 0.50 |
| Bronze | USD 0.45 |
| Silver | USD 0.40 |
| Gold and above | USD 0.35 |

Plus USD 0.00005 per run start. Failed videos, bad links and repeated videos are free. The run stops when it reaches the maximum cost you set.

### When something fails

A video that cannot be listed goes into the free named dataset `youtube-video-details-failed` and the `OUTPUT` record, with the reason. Nothing is charged for it and the run still finishes as succeeded.

| Reason | What it means |
|-|-|
| `bad_input` | Not a YouTube video link or an 11-character video id. |
| `unavailable` | Removed, deleted or never existed. |
| `private` | The video is private. |
| `age_restricted` | Age-restricted. Not fetched, because that needs a sign-in. |
| `members_only` | Only for channel members. Not fetched. |
| `region_blocked` | Not available in the US, where we read YouTube from. |
| `login_required` | YouTube asks for a sign-in for another reason. Not fetched. |
| `blocked` | YouTube asked the run to prove it is not a bot for this video and none of its public players gave the details. Try again later. |
| `error` | Something else went wrong; the message says what. |

### Speed and limits

- One video at a time, requests at least 300 ms apart, with backoff when YouTube asks us to slow down. Our test runs took 2 to 4 seconds per video, so 1,000 videos take roughly 35 to 70 minutes. The default run timeout is one hour: for more than about 800 videos, raise it or split the list. A run that nears its timeout stops 30 seconds early and still writes its `OUTPUT`.
- Each video takes one to three requests (the video page, plus YouTube Music's player answer when the web player data is held back, plus the TV player answer when that is held back too); a video up to 3 minutes long given as a watch link can take one more, to check whether it is a Short.
- We read YouTube in English from the US. Dates, counts and texts follow that.
- If YouTube refuses Apify's own IP, the run switches to Apify's datacenter proxy (at most 3 times). It never uses residential proxies or logs in.
- `commentCountText` is YouTube's rounded text, not an exact number.
- Music videos from record labels and artists (for example "PSY - GANGNAM STYLE") usually come through the TV player answer (see Tags and caption languages), so their rows have the publish day but not the exact time, and no category.

### Is it legal?

This actor reads only public video pages, which anyone can see without an account. It does not log in, download videos, read comments or look for emails or phone numbers. Titles, descriptions, channel names and handles are copied as YouTube shows them; a description can name people or hold contact details the creator chose to publish, and channel names and handles can be personal data. You need a lawful basis to collect and use them (for example under GDPR or POPIA), and you are responsible for how you use the results. Respect YouTube's terms and the creators' rights.

This actor is not made, endorsed or sponsored by YouTube or Google.

# Actor input Schema

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

One per line. Watch URLs, youtu.be links, Shorts URLs (youtube.com/shorts/...), live URLs or bare 11-character video ids. The same video given twice is fetched and charged once.

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

Chapter titles and start times, from the description or YouTube's automatic chapters. Off gives chapters: null.

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

The full video description. Off gives description: null (smaller rows).

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=aircAruvnKk",
    "https://youtu.be/dQw4w9WgXcQ",
    "https://www.youtube.com/shorts/SZJ2328Wkzg"
  ],
  "includeChapters": true,
  "includeDescription": true
}
```

# Actor output Schema

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

No description

## `summary` (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=aircAruvnKk",
        "https://youtu.be/dQw4w9WgXcQ",
        "https://www.youtube.com/shorts/SZJ2328Wkzg"
    ]
};

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

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

```

## MCP server setup

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