Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yt-meta

YouTube metadata extraction CLI. Get video info, channel stats, playlists, and comments without the official API. No API key required.

npm version License: MIT

Features

  • 🎬 Video metadata - Title, views, likes, description, tags, thumbnails
  • 📺 Channel info - Name, subscribers, video count, about
  • 📋 Playlists - Full playlist extraction with video details
  • 💬 Comments - Top and newest comments with replies
  • 🔍 Search - Video search with sorting options
  • 🚀 No API key - Works without YouTube Data API
  • 📁 Multiple formats - JSON, JSONL, CSV, table

Installation

npm install -g yt-meta-cli

Quick Start

# Get video metadata
yt-meta video https://youtube.com/watch?v=dQw4w9WgXcQ

# Channel info
yt-meta channel @mkbhd

# Playlist videos
yt-meta playlist PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf

# Search videos
yt-meta search "typescript tutorial" --limit 20

# Comments
yt-meta comments dQw4w9WgXcQ --limit 100

Commands

video <url|id>

Get video metadata.

yt-meta video dQw4w9WgXcQ
yt-meta video https://youtu.be/dQw4w9WgXcQ
yt-meta video "https://youtube.com/watch?v=dQw4w9WgXcQ"

Returns: Title, description, views, likes, duration, upload date, channel, tags, thumbnail URLs.

channel <handle|id>

Get channel information.

yt-meta channel @mkbhd
yt-meta channel UCBcRF18a7Qf58cCRy5xuWwQ
yt-meta channel @channel --videos             # Include recent videos
yt-meta channel @channel --videos --limit 100 # More videos

Returns: Name, description, subscribers, video count, join date, links.

Options:

  • --videos - Include channel's recent videos
  • --limit <n> - Number of videos (with --videos)

playlist <id>

Get playlist videos.

yt-meta playlist PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf
yt-meta playlist PLxxx --limit 50
yt-meta playlist PLxxx --all                 # Fetch entire playlist

Options:

  • --limit <n> - Number of videos (default: 100)
  • --all - Fetch all videos in playlist

search <query>

Search for videos.

yt-meta search "react hooks tutorial"
yt-meta search "javascript" --limit 50
yt-meta search "gaming" --sort views
yt-meta search "music" --sort date

Options:

  • --limit <n> - Number of results (default: 20)
  • --sort <type> - Sort by: relevance, date, views, rating

comments <video-id>

Get video comments.

yt-meta comments dQw4w9WgXcQ
yt-meta comments dQw4w9WgXcQ --limit 500
yt-meta comments dQw4w9WgXcQ --sort top      # Top comments
yt-meta comments dQw4w9WgXcQ --sort new      # Newest first

Options:

  • --limit <n> - Number of comments (default: 100)
  • --sort <type> - Sort by: top, new

Output Formats

# JSON (default)
yt-meta video dQw4w9WgXcQ

# JSONL (one object per line)
yt-meta playlist PLxxx -o jsonl

# CSV (spreadsheet-friendly)
yt-meta search "tutorial" -o csv

# Table (terminal display)
yt-meta video dQw4w9WgXcQ -o table

# Save to file
yt-meta channel @mkbhd --save channel.json

Example Output

{
  "id": "dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up",
  "channel": "Rick Astley",
  "channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
  "views": 1400000000,
  "likes": 15000000,
  "duration": "3:33",
  "uploadDate": "2009-10-25",
  "description": "The official video for...",
  "tags": ["rick astley", "never gonna give you up", "80s"],
  "thumbnails": {
    "default": "https://i.ytimg.com/vi/dQw4w9WgXcQ/default.jpg",
    "medium": "https://i.ytimg.com/vi/dQw4w9WgXcQ/mqdefault.jpg",
    "high": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
    "maxres": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg"
  }
}

Batch Processing

# Multiple videos
echo "dQw4w9WgXcQ
jNQXAC9IVRw
9bZkp7q19f0" | xargs -I {} yt-meta video {}

# Export channel's videos
yt-meta channel @mkbhd --videos --limit 500 > mkbhd-videos.json

# Download playlist metadata
yt-meta playlist PLxxx --all --save playlist.json

Use Cases

  • Content research - Analyze video performance
  • SEO analysis - Study successful video tags/titles
  • Playlist backup - Archive playlist metadata
  • Comment analysis - Sentiment and engagement
  • Channel tracking - Monitor subscriber growth
  • Data journalism - Video trend analysis

Security & Rate Limiting

  • No authentication required
  • Built-in rate limiting
  • No API key to leak
  • Respects robots.txt

Why yt-meta?

Feature yt-meta Official API
API Key Required ❌ No ✅ Yes
Quota Limits None 10,000/day
Comments Access ✅ Full ✅ Yes
Setup Time 1 minute Hours
Cost Free Free (limited)

vs yt-dlp

  • yt-meta - Metadata extraction (fast, no download)
  • yt-dlp - Video downloading (different purpose)

Use yt-meta when you need data, not files.


Built by LXGIC Studios

🔗 GitHub · Twitter · npm

About

YouTube metadata extraction CLI. Video info, channel stats, playlists, comments. No API key needed.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages