YouTube Video Info Extractor — Metadata & Captions API avatar

YouTube Video Info Extractor — Metadata & Captions API

Pricing

from $0.02 / actor start

Go to Apify Store
YouTube Video Info Extractor — Metadata & Captions API

YouTube Video Info Extractor — Metadata & Captions API

Extract YouTube video metadata — title, channel, publish date, duration, view/like/comment counts, tags, thumbnail, transcripts/captions. No API key required — powered by yt-dlp. Supports batch processing of up to 50 videos per run.

Pricing

from $0.02 / actor start

Rating

0.0

(0)

Developer

Perry AY

Perry AY

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

2 days ago

Last modified

Share

YouTube Video Info Extractor — Metadata & Transcripts

YouTube Video Info Extractor — Metadata & Transcripts

Extract detailed metadata from YouTube videos — title, description, channel info, publish date, duration, view/like/comment counts, tags, thumbnail URL, and optional transcripts/subtitles. Whether you're building a content analysis pipeline, creating a video archive, or researching YouTube trends, this actor extracts everything you need in a single call.


What does it do?

This actor takes one or more YouTube video URLs and extracts comprehensive metadata from each one using yt-dlp — the most reliable YouTube data extraction library. For each video you get the title, channel information, publishing date, duration (ISO 8601), engagement metrics (views, likes, comments), tags, thumbnail URL, and optionally the full transcript or subtitles.

The actor handles all the edge cases: private videos, deleted content, age-restricted uploads, and region-blocked videos are caught gracefully and reported without halting the batch. Results are streamed to the dataset as each video completes, so you can start consuming data before the full batch finishes.

Concurrent processing with a configurable semaphore (max 2 simultaneous extractions) balances speed against YouTube's rate limits, and the actor charges one video-extract event per video processed.

Features

  1. Full metadata extraction — Title, channel name, channel URL, published date, ISO 8601 duration, view count, like count, comment count, tags, and thumbnail URL.
  2. Optional transcript support — Fetch video transcripts/subtitles as plain text when includeTranscript is enabled. Automatically picks English subtitles (manual or auto-generated) with fallback to any available language.
  3. Batch processing — Submit multiple YouTube URLs in a single run. Process up to 50 videos at once (configurable via maxResults).
  4. Concurrent extraction — Up to 2 simultaneous yt-dlp extractions via asyncio semaphore, balancing throughput against rate limits.
  5. Graceful error handling — Private videos, deleted content, age-restricted uploads, region blocks, and copyright takedowns are reported per-video without affecting other results in the batch.
  6. ISO 8601 durations — Video duration is returned in standard ISO 8601 format (e.g., PT5M30S, PT1H2M15S) for easy parsing.
  7. ISO 8601 timestamps — Publish dates are returned in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ).

Why use this?

ProblemSolution
You need to analyze a large set of YouTube videos programmaticallySubmit all URLs in one batch and get structured metadata for every video
You want to build a searchable video archiveExtract tags, descriptions, and transcripts for full-text indexing
You're researching content trends or channel performanceGet view counts, like counts, and comment counts for every video
You need clean transcript text for NLP or summarizationEnable transcript extraction once and get plain-text output
You're migrating or backing up YouTube content metadataBatch-extract all metadata in a structured, machine-readable format
You want to know why a video failed extractionEvery error is classified (private, deleted, age-restricted, etc.) per video

Who is it for?

PersonaWhat they use it for
Content AnalystExtracting metadata and transcripts from video playlists for trend analysis
Data EngineerBuilding ETL pipelines that ingest YouTube metadata into data warehouses
ResearcherCollecting video metadata and transcripts for academic NLP or social science research
Creator / MarketerAuditing a competitor's video library for SEO tags, engagement stats, and content patterns
Archive CuratorCataloguing video metadata before taking down or migrating content
DeveloperBuilding applications that need programmatic access to YouTube video details

Input Parameters

FieldTypeDefaultDescription
urlsarrayArray of YouTube video URLs to process (e.g., ["https://www.youtube.com/watch?v=..."])
includeTranscriptbooleanfalseWhether to fetch and include video transcript/subtitles (English preferred, auto-generated or manual)
maxResultsinteger10Maximum number of videos to process. Range: 1-50.

Example Input JSON

{
"urls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
"includeTranscript": false,
"maxResults": 10
}

Example Input with Transcript

{
"urls": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"https://www.youtube.com/watch?v=jNQXAC9IVRw"
],
"includeTranscript": true,
"maxResults": 5
}

