🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Youtube Master

by @tevfikgulep

Get YouTube video info, statistics, descriptions, thumbnails, and optionally transcripts. Uses YouTube Data API (free) for basic info and Apify (optional) fo...

Versionv1.0.2
Downloads730
Installs2
Stars⭐ 2
TERMINAL
clawhub install youtube-master

πŸ“– About This Skill


name: youtube-master description: Get YouTube video info, statistics, descriptions, thumbnails, and optionally transcripts. Uses YouTube Data API (free) for basic info and Apify (optional) for transcripts. metadata: { "openclaw": { "emoji": "🎬", "requires": { "env": ["YOUTUBE_API_KEY", "APIFY_TOKEN"] }, "install": [ { "id": "youtube_api", "kind": "env", "label": "YouTube Data API Key (YOUTUBE_API_KEY)" }, { "id": "apify_token", "kind": "env", "label": "Apify API Token (APIFY_TOKEN) - Optional for transcripts" } ] } }

🎬 YouTube Master

Get comprehensive YouTube video data including metadata, statistics, descriptions, thumbnails, and optionally transcripts.

Why This Skill?

YouTube videos require multiple APIs to get complete data. This skill intelligently uses:

  • YouTube Data API (FREE) β†’ Video metadata, stats, description
  • Apify API (OPTIONAL) β†’ Only when transcripts requested
  • Advantages

    πŸ’° Cost Effective

  • Default: YouTube API only (free quota)
  • Transcript: Only 1 Apify request when explicitly requested
  • No wasted API calls
  • ⚑ Fast Performance

  • YouTube API: ~200ms response
  • Apify: Only loads when needed
  • πŸ“Š Complete Data

    | Data | Source | |------|--------| | Title | βœ… YouTube API | | Description | βœ… YouTube API | | Channel Name | βœ… YouTube API | | View Count | βœ… YouTube API | | Like Count | βœ… YouTube API | | Comment Count | βœ… YouTube API | | Upload Date | βœ… YouTube API | | Thumbnail URL | βœ… YouTube API | | Tags | βœ… YouTube API | | Transcript | βœ… Apify (on demand) |

    How It Works

    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚  Input: URL└────────┬/ID   β”‚
    β”€β”€β”€β”€β”€β”€β”€β”€β”˜
             β”‚
             β–Ό
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚ YouTube API    β”‚ ◄── FREE, always runs
    β”‚ (viewCount,    β”‚
    β”‚  description,   β”‚
    β”‚  title, etc.)  β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
             β”‚
        β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”
        β”‚         β”‚
        β–Ό         β–Ό
    β”Œβ”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚ --    β”‚ β”‚ --transcript β”‚
    β”‚info   β”‚ β”‚ is requested β”‚
    β”‚only   β”‚ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
    β””β”€β”€β”€β”¬β”€β”€β”€β”˜        β”‚
        β”‚            β–Ό
        β”‚    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚    β”‚ Apify API      β”‚ ◄── Only runs if
        β”‚    β”‚ (transcript)   β”‚     explicitly asked
        β”‚    β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚             β”‚
        β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
              β”‚
              β–Ό
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚   Full Output   β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    

    Credentials Setup

    Option 1: Environment Variables

    export YOUTUBE_API_KEY="AIzaSy..."
    export APIFY_TOKEN="apify_api_..."
    

    Option 2: Credentials File (Recommended)

    Add to ~/.openclaw/workspace/credentials/api-credentials.json:

    {
      "google": {
        "api_key": "AIzaSy..."
      },
      "apify": {
        "api_key": "apify_api_..."
      }
    }
    

    Getting YouTube API Key

    1. Go to Google Cloud Console 2. Create a project 3. Enable YouTube Data API v3 4. Create credentials (API Key) 5. Free quota: 10,000 units/day

    Getting Apify Token

    1. Go to Apify 2. Sign up / Login 3. Copy API token from Settings

    Usage

    Default (Info Only - FREE)

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

    With Transcript (Uses Apify)

    python3 get_transcript.py "VIDEO_ID" --transcript
    python3 get_transcript.py "VIDEO_ID" -t
    python3 get_transcript.py "VIDEO_ID" --transcript --lang tr
    

    Info Only

    python3 get_transcript.py "VIDEO_ID" --info-only
    

    Examples

    Basic Video Info

    python3 get_transcript.py dQw4w9WgXcQ
    

    Video + Transcript

    python3 get_transcript.py Oi3Z1wlZXhg --transcript --lang tr
    

    Save to File

    python3 get_transcript.py VIDEO_ID > output.txt
    

    API Quotas

    YouTube Data API (Free)

  • 10,000 units/day (default)
  • Video list: 1 unit per request
  • Enough for ~10,000 video queries/day
  • Apify

  • Free tier available
  • Only charged when transcript requested
  • Files

  • get_transcript.py - Main script
  • πŸ’‘ Examples

    Basic Video Info

    python3 get_transcript.py dQw4w9WgXcQ
    

    Video + Transcript

    python3 get_transcript.py Oi3Z1wlZXhg --transcript --lang tr
    

    Save to File

    python3 get_transcript.py VIDEO_ID > output.txt