Skip to content

feat(youtube): add YouTube Data API v3 support#313

Closed
satputekuldip wants to merge 1 commit intoopenclaw:mainfrom
satputekuldip:youtube-feature
Closed

feat(youtube): add YouTube Data API v3 support#313
satputekuldip wants to merge 1 commit intoopenclaw:mainfrom
satputekuldip:youtube-feature

Conversation

@satputekuldip
Copy link
Copy Markdown
Contributor

@satputekuldip satputekuldip commented Feb 18, 2026

  • Introduced youtube command group for managing YouTube activities, videos, playlists, comments, and channels.
  • Added configuration options for YouTube API key via youtube_api_key or GOG_YOUTUBE_API_KEY.
  • Updated documentation to reflect new YouTube features and commands.
  • Enhanced CLI help descriptions to include YouTube services.

This commit expands the functionality of the CLI to include comprehensive support for YouTube, allowing users to interact with various YouTube data endpoints.

YouTube

YouTube Data API commands use an API key for public data (by channel/video/playlist ID). For “mine” (your channel, playlists, activities), use OAuth with -a and gog auth add ... --services youtube.

Set an API key (create one in Google Cloud Console after enabling YouTube Data API v3):

gog config set youtube_api_key YOUR_API_KEY
# or
export GOG_YOUTUBE_API_KEY=YOUR_API_KEY
# Activities (channel feed)
gog yt activities list --channel-id UC_x5XG1OV2P6uZZ5FSM9Ttw --max 10
gog yt activities list --mine -a you@gmail.com    # OAuth

# Videos
gog yt videos list --id dQw4w9WgXcQ
gog yt videos list --chart mostPopular --region US --max 5

# Playlists
gog yt playlists list --channel-id UC_x5XG1OV2P6uZZ5FSM9Ttw
gog yt playlists list --mine -a you@gmail.com   # OAuth

# Comment threads
gog yt comments list --video-id VIDEO_ID --max 20
gog yt comments list --channel-id CHANNEL_ID

# Channels
gog yt channels list --id UC_x5XG1OV2P6uZZ5FSM9Ttw
gog yt channels list --mine -a you@gmail.com    # OAuth

# JSON output
gog yt channels list --id UC_x5XG1OV2P6uZZ5FSM9Ttw --json

- Introduced `youtube` command group for managing YouTube activities, videos, playlists, comments, and channels.
- Added configuration options for YouTube API key via `youtube_api_key` or `GOG_YOUTUBE_API_KEY`.
- Updated documentation to reflect new YouTube features and commands.
- Enhanced CLI help descriptions to include YouTube services.

This commit expands the functionality of the CLI to include comprehensive support for YouTube, allowing users to interact with various YouTube data endpoints.
@steipete
Copy link
Copy Markdown
Collaborator

steipete commented May 9, 2026

Thanks @satputekuldip. I reviewed this against the current YouTube Data API v3 docs and landed the feature on main in 05dd666, with final CI/lint cleanup through 57080af.

I kept the PR intent but tightened a few things while landing: root command is gog youtube / gog yt, API-key config is youtube_api_key / GOG_YOUTUBE_API_KEY, max-results validation is bounded, debug output was removed, docs/changelog/generated command docs were updated, and the OAuth service uses the read-only YouTube scope.

I could not run a live YouTube API call because this environment has no YouTube API key configured (GOG_YOUTUBE_API_KEY and config youtube_api_key are missing), but local tests/build/lint pass and CI is green on main: 25601394551. Closing this PR as landed/replaced by main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants