# YouTube Video and Shorts Details Scraper (`arjun_code/youtube-video-details-scraper`) Actor

Extract public metadata from YouTube video and Shorts URLs or IDs. Get titles, descriptions, thumbnails, views, likes, comment counts, dates, duration, tags, chapters, availability, and basic channel data. Each input returns a detail record or clear lookup status—no YouTube API key required.

- **URL**: https://apify.com/arjun\_code/youtube-video-details-scraper.md
- **Developed by:** [Arjun AI](https://apify.com/arjun_code) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 youtube video or short details

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

### Get YouTube video and Shorts metadata

Turn known YouTube video or Shorts links into clean, analysis-ready metadata. Add watch URLs, Shorts URLs, `youtu.be` links, embed or live URLs, or bare 11-character IDs and receive one visible Dataset outcome for every unique content ID.

The Actor automatically identifies standard videos and native Shorts. It returns detailed content metadata and a compact basic channel profile from the same lookup, without expanding the channel into unrelated content records. No YouTube Data API key is required.

### Why use this Actor?

- **Direct lookup:** resolve content you already know without running a keyword search first.
- **Videos and native Shorts:** the result type comes from YouTube metadata rather than a duration guess.
- **Useful engagement data:** export views, likes, comment counts, duration, dates, tags, categories, and chapters when publicly available.
- **Basic creator context:** each resolved item includes channel ID, name, handle, URL, subscriber count, and verification status.
- **Compact output:** one thumbnail URL and a concise channel object instead of large format, subtitle, or thumbnail arrays.
- **One visible outcome per content ID:** invalid, missing, private, unavailable, request-blocked, failed, and charge-limited lookups receive structured Dataset status rows.

### Choose the right YouTube Actor

| Goal | Recommended Actor |
|---|---|
| Get details for known video or Shorts URLs or IDs | This Actor |
| Discover videos, Shorts, or channels by keyword | [YouTube Search Scraper](https://apify.com/arjun_code/youtube-search-scraper) |
| Export public comments and replies | [YouTube Comments Scraper](https://apify.com/arjun_code/youtube-comments-scraper) |
| Enrich known channels with full public profiles | [YouTube Channel Details Scraper](https://apify.com/arjun_code/youtube-channel-details-scraper) |
| Export a known channel's videos, Shorts, and streams | [YouTube Channel Content Scraper](https://apify.com/arjun_code/youtube-channel-content-scraper) |

### Input

The Actor has one input field, `videos`. Add one value per line, with up to 50 unique inputs in a run.

| Supported input | Example |
|---|---|
| Video ID | `FkgVB19I6xw` |
| Watch URL | `https://www.youtube.com/watch?v=FkgVB19I6xw` |
| Short URL | `https://www.youtube.com/shorts/cjSKS1D9Kow` |
| Short link | `https://youtu.be/FkgVB19I6xw` |
| Embed URL | `https://www.youtube.com/embed/FkgVB19I6xw` |
| Live URL | `https://www.youtube.com/live/VIDEO_ID` |

Example input:

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=FkgVB19I6xw",
    "https://www.youtube.com/shorts/cjSKS1D9Kow"
  ]
}
```

Different URL forms that resolve to the same 11-character ID are processed once.

### How to use it

1. Open the Actor input page.
2. Paste one or more YouTube URLs or IDs into **Video or Shorts URLs / IDs**.
3. Click **Start**.
4. Review the live table in the **Output** tab or export the Dataset as JSON, CSV, Excel, XML, or JSONL.
5. Use the Dataset API, schedules, webhooks, or integrations to connect the results to your workflow.

### Output examples

The selected values below came from a real Apify cloud run on September 2, 2026. Public metrics change over time.

#### Standard video

```json
{
  "recordType": "video",
  "status": "complete",
  "inputValue": "https://www.youtube.com/watch?v=FkgVB19I6xw",
  "inputType": "watchUrl",
  "videoId": "FkgVB19I6xw",
  "url": "https://www.youtube.com/watch?v=FkgVB19I6xw",
  "title": "NASA's Roman Space Telescope: A New Perspective on the Cosmos (Official NASA Trailer)",
  "durationSeconds": 46,
  "durationText": "46",
  "uploadDate": "2026-08-24",
  "publishedAt": "2026-08-24T21:00:22Z",
  "viewCount": 136535,
  "likeCount": 2027,
  "commentCount": null,
  "liveStatus": "not_live",
  "availability": "public",
  "videoLanguage": "en-US",
  "categories": ["Science & Technology"],
  "channelProfile": {
    "channelId": "UCLA_DiR1FfKNvjuUpBHmylQ",
    "channelName": "NASA",
    "channelHandle": "@NASA",
    "channelUrl": "https://www.youtube.com/channel/UCLA_DiR1FfKNvjuUpBHmylQ",
    "subscriberCount": 15100000,
    "isVerified": true
  }
}
```

#### Native Short

```json
{
  "recordType": "short",
  "status": "complete",
  "inputValue": "https://www.youtube.com/shorts/cjSKS1D9Kow",
  "inputType": "shortUrl",
  "videoId": "cjSKS1D9Kow",
  "url": "https://www.youtube.com/shorts/cjSKS1D9Kow",
  "durationSeconds": 29,
  "durationText": "29",
  "uploadDate": "2025-02-21",
  "viewCount": 59142,
  "likeCount": 2343,
  "commentCount": 96,
  "categories": ["Science & Technology"],
  "channelProfile": {
    "channelId": "UCiGWNa6QK6CiKPvv5-YPv8g",
    "channelName": "Sabrina Ramonov 🍄",
    "channelHandle": "@sabrina_ramonov",
    "subscriberCount": 378000,
    "isVerified": true
  }
}
```

### Output fields

| Group | Fields |
|---|---|
| Result status | `recordType`, `status`, `inputValue`, `inputType`, `scrapedAt` |
| Identity | `videoId`, `url`, `title`, `description`, `thumbnailUrl` |
| Time | `durationSeconds`, `durationText`, `uploadDate`, `publishedAt` |
| Engagement | `viewCount`, `likeCount`, `commentCount`, `concurrentViewCount` |
| Availability | `liveStatus`, `availability`, `ageLimit`, `playableInEmbed` |
| Classification | `videoLanguage`, `license`, `location`, `tags`, `categories`, `chapters` |
| Basic channel profile | `channelId`, `channelName`, `channelHandle`, `channelUrl`, `subscriberCount`, `isVerified` |

`chapters` contains the chapter title plus start and end times in seconds. The Actor does not return media download formats, expiring stream URLs, transcripts, subtitle files, comment text, or the full channel About profile.

### Missing fields

YouTube does not expose every field for every item. Likes can be hidden, comments can be disabled, subscriber totals can be hidden or rounded, tags can be absent, and live-only fields are normally empty for uploaded videos. In those cases the Actor returns `null` or an empty array instead of inventing a value or converting missing data to zero.

### Lookup-status rows

The Dataset does not remain silently empty when an input cannot be resolved. It receives a compact status row such as:

```json
{
  "recordType": "contentLookupError",
  "status": "notFound",
  "inputValue": "aaaaaaaaaaa",
  "inputType": "videoId",
  "videoId": "aaaaaaaaaaa",
  "errorCode": "CONTENT_NOT_FOUND",
  "errorMessage": "ERROR: [youtube] aaaaaaaaaaa: This video is unavailable",
  "suggestion": "Check the 11-character ID or provide a complete YouTube URL."
}
```

Possible statuses are `invalidInput`, `notFound`, `private`, `unavailable`, `requestBlocked`, `failed`, and `chargeLimitReached`. `requestBlocked` means YouTube rejected the network session with an automated-traffic challenge; it does not mean the content is unavailable. Retry the input in a new run if this temporary status occurs. These status rows do not trigger the successful-content custom billing event.

The default Key-Value Store record named `OUTPUT` also contains run totals and a compact result for every processed input.

### Run through the Apify API

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/arjun_code~youtube-video-details-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "videos": [
      "FkgVB19I6xw",
      "https://www.youtube.com/shorts/cjSKS1D9Kow"
    ]
  }'
```

### Pricing

This Actor uses pay-per-event pricing:

- **Actor start:** $0.00005 per run.
- **Successful video or Shorts detail:** $0.003 per result.
- Invalid, missing, private, unavailable, request-blocked, failed, and charge-limited status records are not charged as successful details.
- Platform usage is currently charged separately and varies with compute, storage operations, data transfer, and the network route required by YouTube.

Example event charges for one run, excluding variable platform usage:

| Successful details | Approximate charge |
|---:|---:|
| 1 | $0.00305 |
| 10 | $0.03005 |
| 50 | $0.15005 |

The Actor honors the user-defined maximum event-charge limit and stops producing additional billable results when the limit is reached. A lookup-status row can still have platform usage because the YouTube request has already consumed network and compute resources, even though no successful-detail event is charged. The Actor's **Pricing** tab remains the source of truth if prices change later.

### Ready-to-run examples

- [Get YouTube Video Metadata from a URL or ID](https://apify.com/arjun_code/youtube-video-details-scraper/examples/get-youtube-video-metadata)
- [Get YouTube Shorts Details from a URL or ID](https://apify.com/arjun_code/youtube-video-details-scraper/examples/get-youtube-shorts-details)

### Troubleshooting

#### The result is `requestBlocked`

YouTube rejected both bounded network attempts with an automated-traffic challenge. This is a temporary request status, not proof that the content is unavailable. Retry the public input in a new run. If it repeats, include the run ID in a support request.

#### A valid lookup takes longer than expected

The Actor first makes one datacenter attempt and switches to one residential attempt only if needed. A blocked or slow first route therefore increases runtime. Both attempts have hard time limits and there is no unbounded retry loop.

#### A completed result contains `null`

YouTube does not expose every metric for every item. Comment counts can be disabled, likes or subscriber totals can be hidden, tags and chapters can be absent, and live-only fields do not apply to ordinary uploads. Missing values remain `null` or empty instead of being invented.

#### The same ID was supplied in more than one URL format

Every unique 11-character content ID is processed once. Duplicate watch, Shorts, short-link, embed, or live URLs for the same ID do not produce duplicate rows.

### FAQ

#### Can an 11-character ID reveal whether the item is a Short?

The ID format itself cannot. The Actor resolves the content and uses YouTube's own metadata to classify it as `video` or `short`.

#### Does this Actor download the video?

No. It extracts public metadata only and does not save video or audio files.

#### Does it fetch comments or transcripts?

It returns the public comment count when available, but not comment text. Use [YouTube Comments Scraper](https://apify.com/arjun_code/youtube-comments-scraper) for comments and replies. Transcripts are outside this Actor's scope.

#### Does `channelProfile` contain the full channel About page?

No. It contains only basic channel fields available during the content lookup. Use [YouTube Channel Details Scraper](https://apify.com/arjun_code/youtube-channel-details-scraper) for a full public channel profile.

### Support

Use the Actor's **Issues** tab and include the run ID, a public example input, the expected behavior, and the relevant status or log message. Do not post API tokens or private URLs.

### Legal notice

This Actor extracts publicly available metadata. Users are responsible for following applicable laws, YouTube's terms, and data-protection requirements. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by YouTube or Google.

# Actor input Schema

## `videos` (type: `array`):

Add one value per line. Supports 11-character IDs and youtube.com/watch, youtu.be, youtube.com/shorts, youtube.com/embed, and youtube.com/live URLs.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=FkgVB19I6xw",
    "https://www.youtube.com/shorts/cjSKS1D9Kow"
  ]
}
```

# 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 = {
    "videos": [
        "https://www.youtube.com/watch?v=FkgVB19I6xw",
        "https://www.youtube.com/shorts/cjSKS1D9Kow"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("arjun_code/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 = { "videos": [
        "https://www.youtube.com/watch?v=FkgVB19I6xw",
        "https://www.youtube.com/shorts/cjSKS1D9Kow",
    ] }

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

```

## MCP server setup

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