Output Format

FieldTypeDescription
urlstringThe YouTube video URL that was processed
titlestring or nullTitle of the YouTube video
channelstring or nullName of the YouTube channel that published the video
channelUrlstring or nullURL to the YouTube channel
publishedAtstring or nullISO 8601 date when the video was published (YYYY-MM-DDTHH:MM:SSZ)
durationstring or nullVideo duration in ISO 8601 format (e.g., PT5M30S, PT1H2M15S)
viewCountinteger or nullNumber of views
likeCountinteger or nullNumber of likes
commentCountinteger or nullNumber of comments
tagsarrayArray of video tags/keywords
thumbnailUrlstring or nullURL to the video thumbnail image
transcriptstring or nullVideo transcript/subtitles as plain text (null if not requested or unavailable)
errorstring or nullError message if extraction failed (null on success)

Example Output JSON

{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"title": "Rick Astley - Never Gonna Give You Up (Official Music Video)",
"channel": "Rick Astley",
"channelUrl": "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw",
"publishedAt": "2009-10-25T00:00:00Z",
"duration": "PT3M33S",
"viewCount": 1500000000,
"likeCount": 20000000,
"commentCount": 5000000,
"tags": ["Rick Astley", "Never Gonna Give You Up", "80s", "pop", "music video"],
"thumbnailUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
"transcript": null,
"error": null
}

Example Error Output

{
"url": "https://www.youtube.com/watch?v=INVALID_ID",
"title": null,
"channel": null,
"channelUrl": null,
"publishedAt": null,
"duration": null,
"viewCount": null,
"likeCount": null,
"commentCount": null,
"tags": [],
"thumbnailUrl": null,
"transcript": null,
"error": "This video is unavailable"
}

API Usage

cURL

curl -X POST "https://api.apify.com/v2/acts/perryay~youtube-video-info-extractor/runs?token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"urls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
"includeTranscript": false,
"maxResults": 10
}'

Python (ApifyClient)

from apify_client import ApifyClient
client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("perryay~youtube-video-info-extractor").call(
run_input={
"urls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
"includeTranscript": False,
"maxResults": 10
}
)
dataset = client.dataset(run["defaultDatasetId"]).list_items()
for item in dataset.items:
title = item.get("title", "N/A")
channel = item.get("channel", "N/A")
views = item.get("viewCount", "N/A")
error = item.get("error")
if error:
print(f"[ERROR] {item['url']}: {error}")
else:
print(f"{title}{channel}{views} views")

Use Cases

  1. Content research and trend analysis — Extract metadata from hundreds of videos to analyze what drives engagement. Compare view counts, like ratios, and comment volumes across topics, channels, or time periods.

  2. Video archive and backup — Before taking down or restructuring video content, batch-extract all metadata including tags, descriptions, and timestamps for your records.

  3. NLP and transcript analysis — Enable transcript extraction to get clean text from thousands of videos. Use the text for summarization, keyword extraction, sentiment analysis, or training custom ML models.

  4. Competitive channel audit — Extract metadata from a competitor's video library to understand their content strategy — which tags they use, how long their videos are, and what engagement looks like.

  5. SEO and tag research — Collect tags from top-performing videos in your niche. Identify common keywords and patterns to optimize your own video metadata for discoverability.

  6. Playlist and channel migration — Moving content between YouTube accounts or platforms? Extract all metadata in advance to preserve titles, descriptions, and tags during the transition.

  7. Content moderation monitoring — Periodically re-check video metadata to detect changes in titles, descriptions, or availability. Flag videos that have been made private or had their metadata altered.

  8. Dataset creation for ML — Build training datasets for video recommendation systems, content classification models, or engagement prediction by extracting structured metadata at scale.

  9. Creator portfolio analysis — For content creators, analyze your own video library to see which tags, titles, and durations correlate with higher engagement. Make data-driven content decisions.

  10. Integration with data pipelines — Combine with other Apify actors (Domain Intel, Link Quality Analyzer) to build comprehensive media monitoring and analysis pipelines.

FAQ

Q: What video information can this actor extract? A: It extracts title, channel name, channel URL, published date (ISO 8601), duration (ISO 8601), view count, like count, comment count, tags, thumbnail URL, and optionally the transcript or subtitles in plain text.

Q: Does the actor download the actual video file? A: No. The actor only extracts metadata and optionally fetches subtitle text. No video or audio content is downloaded.

