# YouTube Video Description Extractor (`w3crawler/youtube-description-extractor`) Actor

Extract complete descriptions from YouTube videos automatically. Perfect for content analysis, SEO research, and marketing insights. Supports batch processing with proxy integration.

- **URL**: https://apify.com/w3crawler/youtube-description-extractor.md
- **Developed by:** [w3crawler](https://apify.com/w3crawler) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 video descriptions

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Description Extractor

Extract full public YouTube video descriptions and source-provided metadata from watch-page HTML. The actor uses ordinary public HTTP requests and does not use private YouTube clients, browser fingerprinting, stealth controls, or credential discovery.

### Features

- Accepts watch, Shorts, live, embed, youtu.be URLs, and bare 11-character video IDs.
- Deduplicates inputs and applies a bounded item limit, retry count, delay, and timeout.
- Captures the description, description length, hashtags, links, tags, title, channel identity, subscriber text, thumbnails, views, likes, comments, duration, publication dates, category, live state, age/safety flags, and provenance.
- Emits exact four-field diagnostics (`url`, `error`, `errorCode`, `scrapedAt`) for failed public pages when diagnostics are enabled.
- Writes a validated `OUTPUT` run summary with item, request, failure, blocked, and proxy counters.
- Supports direct access and an explicitly configured standard Apify Proxy route or fallback.

### Input

| Field | Type | Default | Description |
|---|---|---:|---|
| `videoUrls` | array | — | Public YouTube URLs or IDs. |
| `videoIds` | array | — | Additional bare 11-character IDs. |
| `maxItems` | integer | `50` | Maximum unique videos, from 1 to 200. |
| `includeDiagnostics` | boolean | `true` | Include one diagnostic row for a failed input/page. |
| `enableProxyFallback` | boolean | `true` | Try the configured Apify Proxy after direct access fails. |
| `maxRetries` | integer | `2` | Retries per public page, from 0 to 3. |
| `requestDelayMs` | integer | `250` | Delay between requests, from 0 to 5000 ms. |
| `requestTimeoutSecs` | integer | `60` | Request timeout, from 15 to 180 seconds. |
| `proxyConfiguration` | object | — | Standard Apify Proxy options. Proxy URLs must be credential-free. |

At least one of `videoUrls` or `videoIds` is required. The runtime rejects unknown fields, unrelated URLs, credentials, and unsafe proxy options before network work begins.

### Dataset record

Successful records use `recordType: "youtube_video_description"` and include:

`videoId`, `originalUrl`, `url`, `sourceUrl`, `title`, `description`, `descriptionLength`, `hashtags`, `hashtagCount`, `links`, `linkCount`, `tags`, `channelName`, `channelId`, `channelUrl`, `subscriberCountText`, `avatarUrl`, `thumbnail`, `thumbnails`, `thumbnailCount`, `viewCount`, `likeCount`, `commentCount`, `durationSeconds`, `duration`, `publishedDate`, `uploadDate`, `category`, `isLive`, `isLiveNow`, `isUpcoming`, `ageRestricted`, `isFamilySafe`, `isCrawlable`, `licensedContent`, `allowRatings`, `metadataSource`, `extractionMethod`, `sourceType`, `source`, and `scrapedAt`.

If a public source does not expose an optional field, it is omitted. Empty descriptions are represented by `descriptionLength: 0`; no fabricated or private values are added.

### Local verification

```powershell
npm ci
npm test
npx --yes apify validate-schema .actor/input_schema.json
npx --yes apify run --purge --input-file qa-inputs/youtube-description-extractor/local-validation.json
npm run validate-dataset
```

The cloud QA input enables the standard Apify Proxy route. After deployment, call the actor with the direct and cloud QA inputs and inspect the dataset plus `OUTPUT` key-value record.

# Changelog

This Actor's version history is a separate document: https://apify.com/w3crawler/youtube-description-extractor/changelog.md

# Actor input Schema

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

YouTube watch, Shorts, live, embed, youtu.be URLs, or bare 11-character IDs.

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

Additional bare 11-character YouTube video IDs; values are deduplicated with videoUrls.

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

Maximum unique videos processed.

## `includeDiagnostics` (type: `boolean`):

Store exact four-field diagnostics for failed or blocked public watch pages.

## `enableProxyFallback` (type: `boolean`):

Try the configured standard Apify Proxy route after direct access fails.

## `maxRetries` (type: `integer`):

Bounded retry attempts after a failed public request.

## `requestDelayMs` (type: `integer`):

Bounded delay between public watch-page requests.

## `requestTimeoutSecs` (type: `integer`):

Timeout for one public watch-page request.

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

Optional standard Apify Proxy configuration. Proxy URLs must be credential-free.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxItems": 50,
  "includeDiagnostics": true,
  "enableProxyFallback": true,
  "maxRetries": 2,
  "requestDelayMs": 250,
  "requestTimeoutSecs": 60,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `keyValueStore` (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=dQw4w9WgXcQ"
    ],
    "maxItems": 50,
    "includeDiagnostics": true,
    "enableProxyFallback": true,
    "maxRetries": 2,
    "requestDelayMs": 250,
    "requestTimeoutSecs": 60,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("w3crawler/youtube-description-extractor").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"],
    "maxItems": 50,
    "includeDiagnostics": True,
    "enableProxyFallback": True,
    "maxRetries": 2,
    "requestDelayMs": 250,
    "requestTimeoutSecs": 60,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("w3crawler/youtube-description-extractor").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"
  ],
  "maxItems": 50,
  "includeDiagnostics": true,
  "enableProxyFallback": true,
  "maxRetries": 2,
  "requestDelayMs": 250,
  "requestTimeoutSecs": 60,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call w3crawler/youtube-description-extractor --silent --output-dataset

```

## MCP server setup

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

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/nW3TYH0sy55EGUX6w/builds/0lJLG5wTvK1ukRr0S/openapi.json
