
Youtube Data Cli
- 2 installs
- Updated April 7, 2026
- bin-huang/youtube-data-cli
youtube-data-cli is a skill wrapping the full YouTube Data API v3 CLI to search YouTube and manage channels, videos, playlists, comments, subscriptions and captions.
About
This skill drives youtube-data-cli, a CLI covering the full YouTube Data API v3 (all 20 resources, 52 commands). A developer uses it to search YouTube, get and manage channels, videos, playlists, comments and subscriptions, upload videos and captions, set thumbnails, and manage members and channel sections. It documents API-key auth for public data and OAuth 2.0 for private and write operations, returning JSON. It is invoked to search YouTube or manage a channel's content.
- Full YouTube Data API v3 CLI covering all 20 resources across 52 commands
- Search, channels, videos (upload/update/delete/rate), playlists, comments, subscriptions, captions
- API key for public reads; OAuth 2.0 for private data and write operations
Youtube Data Cli by the numbers
- 2 all-time installs (skills.sh)
- Ranked #1,659 of 1,879 Marketing & SEO skills by installs in the Skillselion catalog
- Data as of Jul 28, 2026 (Skillselion catalog sync)
youtube-data-cli capabilities & compatibility
CLI is free (npm); requires a YouTube API key for public data or OAuth 2.0 credentials for private/write actions.
- Capabilities
- youtube management · content research · video upload
- Use cases
- marketing · research · web search
- Runs
- Runs locally
- Pricing
- Bring your own API key
What youtube-data-cli says it does
You have access to `youtube-data-cli`, a CLI for the YouTube Data API v3 covering all 20 resources with 52 commands.
**Important:** Service accounts do NOT work with YouTube APIs. You must use OAuth 2.0 with a refresh token.
npx skills add https://github.com/bin-huang/youtube-data-cli --skill youtube-data-cliAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 2 |
|---|---|
| Last updated | April 7, 2026 |
| Repository | bin-huang/youtube-data-cli ↗ |
What it does
Search YouTube and manage channels, videos, playlists, comments, subscriptions and captions through the full Data API v3 CLI.
Who is it for?
Programmatic YouTube channel management and content research across the full Data API v3.
Skip if: YouTube Analytics revenue/watch-time reporting, which is a separate API not covered here.
When should I use this skill?
The user wants to search YouTube, manage playlists, read or post comments, upload a video, set captions or thumbnails, or manage subscriptions.
What you get
JSON search results and read/write operations across channels, videos, playlists, comments, subscriptions and captions.
- YouTube search results (JSON)
- channel/video/playlist data
- comment and subscription operations
By the numbers
- all 20 YouTube Data API v3 resources
- 52 commands
Files
YouTube Data CLI Skill
You have access to youtube-data-cli, a CLI for the YouTube Data API v3 covering all 20 resources with 52 commands. Use it to search YouTube, manage channels/videos/playlists/comments/subscriptions, upload videos and captions, set thumbnails, and more.
Quick start
# Check if the CLI is available
youtube-data-cli --help
# Search for videos
youtube-data-cli search --q "node.js tutorial" --type video --max-results 5
# Get a channel's public data
youtube-data-cli channels UCxxxxxxxxxxxxxxIf the CLI is not installed, install it:
npm install -g youtube-data-cliAuthentication
| Method | Use case | Commands |
|---|---|---|
| API key | Public data | search, channels, videos, playlists, playlist-items, comment-threads, comments, channel-sections, i18n-*, video-categories, video-abuse-report-reasons |
| OAuth 2.0 | Private data + write operations | All *-insert/*-update/*-delete commands, --mine queries, captions, members, memberships-levels, playlist-images, thumbnails-set, watermarks-*, channel-banners-insert |
Credentials are resolved in this order:
1. --credentials <path> flag (per-command) 2. YOUTUBE_API_KEY, YOUTUBE_CLIENT_ID, YOUTUBE_CLIENT_SECRET, YOUTUBE_REFRESH_TOKEN env vars 3. ~/.config/youtube-data-cli/credentials.json (auto-detected)
Recommended OAuth scope: https://www.googleapis.com/auth/youtube (full access). Add https://www.googleapis.com/auth/youtube.upload if using narrower scopes but need video uploads.
Important: Service accounts do NOT work with YouTube APIs. You must use OAuth 2.0 with a refresh token.
Output format
All commands output pretty-printed JSON by default. Use --format compact for single-line JSON.
Global options:
--format <format>--json(default, pretty-printed) orcompact(single-line)--credentials <path>-- path to credentials JSON file
Errors are written to stderr as JSON with an error field and a non-zero exit code.
Commands reference
search
Search YouTube for videos, channels, and playlists.
youtube-data-cli search --q "query" [--type video] [--max-results 10] [--order viewCount]Key options: --q (required), --type, --max-results, --order, --channel-id, --page-token, --published-after, --published-before, --region-code, --relevance-language, --safe-search, --video-duration, --event-type
channels / channels-update
Get or update channel details.
youtube-data-cli channels UCxxxxxxxxxxxxxx
youtube-data-cli channels # your own channel (OAuth)
youtube-data-cli channels-update --id UCxxxxxxxxxxxxxx --description "New desc" --country USvideos / videos-insert / videos-update / videos-delete
Get, upload, update, or delete videos.
youtube-data-cli videos dQw4w9WgXcQ
youtube-data-cli videos-insert --file video.mp4 --title "My Video" --privacy private
youtube-data-cli videos-update --id VID --title "Updated Title" --category-id 22 --tags "a,b"
youtube-data-cli videos-delete --id VIDvideos-rate / videos-get-rating / videos-report-abuse
Rate videos and report abuse.
youtube-data-cli videos-rate --id VID --rating like
youtube-data-cli videos-rate --id VID --rating none # remove rating
youtube-data-cli videos-get-rating --id VID1,VID2
youtube-data-cli videos-report-abuse --video-id VID --reason-id REASON_IDplaylists / playlists-insert / playlists-update / playlists-delete
Manage playlists.
youtube-data-cli playlists --channel-id UCxxxxxxxxxxxxxx
youtube-data-cli playlists --mine
youtube-data-cli playlists-insert --title "My Playlist" --privacy public
youtube-data-cli playlists-update --id PLxxxxxxxxxxxxxx --title "New Title"
youtube-data-cli playlists-delete --id PLxxxxxxxxxxxxxxplaylist-items / playlist-items-insert / playlist-items-update / playlist-items-delete
Manage videos in playlists.
youtube-data-cli playlist-items --playlist-id PLxxxxxxxxxxxxxx
youtube-data-cli playlist-items-insert --playlist-id PLxxxxxxxxxxxxxx --video-id dQw4w9WgXcQ
youtube-data-cli playlist-items-update --id ITEM_ID --playlist-id PLxxxxxxxxxxxxxx --video-id dQw4w9WgXcQ --position 0
youtube-data-cli playlist-items-delete --id ITEM_IDcomment-threads / comment-threads-insert
List and post top-level comments.
youtube-data-cli comment-threads --video-id dQw4w9WgXcQ
youtube-data-cli comment-threads-insert --video-id dQw4w9WgXcQ --text "Great video!"Key options for listing: --video-id, --channel-id, --id, --order, --search-terms, --max-results, --page-token
comments / comments-insert / comments-update / comments-delete / comments-set-moderation-status
Manage comment replies and moderation.
youtube-data-cli comments --parent-id COMMENT_ID
youtube-data-cli comments-insert --parent-id COMMENT_ID --text "Thanks!"
youtube-data-cli comments-update --id COMMENT_ID --text "Updated text"
youtube-data-cli comments-delete --id COMMENT_ID
youtube-data-cli comments-set-moderation-status --id COMMENT_ID --moderation-status publishedsubscriptions / subscriptions-insert / subscriptions-delete
Manage subscriptions.
youtube-data-cli subscriptions --mine
youtube-data-cli subscriptions-insert --channel-id UCxxxxxxxxxxxxxx
youtube-data-cli subscriptions-delete --id SUBSCRIPTION_IDactivities
List channel activities.
youtube-data-cli activities --channel-id UCxxxxxxxxxxxxxx
youtube-data-cli activities --minecaptions / captions-insert / captions-update / captions-download / captions-delete
Manage video captions (subtitles).
youtube-data-cli captions --video-id VID
youtube-data-cli captions-insert --video-id VID --file subs.srt --language en --name "English"
youtube-data-cli captions-update --id CAP_ID --file new-subs.srt
youtube-data-cli captions-download --id CAP_ID --tfmt srt --output subs.srt
youtube-data-cli captions-delete --id CAP_IDchannel-banners-insert
Upload a channel banner image. Returns a URL to use with channels-update.
youtube-data-cli channel-banners-insert --file banner.jpgchannel-sections / channel-sections-insert / channel-sections-update / channel-sections-delete
Manage channel page sections.
youtube-data-cli channel-sections --channel-id UCxxxxxxxxxxxxxx
youtube-data-cli channel-sections-insert --type singlePlaylist --title "Featured" --playlist-ids PLxxxxxxxxxxxxxx
youtube-data-cli channel-sections-update --id SECTION_ID --type singlePlaylist --title "Updated"
youtube-data-cli channel-sections-delete --id SECTION_IDi18n-languages / i18n-regions
List supported languages and regions.
youtube-data-cli i18n-languages
youtube-data-cli i18n-regionsmembers / memberships-levels
List channel members and membership levels (OAuth required).
youtube-data-cli members
youtube-data-cli memberships-levelsplaylist-images / playlist-images-insert / playlist-images-update / playlist-images-delete
Manage playlist cover images.
youtube-data-cli playlist-images --parent PLxxxxxxxxxxxxxx
youtube-data-cli playlist-images-insert --playlist-id PLxxxxxxxxxxxxxx --file cover.jpg
youtube-data-cli playlist-images-delete --id IMAGE_IDthumbnails-set
Upload a custom thumbnail for a video (OAuth required).
youtube-data-cli thumbnails-set --video-id VID --file thumb.jpgvideo-categories / video-abuse-report-reasons
List video categories and abuse report reasons.
youtube-data-cli video-categories --region-code US
youtube-data-cli video-abuse-report-reasonswatermarks-set / watermarks-unset
Manage channel watermarks (OAuth required).
youtube-data-cli watermarks-set --channel-id UCxxxxxxxxxxxxxx --file watermark.png
youtube-data-cli watermarks-unset --channel-id UCxxxxxxxxxxxxxxWorkflow guidance
Discover content
1. Search for videos: youtube-data-cli search --q "topic" --type video --max-results 10 2. Get video details: youtube-data-cli videos VIDEO_ID 3. Read comments: youtube-data-cli comment-threads --video-id VIDEO_ID
Upload and manage videos
1. Upload: youtube-data-cli videos-insert --file video.mp4 --title "Title" --privacy private 2. Set thumbnail: youtube-data-cli thumbnails-set --video-id VID --file thumb.jpg 3. Add captions: youtube-data-cli captions-insert --video-id VID --file subs.srt --language en --name "English" 4. Make public: youtube-data-cli videos-update --id VID --title "Title" --privacy public
Manage playlists
1. List your playlists: youtube-data-cli playlists --mine 2. Create a new one: youtube-data-cli playlists-insert --title "Favorites" --privacy private 3. Add videos: youtube-data-cli playlist-items-insert --playlist-id PL_ID --video-id VID 4. Reorder: youtube-data-cli playlist-items-update --id ITEM_ID --playlist-id PL_ID --video-id VID --position 0
Comment management
1. List comments on a video: youtube-data-cli comment-threads --video-id VID --order time 2. Post a comment: youtube-data-cli comment-threads-insert --video-id VID --text "..." 3. Reply to a comment: youtube-data-cli comments-insert --parent-id COMMENT_ID --text "..." 4. Moderate: youtube-data-cli comments-set-moderation-status --id COMMENT_ID --moderation-status published
Channel management
1. Get channel info: youtube-data-cli channels 2. Update branding: youtube-data-cli channels-update --id CH_ID --description "..." --country US 3. Upload banner: youtube-data-cli channel-banners-insert --file banner.jpg 4. Set watermark: youtube-data-cli watermarks-set --channel-id CH_ID --file watermark.png 5. Manage sections: youtube-data-cli channel-sections --mine
Error handling
- OAuth credentials required -- write operations need
client_id,client_secret,refresh_token - Token refresh failed -- refresh token may be expired, user needs to re-authorize
- No credentials found -- provide credentials via
--credentials, env vars, or default file - HTTP 403 Forbidden -- insufficient scopes or API not enabled
API documentation
Related skills
FAQ
When do I need OAuth versus an API key?
API key covers public reads like search and channels; OAuth 2.0 is required for private data, --mine queries and all insert/update/delete write operations.
Do service accounts work?
No, service accounts do not work with YouTube APIs; you must use OAuth 2.0 with a refresh token for private/write access.