youtube-search
Skill4 starsChanged 15 days agoMITView on GitHub
Search YouTube without an API key and get results with publish date, view count, duration, channel and URL, sortable and filterable by date, views, duration and channel. Use when the user asks to find YouTube videos on a topic, the newest or most-watched videos about something, a talk/tutorial/interview/review on YouTube, videos from a particular channel, or needs a video to transcribe or summarise but has no link yet ("найди на YouTube"). Not for a video the user already linked (youtube-transcript for what is said, youtube-audio for the sound), podcasts (podcast-search) or general web search (web-search).
- Installs packages
13 other projects use a version of this.
Adopted by
Most recently taken up by
- TheVeller/claude-skillstheir own version, first seen Nov 2, 2026
- Mathews-Tom/armorytheir own version, first seen Nov 1, 2026
- rocosen/flashdata-mcptheir own version, first seen Oct 17, 2026
- ccsang/claude-skillstheir own version, first seen Oct 11, 2026
- Gopyr/gopyr-skills-hubtheir own version, first seen Oct 11, 2026
- artemchuikin/youtube-skillstheir own version, first seen Oct 11, 2026
Other versions13 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 13
- ZeroPointRepo/youtube-skills★ 972same name
- Mathews-Tom/armory★ 340same name
- artemchuikin/youtube-skills★ 273same name
- AISA-skills/social-media-skills★ 4same name
- audibleblink/skills★ 4same name
- TheVeller/claude-skills★ 4same name
- valtterimelkko/agent-workflow-skills★ 2same name
- baofeng-tech/agent-skills-so★ 0same name
- ccsang/claude-skills★ 0same name
- Gopyr/gopyr-skills-hub★ 0same name
3 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository19 other files it gives its agents.
- anki-deckSkill
- cite-checkSkill
- hackernewsSkill
- human-writingSkill
- pdf-typesetSkill
- podcast-searchSkill
- scholar-searchSkill
- telegram-channelSkill
- transcribe-audioSkill
- waybackSkill
- weatherSkill
- web-browseSkill
- web-crawlSkill
- web-extractSkill
- web-scrapeSkill
- web-searchSkill
- wiki-lookupSkill
- youtube-audioSkill
- youtube-transcriptSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
Not for: video comments, channel statistics, downloading media, or anything requiring a signed-in account.
- Distinctive: line 44
Default output is a readable list (10 results):
- Distinctive: line 123
Always weigh the three numbers the script gives you — do not just take the first hit:
- Distinctive: line 148
When presenting, give for each recommended video: title, channel, duration, views, date and the URL — one line per video, in the user's …
- Distinctive: line 151
If the user asks for "the best" video, show 3–5 candidates with those numbers rather than one.
- Very specific: line 154
Use -f json when you need to post-process.
“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
YouTube Search
Find videos on YouTube from the command line, free and key-less, with the data
you need to judge them: publish date, view count, duration, channel and URL.
The script uses yt-dlp as a library to call YouTube's own search endpoint.
When to use
- "Find a video about…", "what are the best/most popular videos on…"
- "Latest videos about…", "anything new this week on…"
- "Is there a talk/tutorial/review of X on YouTube?"
- "Find
<channel>'s video about Y" - The user wants a summary or transcript of a video but has not given a link —
search first, then hand the chosen URL to the
youtube-transcriptskill.
Not for: video comments, channel statistics, downloading media, or anything requiring a signed-in account.
Quick start
The script is scripts/search.py relative to this skill. Run with uv
(cross-platform; installs yt-dlp into a cached environment automatically):
uv run scripts/search.py python asyncio tutorial
uv run scripts/search.py "LLM agents" --sort date --period month -n 15
uv run scripts/search.py rust borrow checker --sort views --duration long
uv run scripts/search.py asyncio --channel @TechWithTimWithout uv: pip install yt-dlp, then python scripts/search.py ….
Default output is a readable list (10 results):
1. Asyncio in Python - Full Tutorial
https://www.youtube.com/watch?v=Qb9s3UiMSTA | Tech With Tim · 24:59 · 393K views · ~2024~ before a date means approximate: YouTube only shows "1 year ago", and the
date is printed with the same granularity as that text — ~2024 for "N years
ago", ~2026-08 for "N months ago", ~2026-10-20 for "N weeks/days ago",
today's date for "N hours/minutes ago". --details replaces it with the exact
upload date (2024-10-29, no ~).
Options
| Flag | Meaning |
-n, --limit N | Number of results (default 10, max 100). |
--sort relevance|date|views|rating | Order. date = newest first (sorted locally over a larger fetch, see notes). |
--period hour|today|week|month|year | Only videos uploaded within that window (server-side). |
--duration short|medium|long | <4 min / 4–20 min / >20 min (server-side). |
--min-minutes F, --max-minutes F | Exact duration bounds (client-side). |
--min-views N | Drop results with fewer views. |
--after YYYY-MM-DD | Drop results published before that date. |
--type video|channel|playlist|movie | Result type (default: videos only). |
--channel @handle|URL|UC… | Search within one channel. |
--details | One extra request per result: exact upload date, likes, description, available caption languages (manual and auto). |
-f table|json|urls|ids | Output format. json carries every field (shape below); urls/ids are for piping into other tools. |
--proxy URL | HTTP(S)/SOCKS proxy if YouTube blocks the IP. |
JSON output
-f json prints one object, not a bare list:
{
"query": "python asyncio tutorial",
"results": [
{
"kind": "video",
"id": "Qb9s3UiMSTA",
"url": "https://www.youtube.com/watch?v=Qb9s3UiMSTA",
"title": "Asyncio in Python - Full Tutorial",
"channel": "Tech With Tim",
"channel_url": "https://www.youtube.com/@TechWithTim",
"duration": 1499,
"view_count": 393000,
"published": "2024",
"published_exact": false,
"published_precision": "year",
"live": false
}
]
}Top-level keys: query (string, the search terms as sent) and results
(array, in output order). Each result has exactly these keys:
| Key | Type | Meaning |
kind | "video"|"channel"|"playlist" | Non-video results only appear with --type or --channel. |
id, url, title, channel | string | channel may be "". |
channel_url | string | null | |
duration | number | null | Seconds; null for live streams. |
view_count | number | null | |
published | string | null | YYYY, YYYY-MM or YYYY-MM-DD — never more precise than YouTube's relative date (see published_precision). No ~ here; that is table decoration. |
published_exact | boolean | true only with --details, when the real upload date was fetched. |
published_precision | "year"|"month"|"day"|null | Granularity of published; null when no date is known. |
live | boolean | Live or upcoming stream. |
With --details a video result additionally gets like_count,
comment_count, channel_follower_count, categories, tags, chapters
(each only when YouTube returned it), description (first 1500 chars),
captions_manual and captions_auto (lists of language codes), or
details_error (string) if that video's extra request failed.
How to pick and present results
Always weigh the three numbers the script gives you — do not just take the first hit:
- Date. For fast-moving topics (software versions, AI, news, prices) prefer
recent uploads: add
--period yearor--sort date --period month. For timeless topics (maths, history, classic talks) age does not matter; say so. Caution with--period(and--sort date) on broad queries: YouTube relaxes relevance when a date filter is on, so a long query such assmartphone zombies society addiction --sort date --period yearreturns unrelated uploads (gaming VODs, news clips). With--perioduse short, precise queries — 2–3 words or a quoted phrase — and add--min-views. If the results still look unrelated, drop--period, search without it and filter locally with--after YYYY-MM-DD. - Views. A proxy for quality and relevance, but biased toward old and
clickbait videos. Use
--min-viewsto cut noise (e.g. 10 000 for mainstream topics, 1 000 for niche ones), not as the sole ranking. - Duration. Match the user's need:
--duration shortfor a quick answer or demo,longfor a full course/talk/interview. Mention the length when recommending, so the user knows what they are committing to. Tip:--min-minutes 4(or--duration medium) removes the kids' songs and music clips that flood queries like "phone zombies". - Channel. Recognisable official or expert channels beat anonymous
re-uploads with the same title. The
--channelflag is the fastest way to find one creator's video on a subject.
When presenting, give for each recommended video: title, channel, duration, views, date and the URL — one line per video, in the user's language. Say which one you would start with and why (newest, most watched, most relevant length). If the user asks for "the best" video, show 3–5 candidates with those numbers rather than one.
Use -f json when you need to post-process; use -f urls -n 1 to pipe straight
into the transcript skill.
Before recommending or transcribing, run --details on your shortlist (≤5
videos). It is the only way to get the exact upload date (the plain search
only shows ~2024) and to see whether captions exist at all: its
captions_manual/captions_auto fields tell you whether youtube-transcript
will succeed before you call it. Keep it to a shortlist — it costs one extra
request per video and is blocked on cloud IPs (the result then carries a
details_error and keeps its approximate date).
Chaining with youtube-transcript
Typical flow for "summarise the latest talk on X":
uv run scripts/search.py X talk --sort date --period year -n 5- Re-run the 2–3 best candidates with
--detailsto get exact dates and caption availability, pick one (or ask the user if several are plausible), then run theyoutube-transcriptskill's script on its URL. - Summarise from the transcript, citing the video's title, channel and date.
Errors and exit codes
| Exit | Meaning | What to do |
| 1 | No results after filters | Loosen --min-views, --after, --period, or broaden the query. |
| 2 | Bad input (empty query, unparsable channel) or yt-dlp missing | Fix the argument; or pip install yt-dlp / use uv run. |
| 4 | Blocked by YouTube (bot check, 429) | Rare for plain search; common for --details on cloud IPs. Retry without --details, wait a minute, or pass --proxy. Don't retry in a tight loop. |
| 6 | Network failure | Check connectivity, retry. |
| 7 | Other yt-dlp error, or an unexpected error in the script (the message says unexpected) | Usually a YouTube-side change; uv fetches the newest yt-dlp on a fresh cache, otherwise pip install -U yt-dlp. Report an unexpected error with the command line. |
| 130 | Interrupted | — |
With --details, a per-video failure does not abort: the result keeps its
basic fields and gains a details_error line.
Notes and limitations
- YouTube's search endpoint ignores sort-by-date, so
--sort datefetches up to 3×-n(min 30) results and sorts them locally. Combine with--periodto make "newest" meaningful; without it you get the newest among the most relevant, not the newest overall. - Dates without
--detailsare approximate and printed only as precisely as YouTube's relative text allows: "8 years ago" →~2018, "3 months ago" →~2026-07, "3 weeks ago" →~2026-10-07(±a few days).--aftercompares against YouTube's estimate, so it is equally fuzzy for old videos. - A date filter (
--period) loosens YouTube's relevance ranking; see the caution under "How to pick and present results". - Live streams and premieres show
LIVEinstead of a duration and may lack a view count. - Results depend on YouTube's region/language heuristics for the requesting IP.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