Q: How many URLs can I submit at once? A: The maxResults parameter caps the number of videos processed per run (default 10, max 50). The urls array can contain more entries, but only the first maxResults will be processed.

Q: How long does it take to process a video? A: Each video takes roughly 2-10 seconds depending on YouTube's response time and network conditions. The actor processes up to 2 videos concurrently. For a batch of 10 videos, expect 15-60 seconds total.

Q: How do transcripts work? A: When includeTranscript is true, the actor fetches the best available English subtitle track (manual uploads preferred, auto-generated captions as fallback). If English subtitles are unavailable, it falls back to any available language. The subtitles are converted to clean plain text.

Q: What happens if a video doesn't have subtitles? A: The transcript field will be null when no subtitles or captions are available for the video. This is not treated as an error — the rest of the metadata is returned normally.

Q: Can the actor extract info from age-restricted videos? A: Age-restricted videos return an error message: "This video is age-restricted and cannot be accessed without authentication." Other videos in the batch are unaffected.

Q: What about private, deleted, or unavailable videos? A: Each of these scenarios is detected and reported in the error field with a human-readable message. The actor continues processing the remaining URLs in the batch.

Q: Does it work with YouTube Shorts? A: Yes. YouTube Shorts URLs (e.g., https://www.youtube.com/shorts/...) are supported and return the same metadata structure as regular videos.

Q: Can I extract metadata from a YouTube playlist? A: This actor processes individual video URLs, not playlists. To extract metadata from an entire playlist, provide each video URL in the urls array. For playlist-level extraction, consider dedicated YouTube playlist tools.

Q: Does the actor require a YouTube API key? A: No. The actor uses yt-dlp, which extracts publicly available metadata without requiring API keys or OAuth authentication.

Q: What error types are handled? A: The actor handles: private videos, deleted/removed videos, age-restricted content, copyright-blocked videos, region-unavailable content, members-only videos, sign-in-required content, and general network/parsing errors. Each is returned with a descriptive error message per video.

Q: What's the concurrency limit and why? A: The actor limits simultaneous extractions to 2 to stay within YouTube's comfortable rate limit boundaries. Higher concurrency would risk rate limiting and would not meaningfully improve throughput.

Q: Can I run this actor on a schedule? A: Yes. The actor has a fully documented API and can be integrated into any automation workflow, scheduler, or CI/CD pipeline via the Apify API.

Usage & Billing

This actor uses Apify's PAY_PER_EVENT pricing model. You are charged per event:

Event NamePrice (USD)Trigger
apify-actor-start$0.020Charged on every actor start
video-extract$0.010Charged per video processed
transcript-fetch$0.010Charged when transcript is fetched
batch-extract$0.005Charged per batch run (multiple videos)

Platform infrastructure costs (Apify's compute and storage) are passed through at cost.

MCP Integration

This actor can be used through the Apify MCP server. Once connected, your MCP client (Claude Desktop, Cursor, etc.) can discover and run this actor from the Apify Store.

Quick Start

  1. Install the Apify connector in your MCP client:

    • Claude Desktop: Search for "Apify" in the connector directory, or use the remote server at https://mcp.apify.com
    • Other clients: See the Apify MCP server docs for setup instructions
  2. Ask your AI assistant to use the actor.

Claude Desktop Configuration

Add the following to your claude_desktop_config.json:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com"
}
}
}

On first connection, your browser opens to sign in to Apify and authorize access.

Bearer Token Alternative

For MCP clients that do not support browser-based OAuth (e.g., Cursor, VS Code, Windsurf), use a Bearer token directly:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com",
"headers": {
"Authorization": "Bearer <APIFY_TOKEN>"
}
}
}
}

Replace <APIFY_TOKEN> with your actual Apify API token from Apify Console.

  • Meta Mate — Extract Open Graph, Twitter Cards, and JSON-LD metadata from URLs
  • Link Quality Analyzer — Deep analysis of links including HTTP status, redirect chains, and security posture
  • Domain Intel — WHOIS lookups, DNS enumeration, and SSL certificate validation for brand protection and domain research
  • UUID Lab — Generate and decode UUID v4, v7, and nanoid identifiers for consistent cross-platform user and session tracking
  • Social Media Username Checker — Check username availability across 50+ social media platforms
  • JSON Studio — Format, validate, diff, transform, and explore JSON documents
  • QR Craft — Generate high-quality QR codes in PNG or SVG format