ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

youtube-analytics-cli

YouTube channel statistics, video data, and analytics reporting via youtube-analytics-cli. Use when the user wants to check YouTube channel stats, video performance, run analytics reports with dimensions and filters, or manage analytics groups. Triggers: "YouTube Analytics", "YouTube", "channel stats", "video views", "subscribers", "watch time", "YouTube report", "estimated minutes watched", "YouTube groups".

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/bin-huang/youtube-analytics-cli
Or

YouTube Analytics CLI Skill

You have access to youtube-analytics-cli, a read-only CLI for the YouTube Data API v3 and YouTube Analytics API v2. Use it to fetch channel and video details, run analytics reports, and manage analytics groups.

Quick start

# Check if the CLI is available
youtube-analytics-cli --help

# Get a channel's public data (API key sufficient)
youtube-analytics-cli channels UCxxxxxxxxxxxxxx

# Get your own channel (OAuth required)
youtube-analytics-cli channels

If the CLI is not installed, install it:

npm install -g youtube-analytics-cli

Authentication

The CLI supports two authentication methods:

MethodUse caseCommands
API keyPublic data (channels, videos)channels <id>, videos
OAuth 2.0Private data + analyticsAll commands (required for report, groups, group-items, channels without ID)

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-analytics-cli/credentials.json (auto-detected)

The credentials JSON file supports these fields:

{
  "api_key": "YOUR_API_KEY",
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "refresh_token": "YOUR_REFRESH_TOKEN"
}

The file must contain at least api_key or client_id. OAuth commands require all three OAuth fields (client_id, client_secret, refresh_token).

Important: Service accounts do NOT work with YouTube APIs. You must use OAuth 2.0 with a refresh token. Required scopes:

  • https://www.googleapis.com/auth/youtube.readonly
  • https://www.googleapis.com/auth/yt-analytics.readonly
  • https://www.googleapis.com/auth/yt-analytics-monetary.readonly (for revenue metrics -- note: revenue metrics may only be available for content owner reports, not standard channel reports)

Before running analytics commands, verify OAuth credentials by running youtube-analytics-cli channels (no ID). If it fails, ask the user to set up OAuth 2.0 credentials.

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) or compact (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

channels

Get channel details. Omit the channel ID to get the authenticated user's own channel (requires OAuth).

# Get a specific channel by ID (API key sufficient)
youtube-analytics-cli channels UCxxxxxxxxxxxxxx

# Get your own channel (OAuth required)
youtube-analytics-cli channels

# Request specific parts
youtube-analytics-cli channels UCxxxxxxxxxxxxxx --part snippet,statistics,brandingSettings

Metadata

Author@bin-huang
Stars4473
Views0
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-bin-huang-youtube-analytics-cli": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.

Related Skills

linkedin-ads-cli

LinkedIn Ads data analysis and reporting via linkedin-ads-cli. Use when the user wants to check LinkedIn ad performance, pull campaign analytics with pivot breakdowns, explore ad account structure, inspect creatives, analyze audiences, retrieve lead form submissions, forecast ad delivery, or get budget recommendations. Triggers: "LinkedIn Ads", "LinkedIn ad performance", "LinkedIn campaign stats", "LinkedIn ad spend", "LinkedIn analytics", "LinkedIn audience", "LinkedIn lead forms", "LinkedIn creatives", "LinkedIn ad account", "LinkedIn targeting", "LinkedIn budget forecast".

bin-huang 4473

tiktok-ads-cli

TikTok Ads data analysis and reporting via tiktok-ads-cli. Use when the user wants to check TikTok ad performance, pull campaign/ad group/ad stats, manage audiences, inspect creatives, check pixel tracking, or create async reports. Triggers: "TikTok Ads", "TikTok ad performance", "TikTok campaign stats", "TikTok ad spend", "TikTok report", "TikTok pixel", "TikTok audience", "TikTok creatives", "TikTok ad account", "TikTok ad groups", "TikTok async report".

bin-huang 4473

spotify-ads-cli

Spotify Ads data analysis and reporting via spotify-ads-cli. Use when the user wants to check Spotify ad performance, pull aggregate or insight reports, explore businesses and ad accounts, manage audio creatives, analyze targeting and audiences, track measurement pixels and datasets, or estimate audience/bid ranges. Triggers: "Spotify Ads", "Spotify ad performance", "Spotify campaign stats", "Spotify ad spend", "Spotify insight report", "Spotify aggregate report", "Spotify pixel", "Spotify audience", "Spotify ad account", "Spotify targeting", "Spotify audio ads", "Spotify ad set", "Spotify CSV report", "Spotify bid estimate".

bin-huang 4473

camoufox-cli

Anti-detect browser automation CLI & Skills for AI agents. Use when the user needs to interact with websites with bot detection, CAPTCHAs, or anti-bot blocks, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task that requires bypassing fingerprint checks.

bin-huang 4473

x-analytics-cli

X (Twitter) analytics and data retrieval via x-analytics-cli. Use when the user wants to search tweets, count tweet volumes, look up user profiles, get tweet details, or pull a user's timeline from X (formerly Twitter). Triggers: "X analytics", "Twitter analytics", "tweet search", "tweet lookup", "tweet counts", "X user profile", "Twitter user", "tweet timeline", "X API", "Twitter API", "search tweets", "tweet volume", "trending tweets", "X data", "Twitter data".

bin-huang 4473