yt-research
Export and analyze a YouTube channel's complete public video history from your terminal.
Explore channel metadata, find top videos, and export clean CSV or JSON for spreadsheets, scripts, and agents.
[!IMPORTANT]
yt-researchis under active development. The 0.1.x interface may evolve before 1.0.
✨ Why yt-research?
The YouTube website is built for watching. yt-research is built for answering
questions about a channel's public catalog.
discover → collect → filter → rank → export
| 🔎 Resolve precisely Start from a handle, channel ID, or channel URL. |
🧭 Search safely See candidates instead of accepting an ambiguous match. |
| 🗂️ Walk every upload Traverse the channel's complete public uploads history. |
🎯 Slice the catalog Filter by title text, year, or UTC date range. |
| 📊 Rank what matters Sort videos by publication date, views, or likes. |
↗️ Take data anywhere Use terminal tables, versioned JSON, or fixed-column CSV. |
It uses the official YouTube Data API v3 with your own API key and requests only public data. Ambiguous channel searches return candidates instead of silently choosing one.
⚡ Quick start
1 · Install
Use pipx with Python 3.11+ on macOS or Linux:
pipx install yt-research
2 · Authenticate
Add your YouTube Data API key to your operating system's native secret store:
yt-research auth set
yt-research auth status
3 · Research
Replace the placeholder with a public channel handle:
# See the newest uploads
yt-research videos latest @examplecreator --limit 10
# Find the most-viewed videos published in 2026
yt-research videos top @examplecreator --year 2026
# Search titles and save the results
yt-research videos list @examplecreator --match "tutorial" --format csv --output videos.csv
# Summarize the latest 12 calendar months and find breakout uploads
yt-research channel analyze @examplecreator --limit 10
Terminal output defaults to a readable table. Redirected output automatically switches to JSON, while diagnostics stay on stderr:
yt-research videos list @examplecreator > videos.json
[!TIP] Need an API key? Follow the step-by-step API key setup guide. In CI or headless Linux, set
YT_RESEARCH_API_KEYinstead; it takes precedence over the native secret store.
Other ways to install
With uv:
uv tool install yt-research
For a one-off run:
uvx yt-research --help
From a development checkout:
git clone https://github.com/vedntp/yt-research.git
cd yt-research
uv sync
uv run yt-research --help
🧭 Commands at a glance
| Command | What it does | |
|---|---|---|
| 🔎 | yt-research channel info CHANNEL |
Show public metadata for one channel |
| 🧭 | yt-research channel search QUERY |
Return candidates for a channel name |
| ⚡ | yt-research videos latest CHANNEL |
Show the newest matching uploads |
| 📈 | yt-research videos top CHANNEL |
Show the most-viewed matching uploads |
| ⏪ | yt-research videos first CHANNEL |
Find the oldest matching upload |
| 🗂️ | yt-research videos list CHANNEL |
List and filter a channel's uploads |
| 📊 | yt-research channel analyze CHANNEL |
Summarize cohorts and surface breakout uploads |
Video commands support --match, --year, --from, --to, --sort, --limit,
--format, and --output. Run any command with --help or see the full
command reference.
channel analyze defaults to the latest 12 calendar months. Use --months N,
--year YYYY, --from/--to, or --all to choose a different window. Its
aggregate summary always includes every matching upload in that window;
--limit only limits the breakout-video table.
Research recipes
🔭 Trace a topic through a channel
yt-research videos list @examplecreator --match "telescope" --sort published-asc
Title matching is case-insensitive. Add --from and --to to narrow the timeline.
🏆 Find a channel's strongest videos from one year
yt-research videos top @examplecreator --year 2026 --limit 25
videos top sorts matching uploads by view count and defaults to ten results.
📊 Understand a channel's recent performance
yt-research channel analyze @examplecreator --months 12 --match "tutorial"
The report includes total and median performance, engagement rates, upload
cadence, publication-month cohorts, and year-normalized breakout videos. Cohort
metrics are current snapshots grouped by the month a video was published; they
do not represent historical view growth. Use --format json for automation.
🤖 Build a clean dataset for a script or agent
yt-research videos list @examplecreator --from 2025-01-01 --format json --output videos.json
The output follows a versioned contract and keeps warnings on stderr.
🔌 Built for people and programs
Interactive results are formatted as a styled terminal table:
Illustrative demo; titles and statistics are not actual MKBHD data · open full size
The same commands fit cleanly into pipelines and spreadsheet workflows:
# Pipeline → versioned JSON
yt-research videos list @examplecreator --year 2026 | jq '.items[].title'
# Spreadsheet → fixed-column CSV
yt-research videos top @examplecreator --limit 50 --format csv --output top-videos.csv
JSON output includes a schema version, command metadata, the resolved channel, the effective query, result items, and request counts. Analysis reports add typed summary and publication-cohort sections while retaining the same envelope. See the JSON output contract for the stable shape.
📚 Documentation
| Guide | Description |
|---|---|
| Command reference | Every command, option, and exit code |
| API key setup | Google Cloud setup and credential security |
| JSON output contract | Stable output schema for integrations |
| Troubleshooting | Common authentication, quota, and network issues |
| Codex integration | Optional setup for agent-driven research |
Scope and privacy
yt-research does not use OAuth or access private account data. It does not
download videos, retrieve transcripts or comments, classify Shorts, or run as a
hosted service. API calls consume quota from the Google Cloud project associated
with your key. Analysis reports may traverse every upload in the selected
window because aggregate metrics must not be truncated; use a bounded date
window and title match to keep quota use focused.
Contributing
Contributions are welcome. Read the contributing guide, Code of Conduct, and Security Policy before opening a contribution.
License
Released under the MIT License.
Built for curious people, repeatable research, and clean data.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yt_research-0.2.0.tar.gz.
File metadata
- Download URL: yt_research-0.2.0.tar.gz
- Upload date:
- Size: 521.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ab40191c739842ca4fce09508b126fc184f726c0e22f1b871d8b3a28afc4824
|
|
| MD5 |
cd2370bc965f389b1982a650a22fe285
|
|
| BLAKE2b-256 |
2e9e8c87fe0c902dc97e4caa8067a2e65507d96d1dc4d98a110205dce0cd9b85
|
Provenance
The following attestation bundles were made for yt_research-0.2.0.tar.gz:
Publisher:
release.yml on vedntp/yt-research
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yt_research-0.2.0.tar.gz -
Subject digest:
6ab40191c739842ca4fce09508b126fc184f726c0e22f1b871d8b3a28afc4824 - Sigstore transparency entry: 2699563938
- Sigstore integration time:
-
Permalink:
vedntp/yt-research@925fd3c7ce1072978619e1b04dd5c063b8fe29be -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/vedntp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@925fd3c7ce1072978619e1b04dd5c063b8fe29be -
Trigger Event:
push
-
Statement type:
File details
Details for the file yt_research-0.2.0-py3-none-any.whl.
File metadata
- Download URL: yt_research-0.2.0-py3-none-any.whl
- Upload date:
- Size: 28.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cb7083e72cdfff70560e0e57ed00d2c9d8b6e8b95d5c525096ffad752193e5e
|
|
| MD5 |
ef1ba91aa30062b12608c44d99e507d7
|
|
| BLAKE2b-256 |
d6da23bd99db1efc426baa6a097da70e6baf3839f3c301e6d635560082fb7d87
|
Provenance
The following attestation bundles were made for yt_research-0.2.0-py3-none-any.whl:
Publisher:
release.yml on vedntp/yt-research
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yt_research-0.2.0-py3-none-any.whl -
Subject digest:
7cb7083e72cdfff70560e0e57ed00d2c9d8b6e8b95d5c525096ffad752193e5e - Sigstore transparency entry: 2699564054
- Sigstore integration time:
-
Permalink:
vedntp/yt-research@925fd3c7ce1072978619e1b04dd5c063b8fe29be -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/vedntp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@925fd3c7ce1072978619e1b04dd5c063b8fe29be -
Trigger Event:
push
-
Statement type: