youtube-research

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

YouTube Research

YouTube 内容调研

Research high-performing YouTube outlier videos, analyze top content with AI, and generate actionable reports.
借助工具研究表现优异的YouTube异常视频(outlier videos),利用AI分析优质内容并生成可落地的报告。

Prerequisites

前置条件

  • TUBELAB_API_KEY
    environment variable. Get key from https://tubelab.net/settings/api
  • GEMINI_API_KEY
    environment variable (for video analysis)
  • google-genai
    and
    requests
    Python packages
  • TUBELAB_API_KEY
    环境变量。可从 https://tubelab.net/settings/api 获取密钥
  • GEMINI_API_KEY
    环境变量(用于视频分析)
  • google-genai
    requests
    Python 包

Workflow

工作流程

Step 1: Create Run Folder

步骤1:创建运行文件夹

bash
mkdir -p youtube-research/$(date +%Y-%m-%d_%H%M%S)
bash
mkdir -p youtube-research/$(date +%Y-%m-%d_%H%M%S)

Step 2: Get Channel ID

步骤2:获取频道ID

Read
.claude/context/youtube-channel.md
to get the channel ID.
读取
.claude/context/youtube-channel.md
文件获取频道ID。

Step 3: Fetch Channel Videos

步骤3:获取频道视频数据

bash
python scripts/get_channel_videos.py CHANNEL_ID --format summary
This returns JSON with the channel's video titles and view counts.
bash
python scripts/get_channel_videos.py CHANNEL_ID --format summary
该命令返回包含频道视频标题和播放量的JSON数据。

Step 4: Analyze Channel

步骤4:分析频道

Analyze the channel data to extract:
  • keywords: 4 search terms for the channel's direct niche
  • adjacent-keywords: 4 search terms for topics the same audience watches
  • audience: 2-3 profiles with objections, transformations, stakes
  • formulas: Reusable title templates
See
references/channel-analysis-schema.md
for the full schema and example output.
分析频道数据以提取:
  • keywords:频道核心细分领域的4个搜索关键词
  • adjacent-keywords:目标受众关注的相邻领域的4个搜索关键词
  • audience:2-3个受众画像,包含痛点、转化路径、核心诉求
  • formulas:可复用的标题模板
完整的输出格式和示例可查看
references/channel-analysis-schema.md

Step 5: Search for Outliers

步骤5:搜索异常表现视频

Run the outlier search with both keyword sets:
bash
python .claude/skills/youtube-research/scripts/find_outliers.py \
  --keywords "keyword1" "keyword2" "keyword3" "keyword4" \
  --adjacent-keywords "adjacent1" "adjacent2" "adjacent3" "adjacent4" \
  --output-dir youtube-research/{run-folder} \
  --top 5
This runs two searches:
  • Direct niche: keywords with 5K+ views threshold
  • Adjacent audience: adjacent-keywords with 10K+ views threshold
Output files:
  • outliers.json
    - All outliers normalized for video analysis
  • report.md
    - Basic markdown report
  • thumbnails/*.jpg
    - Video thumbnails
  • transcripts/*.txt
    - Video transcripts
使用两组关键词运行异常视频搜索:
bash
python .claude/skills/youtube-research/scripts/find_outliers.py \
  --keywords "keyword1" "keyword2" "keyword3" "keyword4" \
  --adjacent-keywords "adjacent1" "adjacent2" "adjacent3" "adjacent4" \
  --output-dir youtube-research/{run-folder} \
  --top 5
该命令会执行两类搜索:
  • 核心细分领域:使用keywords,播放量阈值为5000+次
  • 相邻受众领域:使用adjacent-keywords,播放量阈值为10000+次
输出文件:
  • outliers.json
    :所有标准化后的异常视频数据,用于后续分析
  • report.md
    :基础Markdown报告
  • thumbnails/*.jpg
    :视频缩略图
  • transcripts/*.txt
    :视频字幕

Step 6: Filter Relevant Videos for Analysis

步骤6:筛选用于分析的相关视频

Read
outliers.json
and the user's niche from
.claude/context/youtube-channel.md
.
CRITICAL: Select MAX 3 videos that are most relevant to the user's niche. Filter by:
  1. Title relevance: Title contains keywords related to user's niche/topics
  2. Transcript relevance: If transcript exists, check it mentions relevant topics
  3. Direct niche priority: Prefer videos from direct keyword search over adjacent
Skip videos that are clearly outside the user's content style (e.g., entertainment/vlogs when user does tutorials).
Write the filtered videos to
{RUN_FOLDER}/filtered-outliers.json
:
json
{
  "outliers": [/* max 3 relevant videos */],
  "filter_reason": "Selected based on relevance to [user's niche]"
}
读取
outliers.json
.claude/context/youtube-channel.md
中的用户细分领域信息。
关键要求:最多选择3个与用户细分领域最相关的视频,筛选标准如下:
  1. 标题相关性:标题包含与用户细分领域/主题相关的关键词
  2. 字幕相关性:若存在字幕,需确认其提及相关主题
  3. 核心领域优先级:优先选择核心关键词搜索结果中的视频,而非相邻领域
