Skip to content

feat(youtube): add search filters — --type shorts/video/channel, --upload, --sort#616

Open
jackleeio wants to merge 2 commits intojackwener:mainfrom
jackleeio:feat/youtube-search-filters
Open

feat(youtube): add search filters — --type shorts/video/channel, --upload, --sort#616
jackleeio wants to merge 2 commits intojackwener:mainfrom
jackleeio:feat/youtube-search-filters

Conversation

@jackleeio
Copy link
Copy Markdown

Summary

  • Add --type filter: shorts, video, channel, playlist
  • Add --upload filter: hour, today, week, month, year
  • Add --sort: relevance, date, views, rating
  • Uses YouTube's native sp= protobuf params (e.g. Shorts = EgIQCQ, type ID 9)
  • Parses reelItemRenderer for Shorts results alongside videoRenderer
  • Shorts results use /shorts/ URL format

Usage

opencli youtube search "AI" --type shorts --limit 10
opencli youtube search "tech" --upload week --sort views

Test plan

  • --type shorts returns only Shorts with /shorts/ URLs
  • --type video returns regular videos
  • No filter returns mixed results (existing behavior unchanged)
  • --upload week returns recent videos

jackleeio and others added 2 commits March 31, 2026 00:11
Uses YouTube's native sp= filter params. Shorts = type 9 (sp=EgIQCQ).
Also parses reelItemRenderer for Shorts results.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Shows when video was uploaded (e.g. "8h ago", "4d ago", "3mo ago").

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant