Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Search YouTube videos by query or within specific channels. Supports date filtering, sort ordering, and duration filters to exclude YouTube Shorts. Returns LLM-optimized JSON with video details.
.claude/skills/valtterimelkko-youtube-search/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 32% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 53% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 101% | 0% |
| case-11 | ✗→✓ | ▲ Improved | -1% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 374% | 0% |
Search for YouTube videos using the YouTube Data API v3. Find videos by query across all of YouTube or within specific channels.
YouTube API Key available in the environment or a shell startup file such as ~/.bashrc:
bashexport YOUTUBE_API_KEY="your-api-key-here"
Get one from Google Cloud Console: Create project → Enable YouTube Data API v3 → Create API Key.
Daily quota: 10,000 units (each search ≈ 100 units, channel resolution ≈ 1 unit, playlist fetch ≈ 1 unit).
bashpython3 ./scripts/youtube_search.py --query "AI tutorials" --max-results 10
bashpython3 ./scripts/youtube_search.py --query "Python" --channel-id "UC123..." --max-results 20
| Parameter | Required | Default | Notes | |-----------|----------|---------|-------| | --query or -q | Yes | - | Search term | | --channel-id or -c | No | - | If provided, search only in this channel | | --max-results or -m | No | 10 | Max 50 (preserves quota and LLM context) | | --order or -o | No | relevance | date, rating, relevance, viewCount | | --published-after | No | - | ISO 8601 format (e.g., "2025-01-01T00:00:00Z") | | --published-before | No | - | ISO 8601 format | | --video-duration or -d | No | any | any, short (<4min), medium (4-20min), long (>20min) |
⚠️ Each helper script uses API quota. Plan carefully before running multiple times.
Cost: 1 unit per resolution
bashpython3 ./scripts/youtube_channel_id.py --handle "@MetalSole"
Cost: 1-2 units for channel lookup + 1 unit per ~50 videos fetched
bash# By handle python3 ./scripts/youtube_channel_videos.py --handle "@MetalSole" --max-results 50 # By channel ID (saves quota - skips handle resolution) python3 ./scripts/youtube_channel_videos.py --channel-id "UC123..." --max-results 50 # By playlist ID (cheapest - fastest method) python3 ./scripts/youtube_channel_videos.py --playlist-id "UU123..." --max-results 50
Cost: 1-2 units (channel lookup) + 100 units (search query)
bashpython3 ./scripts/youtube_channel_search.py --channel-handle "@MetalSole" --query "AI"
| Operation | Cost | Purpose | |-----------|------|---------| | Basic search with query | ~100 | Find videos by topic | | Resolve handle (@MetalSole) | ~1 | Get channel ID from handle | | Fetch 50 channel videos | ~1 | List all uploads from channel | | Search within channel | ~100 | Find topic within specific channel |
Example cost: Searching 10 channels for videos = ~10 units. Then searching within each channel = ~1000 units total. Plan accordingly!
Returns JSON with video metadata:
json{ "success": true, "videos": [ { "title": "Video Title", "url": "https://www.youtube.com/watch?v=VIDEO_ID", "channel_title": "Channel Name", "published_at": "2025-01-15T10:00:00Z", "description": "..." } ] }
bash# Latest AI videos python3 ./scripts/youtube_search.py --query "AI" --order "date" --max-results 10 # Longer-form content only (no shorts) python3 ./scripts/youtube_search.py --query "tutorial" --video-duration "medium" --max-results 15 # Last 30 days python3 ./scripts/youtube_search.py --query "news" --published-after "2025-11-23T00:00:00Z"
| Problem | Solution | |---------|----------| | API key not found | Make available in your environment or shell startup file: export YOUTUBE_API_KEY="key-here" | | 403 Forbidden | Key lacks permissions. Enable YouTube Data API v3 in Google Cloud Console | | Quota exceeded | Used 10,000 units today. Create new Google Cloud project or wait 24hrs | | No results | Try broader query, remove date filters |
youtube_channel_videos.py over youtube_channel_search.pyIf you exhaust today's quota:
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-10 | pass→pass | 3,950 | 2,115 | -46% | 1 | 1 | 0% | 702 | 1,898 | +170% | 0 | 0 | — |
case-04 | fail→pass | 7,701 | 2,865 | -63% | 1 | 1 | 0% | 1,440 | 1,896 | +32% | 0 | 0 | — |
case-01 | fail→fail | 24,963 | 6,407 | -74% | 1 | 1 | 0% | 3,973 | 1,976 | -50% | 0 | 0 | — |
case-02 | fail→fail | 3,614 | 5,940 | +64% | 1 | 1 | 0% | 503 | 1,780 | +254% | 0 | 0 | — |
case-03 | fail→fail | 23,566 | 5,304 | -77% | 1 | 1 | 0% | 5,112 | 1,794 | -65% | 0 | 0 | — |
case-05 | fail→pass | 9,150 | 2,891 | -68% | 1 | 1 | 0% | 1,292 | 1,972 | +53% | 0 | 0 | — |
case-06 | fail→pass | 6,193 | 3,390 | -45% | 1 | 1 | 0% | 1,035 | 2,085 | +101% | 0 | 0 | — |
case-07 | pass→pass | 8,216 | 2,856 | -65% | 1 | 1 | 0% | 1,584 | 2,036 | +29% | 0 | 0 | — |
case-08 | pass→pass | 4,937 | 2,322 | -53% | 1 | 1 | 0% | 915 | 1,928 | +111% | 0 | 0 | — |
case-09 | pass→pass | 5,639 | 3,378 | -40% | 1 | 1 | 0% | 1,077 | 2,061 | +91% | 0 | 0 | — |
case-11 | fail→pass | 11,228 | 3,454 | -69% | 1 | 1 | 0% | 2,193 | 2,175 | -1% | 0 | 0 | — |
case-12 | fail→pass | 2,471 | 6,120 | +148% | 1 | 1 | 0% | 393 | 1,863 | +374% | 0 | 0 | — |
case-13 | fail→pass | 4,245 | 1,916 | -55% | 1 | 1 | 0% | 804 | 1,896 | +136% | 0 | 0 | — |
case-14 | fail→pass | 4,511 | 2,630 | -42% | 1 | 1 | 0% | 424 | 1,930 | +355% | 0 | 0 | — |
case-15 | pass→pass | 14,475 | 1,868 | -87% | 1 | 1 | 0% | 1,433 | 1,874 | +31% | 0 | 0 | — |
case-16 | fail→pass | 11,087 | 2,365 | -79% | 1 | 1 | 0% | 2,002 | 1,917 | -4% | 0 | 0 | — |
case-17 | pass→pass | 26,079 | 2,683 | -90% | 1 | 1 | 0% | 2,380 | 2,005 | -16% | 0 | 0 | — |
case-18 | pass→pass | 5,648 | 1,967 | -65% | 1 | 1 | 0% | 757 | 1,792 | +137% | 0 | 0 | — |
case-19 | pass→pass | 6,389 | 1,604 | -75% | 1 | 1 | 0% | 1,075 | 1,718 | +60% | 0 | 0 | — |
case-20 | pass→fail | 9,455 | 6,589 | -30% | 1 | 1 | 0% | 1,698 | 1,806 | +6% | 0 | 0 | — |
case-21 | pass→fail | 7,818 | 9,382 | +20% | 1 | 1 | 0% | 1,276 | 2,244 | +76% | 0 | 0 | — |
case-22 | pass→pass | 4,389 | 5,841 | +33% | 1 | 1 | 0% | 651 | 2,409 | +270% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 17 counted toward the lift figure. The other 5 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +27 percentage points is the difference between those two pass rates over the 17 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.