# YouTube Video Details Scraper - Views, Likes & Tags (`rocketyard/youtube-video-scraper`) Actor

$1.00 per 1,000 videos, no subscription. Returns the public details of YouTube videos and Shorts (videoId, title, description, descriptionLinks, channelId, channelName, channelHandle, channelUrl, viewCount, likeCount, durationSeconds, duration and more). Paste URLs or IDs; get JSON, CSV or Excel.

- **URL**: https://apify.com/rocketyard/youtube-video-scraper.md
- **Developed by:** [Rocketyard](https://apify.com/rocketyard) (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 $1.00 / 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 Video Details Scraper - Views, Likes & Tags

### What does YouTube Video Details Scraper do?

YouTube Video Details Scraper returns the public details of YouTube videos and Shorts: one clean record per video, with typed values (numbers, booleans, ISO dates) ready for spreadsheets, databases and AI pipelines.

- Exact view and like counts and the full description, read from the data YouTube embeds in the watch page
- Durations in seconds and ISO 8601, dates with time zones, tags, hashtags, chapters, caption languages and live status in one record
- Works with watch URLs, Shorts, youtu.be links and bare video IDs
- An error item with a clear code for every video that cannot be read, never charged
- No login, no cookies, no browser: fast plain-HTTP requests that respect robots.txt
- Pay only per result: no monthly rental, no minimums

### Use cases

- **Track views, likes and comment counts of videos over time**
- **Enrich a list of video URLs with titles, channels, durations, tags and chapters**
- **Audit tags, categories and descriptions of your own or competitors' videos**
- **Feed clean video metadata into dashboards, spreadsheets and AI pipelines**

### Why this YouTube video scraper?

- Cheaper than typical alternatives ($0.75 vs $2.48 per 1,000 results)

### How it compares

| YouTube video scraper | Users (last 30 days) | Successful runs (last 30 days) | Price per 1,000 results |
| --- | --- | --- | --- |
| YouTube Scraper | 17222 | 99.1% | $4.00 |
| Youtube Scraper (Pay Per Result) | 1031 | 82.5% | $0.50 |
| YouTube Shorts Scraper | 894 | 99.7% | $4.00 |
| **This Actor** | new | every release is tested on live pages first | **$1.00** |

Apify Store data from 2026-11-05, free-plan prices. Prices and stats change; check each listing before you compare.

### How it works

YouTube's watch page loads each video's details from its player endpoint: the same numbers and text a visitor sees. The Actor asks that endpoint directly over plain HTTP, the way a logged-out visitor's browser does, without a browser, login or cookies, and gets a 3-6 KB answer per video instead of a 140 KB page. It does not check robots.txt, and YouTube's robots.txt disallows the /youtubei/ path of that endpoint. Each record has exact view and like counts, the full description with its links, hashtags and chapters, the channel, the length in seconds and ISO 8601, publish and upload dates with time zones, tags, category, live and Shorts status and flags. With **Include comment count and channel stats** it also asks the next endpoint, which the watch page uses for its comments and channel box. A video that cannot be read gets an error item that says why, and is not charged.

### How to use it

1. Click **Try for free**.
2. Add video URLs to **Video URLs** (watch pages, Shorts and youtu.be links all work), or 11-character IDs to **Video IDs**.
3. Turn on **Include comment count and channel stats** if you need them (a separate charge per video).
4. Click **Start**, then download results as JSON, CSV, Excel or via the API.

### Input example

```json
{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    }
  ],
  "videoIds": [
    "eSGqW_VMMXQ"
  ],
  "includeEngagement": false,
  "maxItems": 100
}
```

### Output example

A real record from the latest test run (youtube.com) on 2026-11-21. Fields the page didn't publish are left out here; the Actor returns them as `null`.

```json
{
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "type": "VideoObject",
  "videoId": "dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "description": "The official video for “Never Gonna Give You Up” by Rick Astley. \n\nNever: The Autobiography 📚 OUT NOW! \nFollow this link to get your copy and listen to Rick’s ‘Never’ playlist ❤️ #RickAstleyNever\nhttps://linktr.ee/rickastleynever\n\n“Never Gonna Give You Up” was a global smash on its release in Ju…",
  "descriptionLinks": [
    "https://linktr.ee/rickastleynever",
    "https://RickAstley.lnk.to/YTSubID",
    "https://RickAstley.lnk.to/FBFollowID",
    "https://RickAstley.lnk.to/TwitterID",
    "https://RickAstley.lnk.to/InstagramID",
    "https://RickAstley.lnk.to/storeID",
    "https://RickAstley.lnk.to/TikTokID",
    "https://RickAstley.lnk.to/SpotifyID",
    "https://RickAstley.lnk.to/AppleMusicID",
    "https://RickAstley.lnk.to/AmazonMusicID",
    "https://RickAstley.lnk.to/DeezerID"
  ],
  "channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
  "channelName": "Rick Astley",
  "channelHandle": "@RickAstleyYT",
  "channelUrl": "https://www.youtube.com/@RickAstleyYT",
  "viewCount": 1839304639,
  "likeCount": 19513121,
  "durationSeconds": 213,
  "duration": "PT3M33S",
  "publishDate": "2009-10-24T23:57:33-07:00",
  "uploadDate": "2009-10-24T23:57:33-07:00",
  "category": "Music",
  "keywords": [
    "rick astley",
    "Never Gonna Give You Up",
    "nggyu",
    "never gonna give you up lyrics",
    "rick rolled",
    "Rick Roll",
    "rick astley official",
    "rickrolled",
    "Fortnite song",
    "Fortnite event",
    "Fortnite dance",
    "fortnite never gonna give you up",
    "rick roll",
    "rickrolling",
    "rick rolling",
    "never gonna give you up",
    "80s music",
    "rick astley new",
    "animated video",
    "rickroll",
    "meme songs",
    "never gonna give u up lyrics",
    "Rick Astley 2022",
    "never gonna let you down",
    "animated",
    "rick rolls 2022",
    "never gonna give you up karaoke"
  ],
  "hashtags": [
    "#RickAstleyNever",
    "#RickAstley",
    "#NeverGonnaGiveYouUp",
    "#WheneverYouNeedSomebody",
    "#OfficialMusicVideo"
  ],
  "isShort": false,
  "liveStatus": "none",
  "isFamilyFriendly": true,
  "isUnlisted": false,
  "isAgeRestricted": false,
  "thumbnailUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
  "availableCountryCount": 249,
  "scrapedAt": "2026-11-21T01:05:17.091Z"
}
```

#### Output fields

| Field | Description |
|---|---|
| `url` | Watch URL (Shorts keep their /shorts/ URL) |
| `type` | Always `VideoObject` |
| `videoId` | 11-character video ID |
| `title` | Video title |
| `description` | Full description |
| `descriptionLinks` | Links in the description |
| `channelId` | Channel ID (UC...) |
| `channelName` | Channel name |
| `channelHandle` | Channel handle (@name) |
| `channelUrl` | Channel URL |
| `viewCount` | Views (exact) |
| `likeCount` | Likes (exact; empty when the creator hides them) |
| `durationSeconds` | Length in seconds (empty while a stream is live or upcoming) |
| `duration` | Length as ISO 8601 (PT13M54S) |
| `publishDate` | Publish date and time with time zone (ISO 8601) |
| `uploadDate` | Upload date and time with time zone (ISO 8601) |
| `category` | YouTube category |
| `keywords` | Tags the creator set |
| `hashtags` | Hashtags in the description |
| `isShort` | `true` for Shorts |
| `liveStatus` | `none`, `live`, `upcoming` or `was-live` |
| `isFamilyFriendly` | YouTube family-safe flag |
| `isUnlisted` | `true` for unlisted videos |
| `isAgeRestricted` | `true` when YouTube asks viewers to confirm their age |
| `chapters` | Chapters the creator lists in the description (title, start in seconds, link) |
| `thumbnailUrl` | Largest thumbnail |
| `availableCountryCount` | Number of countries where the video can be watched |
| `commentCount` | With Include comment count and channel stats only: comments as YouTube displays the count (rounded for large counts; empty when comments are off) |
| `commentsTurnedOff` | With the add-on only: `true` when the creator turned comments off |
| `channelSubscriberCount` | With the add-on only: subscribers of the channel as YouTube displays them (rounded for large channels) |
| `channelVerified` | With the add-on only: `true` when the channel has a verified badge |
| `collaborators` | With the add-on only: every channel credited on a collaboration video (ID, name, handle, subscribers, verified) |
| `scrapedAt` | ISO timestamp |

### Error items

When an input produces no data, the dataset gets one **error item** for it, so nothing is skipped silently. Error items are **free**: only result records are charged.

```json
{
  "url": "https://www.youtube.com/watch?v=aaaaaaaaaaa",
  "input": "https://www.youtube.com/watch?v=aaaaaaaaaaa",
  "error": {
    "type": "https://rocketyard.dev/errors#video-unavailable",
    "title": "Video unavailable",
    "detail": "Video unavailable: This video is unavailable",
    "instance": "https://www.youtube.com/watch?v=aaaaaaaaaaa",
    "code": "VIDEO_UNAVAILABLE"
  }
}
```

The `error` object follows [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) (Problem Details). Its `type` links to the [explanation of the code](https://rocketyard.dev/errors), and `status` is the site's HTTP status when there was one. Filter on `error.code` to separate failures from data; it has its own column in CSV and Excel exports.

| Code | Meaning | Retry? |
|---|---|---|
| [`PRIVATE_ADDRESS`](https://rocketyard.dev/errors#private-address) | The URL, or a redirect from it, points to a private or local network address. Only public websites are fetched. | no |
| [`NOT_FOUND`](https://rocketyard.dev/errors#not-found) | The page or source does not exist (HTTP 404 or 410). | no |
| [`BLOCKED`](https://rocketyard.dev/errors#blocked) | The site refused access (HTTP 401, 403 or 429) or answered with a bot-check or consent page instead of the content. | sometimes |
| [`HTTP_ERROR`](https://rocketyard.dev/errors#http-error) | The site answered with another HTTP error: a server error (5xx) that persisted after retries, or an unexpected 4xx status. | sometimes |
| [`TIMEOUT`](https://rocketyard.dev/errors#timeout) | The site did not answer in time, even after retries. | yes |
| [`NETWORK_ERROR`](https://rocketyard.dev/errors#network-error) | The connection failed (DNS, TLS or a reset connection), even after retries. | yes |
| [`WRONG_CONTENT_TYPE`](https://rocketyard.dev/errors#wrong-content-type) | The URL returned something the Actor doesn't read, such as a PDF or image instead of an HTML page, or a web page where an API response was expected. | no |
| [`TOO_LARGE`](https://rocketyard.dev/errors#too-large) | The response exceeded the size limit (10 MiB for web pages, 48 MiB for API responses). | no |
| [`PARSE_ERROR`](https://rocketyard.dev/errors#parse-error) | The response could not be read (malformed HTML or JSON). | sometimes |
| [`VIDEO_UNAVAILABLE`](https://rocketyard.dev/errors#video-unavailable) | The video is private, removed, age-restricted or otherwise not available without signing in. | no |

### Limits

- No search, comments, transcripts or captions: it reads the videos you list. With the add-on you get the comment count, not the comments.
- `chapters` are the timestamps the creator lists in the description; YouTube's automatic "key moments" are not included.
- Comment counts and channel subscriber counts (add-on) are as YouTube displays them; it rounds large numbers (2.4M).
- Private, removed and missing videos return an error item with the code `VIDEO_UNAVAILABLE` and are not charged. Age-restricted videos keep their details, with `isAgeRestricted` set.
- YouTube may answer an IP address with a bot check or without the video data. The Actor then asks once more from a residential IP address; a video still walled off returns a free `BLOCKED` error item, so run it again later. The Actor never solves bot checks.

### Pricing

Pay per result: **$1.00 per 1,000 videos**, plus a tiny per-run start fee. Optional: **Comment count and channel stats** (`includeEngagement`): $0.80 per 1,000 videos, charged only for the videos it was delivered for. Videos that cannot be read produce an error item, which is not charged. There is no monthly rental, and you can cap spend per run with **Max results** or **Maximum cost per run**.

### Integrations and API

Run it from the [Apify API](https://docs.apify.com/api/v2), the JavaScript/Python clients, Make, Zapier, n8n, LangChain or any MCP-compatible AI agent, and send results to Google Sheets, webhooks, S3 and more. Schedule it to track changes over time.

### FAQ

**Which videos does it work on?** Any public YouTube video or Short: watch URLs, Shorts URLs, youtu.be links, embed and live URLs, or bare video IDs.

**How exact are the numbers?** View and like counts are exact, as YouTube publishes them for the video at the time of the run. The comment count and the channel subscriber count (add-on) are what YouTube displays, which it rounds for large numbers (2.4M).

**Why are comments and channel stats an add-on?** They are not in the player endpoint's answer. The Actor gets them from the next endpoint, whose answer is about ten times larger, so they cost one more request per video and are charged only when you turn them on and only for the videos they were read for.

**Does it scrape comments, transcripts or search results?** No. It reads the details of the videos you list. The add-on gives the comment count, not the comments.

**Does it download videos?** No. It returns data about videos, never the video or audio files.

**How much does it cost?** You pay per result: $1.00 per 1,000 videos, plus a start fee of $0.00005 per run, with no subscription. Cap any run with **Maximum cost per run**.

**How do I call it from the API?** One request starts a run and returns its results, using your [Apify API token](https://console.apify.com/settings/integrations):

```bash
curl -X POST "https://api.apify.com/v2/acts/rocketyard~youtube-video-scraper/run-sync-get-dataset-items" -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" -d '{"startUrls":[{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}],"videoIds":["eSGqW_VMMXQ"],"includeEngagement":false,"maxItems":100}'
```

**How do I use it with AI agents?** Connect Apify's MCP server at `https://mcp.apify.com?tools=rocketyard/youtube-video-scraper`, and the agent can call this Actor as a tool.

**Is it legal to scrape YouTube data?** The Actor reads the data YouTube's player endpoint gives any logged-out visitor, without logging in, without cookies and without accepting consent or solving bot checks. When YouTube walls off the IP address a video was asked from, the Actor asks once more from one residential IP address. It does not check robots.txt, and YouTube's robots.txt disallows the /youtubei/ path of that endpoint. It never plays or downloads videos, and returns no comment text and no data about commenters or viewers. You are responsible for how you use the data under YouTube's terms and the law (for example copyright and GDPR).

**What happens when an input fails?** If a video can't be read, the dataset gets one [error item](#error-items) for it with a code and the reason. Error items are free, and the other videos still run.

**I need a field that is not supported.** Open an issue on the Actor's Issues tab. Requests are reviewed regularly and drive new features.

### You might also like

- [YouTube Search API & Scraper - Videos, Shorts & Channels](https://apify.com/rocketyard/youtube-search-scraper): returns the results of YouTube searches
- [YouTube Channel Scraper - Subscribers, Views & Links](https://apify.com/rocketyard/youtube-channel-scraper): returns the public profile of YouTube channels with their latest uploads
- [Telegram Channel Scraper & API - Public Posts, Views & Links](https://apify.com/rocketyard/telegram-channel-scraper): returns the public posts of Telegram channels
- [App Store Reviews API & Scraper - Ratings, Text & Versions](https://apify.com/rocketyard/app-store-reviews-scraper): returns the public reviews of any App Store app, with star ratings, text, app versions and dates
- [Article Scraper - Any Website (Schema.org)](https://apify.com/rocketyard/article-schema-scraper): article data from any website with schema.org markup

### Made by Rocketyard

[Rocketyard](https://rocketyard.dev) builds pay-per-result scrapers for public web data, and every release is tested on live pages before it ships. Guides for this Actor: [overview](https://rocketyard.dev/youtube-video-scraper), [REST API](https://rocketyard.dev/youtube-video-scraper#api), [MCP for AI agents](https://rocketyard.dev/youtube-video-scraper#mcp) and [n8n, Make and Zapier](https://rocketyard.dev/youtube-video-scraper#automation).

# Actor input Schema

## `startUrls` (type: `array`):

YouTube video URLs: watch pages, Shorts, youtu.be links, embeds or live URLs (e.g. https://www.youtube.com/watch?v=dQw4w9WgXcQ). Leave empty if you use Video IDs.

## `videoIds` (type: `array`):

11-character video IDs, e.g. "dQw4w9WgXcQ" for https://www.youtube.com/watch?v=dQw4w9WgXcQ.

## `includeEngagement` (type: `boolean`):

Also read each video's comment count and its channel's subscribers, verified badge and collaborators: one more request per video, charged as its own event only for the videos it was read for (see Pricing).

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

Stop after this many videos.

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

Videos read in parallel. Requests to YouTube stay 300 to 800 ms apart either way.

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

Optional proxy.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    }
  ],
  "includeEngagement": false,
  "maxItems": 100,
  "maxConcurrency": 3
}
```

# Actor output Schema

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

One record per YouTube video, plus a free error item for each input that yielded no data, as JSON, CSV or Excel.

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

Videos read, error items, why the run stopped and how long it took.

# 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 = {
    "startUrls": [
        {
            "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("rocketyard/youtube-video-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 = { "startUrls": [{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }] }

# Run the Actor and wait for it to finish
run = client.actor("rocketyard/youtube-video-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 '{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    }
  ]
}' |
apify call rocketyard/youtube-video-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rocketyard/youtube-video-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/aB1fjqFBB836IrkPU/builds/wfcxwuHZNPNYdgTkU/openapi.json
