creator-stack/skills/youtube-data/SKILL.md
Retrieve YouTube data using the YouTube Data API. Use when you need to search videos, get video or channel details, fetch transcripts, read comments, find trending or related content, or when the user mentions 'YouTube data', 'video stats', 'transcript', or 'channel info'.
npx skillsauth add kenneth-liao/ai-launchpad-marketplace youtube-dataInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Retrieve data from the YouTube Data API v3. Supports searching videos, fetching video/channel details, reading transcripts and comments, and discovering trending or related content.
Core principle: Data retrieval only — this skill fetches and returns structured data. It does not produce written content or visual assets.
YOUTUBE_API_KEY — Set in environment or ~/.claude/.env. Get from Google Cloud Consoleuv (recommended) or Python 3.10+ with dependencies installedWith uv (recommended — zero setup):
Dependencies are declared inline via PEP 723 and auto-installed on first run. Just use uv run.
With pip (fallback):
pip install -r ${CLAUDE_SKILL_DIR}/requirements.txt
uv run ${CLAUDE_SKILL_DIR}/scripts/youtube_api.py search "python tutorial" --max-results 5
uv run ${CLAUDE_SKILL_DIR}/scripts/youtube_api.py video "dQw4w9WgXcQ"
uv run ${CLAUDE_SKILL_DIR}/scripts/youtube_api.py transcript "dQw4w9WgXcQ" --language en
uv run ${CLAUDE_SKILL_DIR}/scripts/youtube_api.py channel "UC_x5XG1OV2P6uZZ5FSM9Ttw"
uv run ${CLAUDE_SKILL_DIR}/scripts/youtube_api.py comments "dQw4w9WgXcQ" --max-results 10 --include-replies
uv run ${CLAUDE_SKILL_DIR}/scripts/youtube_api.py related "dQw4w9WgXcQ" --max-results 5
uv run ${CLAUDE_SKILL_DIR}/scripts/youtube_api.py trending --region US --max-results 10
uv run ${CLAUDE_SKILL_DIR}/scripts/youtube_api.py enhanced-transcript "vid1" "vid2" \
--format merged --include-metadata --language en
scripts/youtube_api.pySelf-contained YouTube Data API script with 8 subcommands.
| Subcommand | Description |
|---|---|
| search | Search for YouTube videos with advanced filtering |
| video | Get detailed information about a video |
| channel | Get detailed information about a channel |
| comments | Get comments for a video |
| transcript | Get transcript/captions for a video |
| related | Get videos related to a specific video |
| trending | Get trending videos by region |
| enhanced-transcript | Advanced multi-video transcript with filtering |
searchyoutube_api.py search QUERY [OPTIONS]
Arguments:
QUERY Search query string
Options:
--max-results N Number of results (default: 10, max: 50)
--channel-id ID Filter by channel
--order ORDER Sort: date, rating, viewCount, relevance, title
--duration DURATION Filter: short (<4min), medium (4-20min), long (>20min)
--published-after DATE ISO date filter (e.g. 2024-01-01T00:00:00Z)
--published-before DATE ISO date filter
--region CODE ISO country code (e.g. US, GB, JP)
videoyoutube_api.py video VIDEO_ID
Returns: title, description, publish date, channel, tags, view/like/comment counts, duration, thumbnails.
channelyoutube_api.py channel CHANNEL_ID
Returns: title, description, subscriber/video/view counts, custom URL, thumbnails.
commentsyoutube_api.py comments VIDEO_ID [OPTIONS]
Options:
--max-results N Number of comments (default: 20)
--order ORDER Sort: relevance (default) or time
--include-replies Include reply threads
--page-token TOKEN Pagination token
transcriptyoutube_api.py transcript VIDEO_ID [OPTIONS]
Options:
--language CODE Language code (e.g. en, ko, fr)
Returns: timestamped segments and full text with timestamps.
relatedyoutube_api.py related VIDEO_ID [OPTIONS]
Options:
--max-results N Number of results (default: 10)
trendingyoutube_api.py trending [OPTIONS]
Options:
--region CODE ISO country code (default: US)
--max-results N Number of results (default: 5)
enhanced-transcriptyoutube_api.py enhanced-transcript VIDEO_ID [VIDEO_ID...] [OPTIONS]
Arguments:
VIDEO_IDS One or more video IDs (max 5)
Options:
--language CODE Language code
--format FORMAT Output: raw, timestamped (default), merged
--start-time SECONDS Filter from this time
--end-time SECONDS Filter until this time
--search QUERY Search within transcript text
--case-sensitive Case-sensitive search
--segment-method METHOD Segmentation: equal (default), smart
--segment-count N Number of segments (default: 1)
--include-metadata Include video details with transcript
All subcommands output JSON to stdout with this consistent structure:
{
"success": true,
"data": { ... },
"error": null,
"metadata": {
"timestamp": "2025-01-26T12:00:00",
...
}
}
On failure, success is false, data is null, and error contains the message. Exit code is 0 on success, 1 on failure.
import sys
from pathlib import Path
sys.path.insert(0, str(Path("${CLAUDE_SKILL_DIR}/scripts")))
from youtube_api import search_videos, get_video_details, get_video_transcript
# Search videos
result = search_videos("python tutorial", max_results=5)
# Get video details
result = get_video_details("dQw4w9WgXcQ")
# Get transcript
result = get_video_transcript("dQw4w9WgXcQ", language="en")
| Function | Description |
|---|---|
| search_videos(query, ...) | Search YouTube videos |
| get_video_details(video_id) | Get video details |
| get_channel_details(channel_id) | Get channel details |
| get_video_comments(video_id, ...) | Get video comments |
| get_video_transcript(video_id, ...) | Get video transcript |
| get_related_videos(video_id, ...) | Get related videos |
| get_trending_videos(region, ...) | Get trending videos |
| get_enhanced_transcript(video_ids, ...) | Enhanced multi-video transcript |
All functions return the same {success, data, error, metadata} dict.
result=$(uv run ${CLAUDE_SKILL_DIR}/scripts/youtube_api.py search "AI tutorials" --max-results 5)
echo "$result" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['data']['items'][0]['title'])"
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "google-api-python-client>=2.169.0",
# "youtube-transcript-api>=1.0.3",
# "python-dotenv>=1.1.0",
# ]
# ///
import sys
from pathlib import Path
sys.path.insert(0, str(Path("${CLAUDE_SKILL_DIR}/scripts")))
from youtube_api import search_videos, get_video_transcript
def research_topic(topic: str, count: int = 10) -> list:
"""Search and get transcripts for top videos on a topic."""
search_result = search_videos(topic, max_results=count)
if not search_result["success"]:
return []
videos = search_result["data"]["items"]
for v in videos:
t = get_video_transcript(v["videoId"], language="en")
v["transcript"] = t["data"]["text"] if t["success"] else None
return videos
| Variable | Description | Default |
|----------|-------------|---------|
| YOUTUBE_API_KEY | YouTube Data API v3 key | Required |
"uv: command not found"
curl -LsSf https://astral.sh/uv/install.sh | sh or brew install uv"Required packages not installed"
uv run instead of python3 to auto-install dependenciespip install -r ${CLAUDE_SKILL_DIR}/requirements.txt"YOUTUBE_API_KEY environment variable not set"
YOUTUBE_API_KEY in your shell, ~/.claude/.env, or local .env"HttpError 403: quotaExceeded"
"No transcript available"
--language codedevelopment
Manage scheduled Claude Code tasks — add (recurring or one-off), list, pause, resume, remove, view results, and test execution of skills, prompts, and scripts with safety controls and notifications. Use when the user mentions scheduling, cron, automated tasks, recurring tasks, background tasks, running something on a schedule, periodic execution, or wants a skill/prompt/script to run automatically at a set time. Cross-platform (macOS, Linux, Windows).
tools
Upgrade a plugin's skills, hooks, and patterns to align with latest Claude Code capabilities and best practices. Use when a plugin needs modernization, after Claude Code updates, or when the user says "upgrade plugin", "modernize plugin", or "update plugin to latest patterns".
tools
Use when reviewing how skills performed during a session, when the user wants to analyze skill invocations and identify improvements, or when the user says "skill retro", "review skills", "how did skills do", "improve this skill", or "skill retrospective".
tools
Run or generate test suites for any skill. Use when testing a skill before deployment, after making changes, before/after plugin upgrades, when validating skill behavior, or when the user says "test skill", "run skill tests", "generate tests for skill", or "check for regressions".