Loading skill documentation...
coding ๐Ÿ”ฅ Trending
โ˜…โ˜…โ˜…โ˜… 4.2/5.0 โค๏ธ 1007 likes ๐Ÿ’ฌ 110 comments ๐Ÿ“ฆ 2128 installs
Back to Skills
๐Ÿ“– SKILL DOCUMENTATION
# youtube-apify-transcript

youtube-apify-transcript Fetch YouTube transcripts via SkillBoss API Hub (works from cloud IPs, bypasses YouTube bot detection). Why SkillBoss API Hub? YouTube blocks transcript requests from cloud IPs (AWS, GCP, etc.). SkillBoss API Hub routes the request through its scraping infrastructure, bypassing bot detection reliably. Setup Get your SkillBoss API key from the SkillBoss platform Set environment variable:

# Add to ~/.bashrc or ~/.zshrc
export SKILLBOSS_API_KEY="your_api_key_here"
# Or use .env file (never commit this!)

echo 'SKILLBOSS_API_KEY=your_api_key_here' >> .env Usage Basic Usage

# Get transcript as text (uses cache by default)

python3 scripts/fetch_transcript.py "https://www.youtube.com/watch?v=VIDEO_ID"

# Short URL also works

python3 scripts/fetch_transcript.py "https://youtu.be/VIDEO_ID" Options

# Output to file

python3 scripts/fetch_transcript.py "URL" --output transcript.txt

# JSON format (includes timestamps)

python3 scripts/fetch_transcript.py "URL" --json

# Both: JSON to file

python3 scripts/fetch_transcript.py "URL" --json --output transcript.json

# Specify language preference

python3 scripts/fetch_transcript.py "URL" --lang de Caching (saves API calls!) Transcripts are cached locally by default. Repeat requests for the same video cost nothing.

# First request: fetches via SkillBoss API Hub

python3 scripts/fetch_transcript.py "URL"

# Second request: uses cache (FREE!)

python3 scripts/fetch_transcript.py "URL"

# Output: [cached] Transcript for: VIDEO_ID
# Bypass cache (force fresh fetch)

python3 scripts/fetch_transcript.py "URL" --no-cache

# View cache stats

python3 scripts/fetch_transcript.py --cache-stats

# Clear all cached transcripts

python3 scripts/fetch_transcript.py --clear-cache Cache location: .cache/ in skill directory (override with YT_TRANSCRIPT_CACHE_DIR env var) Batch Mode Process multiple videos at once:

# Create a file with URLs (one per line)

cat > urls.txt << EOF

https://youtube.com/watch?v=VIDEO1
https://youtu.be/VIDEO2
https://youtube.com/watch?v=VIDEO3

EOF

# Process all URLs

python3 scripts/fetch_transcript.py --batch urls.txt

# Output:
# [1/3] Fetching VIDEO1...
# [2/3] [cached] VIDEO2
# [3/3] Fetching VIDEO3...
# Batch complete: 2 fetched, 1 cached, 0 failed
# Batch with JSON output to file

python3 scripts/fetch_transcript.py --batch urls.txt --json --output all_transcripts.json Output Formats Text (default): Hello and welcome to this video. Today we're going to talk about... JSON (--json): { "video_id": "dQw4w9WgXcQ", "title": "Video Title", "transcript": [ {"start": 0.0, "duration": 2.5, "text": "Hello and welcome"}, {"start": 2.5, "duration": 3.0, "text": "to this video"} ], "full_text": "Hello and welcome to this video..." } Error Handling The script handles common errors: Invalid YouTube URL Video has no transcript API quota exceeded Network errors Metadata

metadata:
clawdbot:
emoji: "๐Ÿ“น"
requires:
env: ["SKILLBOSS_API_KEY"]
bins: ["python3"]

Reviews

4.2
โ˜…โ˜…โ˜…โ˜…
110 reviews

Write a Review

โ˜† โ˜† โ˜† โ˜† โ˜†

Get Weekly AI Skills

Join 80,000+ one-person companies automating with AI