跳过明显不符合用户内容风格的视频(例如用户做教程类内容,却选择娱乐/vlog类视频)。
将筛选后的视频写入
{RUN_FOLDER}/filtered-outliers.json
json
{
  "outliers": [/* 最多3个相关视频 */],
  "filter_reason": "基于与[用户细分领域]的相关性筛选"
}

Step 7: Analyze Top Videos with AI

步骤7:使用AI分析优质视频

bash
python3 .claude/skills/video-content-analyzer/scripts/analyze_videos.py \
  --input {RUN_FOLDER}/filtered-outliers.json \
  --output {RUN_FOLDER}/video-analysis.json \
  --platform youtube \
  --max-videos 3
Extracts from each video:
  • Hook technique and replicable formula
  • Content structure and sections
  • Retention techniques
  • CTA strategy
See the
video-content-analyzer
skill for full output schema and hook/format types.
bash
python3 .claude/skills/video-content-analyzer/scripts/analyze_videos.py \
  --input {RUN_FOLDER}/filtered-outliers.json \
  --output {RUN_FOLDER}/video-analysis.json \
  --platform youtube \
  --max-videos 3
从每个视频中提取以下信息:
  • 钩子技巧及可复用公式
  • 内容结构与板块划分
  • 留存用户的技巧
  • CTA策略
完整的输出格式和钩子/内容类型可查看
video-content-analyzer
技能文档。

Step 8: Generate Final Report

步骤8:生成最终报告

Read
{RUN_FOLDER}/outliers.json
and
{RUN_FOLDER}/video-analysis.json
, then generate
{RUN_FOLDER}/report.md
.
Report Structure:
markdown
undefined
读取
{RUN_FOLDER}/outliers.json
{RUN_FOLDER}/video-analysis.json
,然后生成
{RUN_FOLDER}/report.md
报告结构:
markdown
undefined

YouTube Research Report

YouTube 内容调研报告

Generated: {date}
生成日期:{date}

Top Performing Hooks

高表现钩子Top榜单

Ranked by engagement. Use these formulas for your content.
按互动量排序。可直接复用这些公式创作内容。

Hook 1: {technique} - {channelTitle}

钩子1:{technique} - {channelTitle}

  • Video: "{title}"
  • Opening: "{opening_line}"
  • Why it works: {attention_grab}
  • Replicable Formula: {replicable_formula}
  • Views: {viewCount} | zScore: {zScore}
  • Watch Video
[Repeat for each analyzed video]
  • 视频:"{title}"
  • 开场台词:"{opening_line}"
  • 有效原因:{attention_grab}
  • 可复用公式:{replicable_formula}
  • 播放量:{viewCount} | zScore:{zScore}
  • 观看视频
[为每个分析的视频重复上述结构]

Content Structure Patterns

内容结构模式

VideoFormatPacingKey Retention Techniques
{title}{format}{pacing}{techniques}
视频格式节奏核心留存技巧
{title}{format}{pacing}{techniques}

CTA Strategies

CTA策略

VideoCTA TypeCTA TextPlacement
{title}{type}"{cta_text}"{placement}
视频CTA类型CTA文案放置位置
{title}{type}"{cta_text}"{placement}

All Outliers

所有异常表现视频

Direct Niche

核心细分领域

RankChannelTitleViewszScore
[List direct niche outliers]
排名频道标题播放量zScore
[列出核心领域的异常视频]

Adjacent Audience

相邻受众领域

RankChannelTitleViewszScore
[List adjacent outliers]
排名频道标题播放量zScore
[列出相邻领域的异常视频]

Actionable Takeaways

可落地行动建议

[Synthesize patterns into 4-6 specific recommendations based on video analysis]

Focus on actionable insights. The "Top Performing Hooks" section with replicable formulas should be prominent.
[基于视频分析总结4-6条具体的行动建议]

报告需聚焦可落地的洞察,其中包含可复用公式的「高表现钩子Top榜单」部分需突出展示。

Quick Reference

快速参考

Full pipeline:
bash
RUN_FOLDER="youtube-research/$(date +%Y-%m-%d_%H%M%S)" && mkdir -p "$RUN_FOLDER" && \
python .claude/skills/youtube-research/scripts/find_outliers.py \
  --keywords "k1" "k2" "k3" "k4" \
  --adjacent-keywords "a1" "a2" "a3" "a4" \
  --output-dir "$RUN_FOLDER" --top 5
Then filter outliers for niche relevance (max 3), run video analysis, and generate the report.
完整流程命令:
bash
RUN_FOLDER="youtube-research/$(date +%Y-%m-%d_%H%M%S)" && mkdir -p "$RUN_FOLDER" && \
python .claude/skills/youtube-research/scripts/find_outliers.py \
  --keywords "k1" "k2" "k3" "k4" \
  --adjacent-keywords "a1" "a2" "a3" "a4" \
  --output-dir "$RUN_FOLDER" --top 5
之后筛选出与细分领域相关的异常视频(最多3个),运行视频分析,最后生成报告。

Script Reference

脚本参考

get_channel_videos.py

get_channel_videos.py

python .claude/skills/youtube-research/scripts/get_channel_videos.py CHANNEL_ID [--format json|summary]
ArgDescription
CHANNEL_ID
YouTube channel ID (24 chars)
--format
json
(full data) or
summary
(for analysis)
python .claude/skills/youtube-research/scripts/get_channel_videos.py CHANNEL_ID [--format json|summary]
参数描述
CHANNEL_ID
YouTube频道ID(24位字符)
--format
json
(完整数据)或
summary
(用于分析)

find_outliers.py

find_outliers.py

python .claude/skills/youtube-research/scripts/find_outliers.py --keywords K1 K2 K3 K4 --adjacent-keywords A1 A2 A3 A4 --output-dir DIR [options]
ArgDescription
--keywords
Direct niche keywords (4 recommended)
--adjacent-keywords
Adjacent topic keywords (4 recommended)
--output-dir
Output directory (required)
--top
Videos per category (default: 5)
--days
Days back to search (default: 30)
--json
Also save raw JSON data
Output:
outliers.json
,
report.md
,
thumbnails/
,
transcripts/
python .claude/skills/youtube-research/scripts/find_outliers.py --keywords K1 K2 K3 K4 --adjacent-keywords A1 A2 A3 A4 --output-dir DIR [options]
参数描述
--keywords
核心细分领域关键词(推荐4个)
--adjacent-keywords
相邻领域关键词(推荐4个)
--output-dir
输出目录(必填)
--top
每个分类返回的视频数量(默认:5)
--days
搜索的时间范围(默认:30天)
--json
同时保存原始JSON数据
输出内容:
outliers.json
report.md
thumbnails/
transcripts/

Scoring Algorithm

评分算法

Videos ranked by:
zScore × recency_boost
  • zScore: How much video outperforms its channel average
  • recency_boost: 1.0 for today, decays 5%/day (min 0.3×)
视频排名公式:
zScore × recency_boost
  • zScore:视频表现超出频道平均水平的程度
  • recency_boost:当日视频为1.0,每日衰减5%(最低0.3倍)