tracking-youtube-trending-topics-by-niche

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Tracking YouTube Trending Topics by Niche

按细分领域追踪YouTube热门话题

Identifies what's performing on YouTube in a specific niche by analyzing recent high-view videos. Surfaces repeatable title formulas, content formats, and topic themes that the YouTube algorithm is currently favoring.
通过分析近期高播放量视频,确定特定细分领域内在YouTube上表现出色的内容。挖掘YouTube算法当前青睐的可复用标题公式、内容格式及主题方向。

Prerequisites

前提条件

  • APIFY_TOKEN
    environment variable set
  • Optional: Apify MCP server installed
  • 已设置
    APIFY_TOKEN
    环境变量
  • 可选:已安装Apify MCP服务器

Inputs

输入参数

ParameterTypeRequiredDefaultNotes
startUrls
arrayOptional
[]
YouTube URLs — channels, playlists, Shorts, search results
youtubeHandles
arrayOptional
[]
YouTube channel handles (e.g.
@kurzgesagt
)
getTrending
booleanOptional
false
Retrieve trending videos
keywords
arrayOptional
[]
Search keywords
gl
stringOptional
us
Country code for results (e.g.
US
,
GB
)
hl
stringOptional
en
Language code (e.g.
en
,
de
)
uploadDate
stringOptional
all
Upload date filter:
any
,
hour
,
today
,
week
,
month
,
year
duration
stringOptional
all
Duration filter:
any
,
short
,
long
features
stringOptional
all
Feature filter:
4k
,
hd
,
live
,
cc
,
3d
,
hdr
, etc.
sort
stringOptional
r
Sort order for search results
maxItems
numberOptionalUnlimitedMaximum videos to return
customMapFunction
stringOptionalJavaScript function to transform each output object
参数类型是否必填默认值说明
startUrls
数组可选
[]
YouTube链接 — 频道、播放列表、Shorts、搜索结果
youtubeHandles
数组可选
[]
YouTube频道账号(例如
@kurzgesagt
getTrending
布尔值可选
false
获取热门视频
keywords
数组可选
[]
搜索关键词
gl
字符串可选
us
结果对应的国家代码(例如
US
,
GB
hl
字符串可选
en
语言代码(例如
en
,
de
uploadDate
字符串可选
all
上传日期筛选:
any
(任意时间)、
hour
(最近1小时)、
today
(今天)、
week
(最近一周)、
month
(最近一个月)、
year
(最近一年)
duration
字符串可选
all
时长筛选:
any
(任意时长)、
short
(短视频)、
long
(长视频)
features
字符串可选
all
功能筛选:
4k
hd
live
(直播)、
cc
(字幕)、
3d
hdr
sort
字符串可选
r
搜索结果的排序方式
maxItems
数字可选无限制返回的最大视频数量
customMapFunction
字符串可选用于转换每个输出对象的JavaScript函数

Workflow

工作流程

Progress:
- [ ] Step 1: Search for recent high-performing videos in niche
- [ ] Step 2: Extract title patterns and topics
- [ ] Step 3: Score trending momentum
- [ ] Step 4: Identify format and structural patterns
- [ ] Step 5: Deliver trend brief
进度:
- [ ] 步骤1:搜索细分领域内近期表现优异的视频
- [ ] 步骤2:提取标题模式与主题
- [ ] 步骤3:计算热门势头得分
- [ ] 步骤4:识别格式与结构模式
- [ ] 步骤5:交付趋势简报

Step 1: Search YouTube

步骤1:搜索YouTube

Recommended — run_actor.js (handles waiting, output, and file saving automatically):
bash
undefined
推荐方式 — run_actor.js(自动处理等待、输出及文件保存):
bash
undefined

Quick answer (prints table to chat)

快速输出(在聊天窗口打印表格)

node scripts/run_actor.js
--actor "apidojo~youtube-scraper"
--input '{"param": "value"}'
node scripts/run_actor.js
--actor "apidojo~youtube-scraper"
--input '{"param": "value"}'

Save as CSV

保存为CSV文件

node scripts/run_actor.js
--actor "apidojo~youtube-scraper"
--input '{"param": "value"}'
--output YYYY-MM-DD_results.csv --format csv
node scripts/run_actor.js
--actor "apidojo~youtube-scraper"
--input '{"param": "value"}'
--output YYYY-MM-DD_results.csv --format csv

Save as JSON

保存为JSON文件

node scripts/run_actor.js
--actor "apidojo~youtube-scraper"
--input '{"param": "value"}'
--output YYYY-MM-DD_results.json --format json
> `APIFY_TOKEN` must be set in environment or `.env` file.

**If Apify MCP is available:**
Tool: apify:run-actor Actor: "apidojo~youtube-scraper" Input: { "searchKeywords": ["[NICHE]", "best [NICHE]", "[NICHE] 2026", "[NICHE] for beginners"], "maxResults": 50, "type": "video" }

**REST API fallback:**
```bash
curl -X POST   "https://api.apify.com/v2/acts/apidojo~youtube-scraper/runs?token=$APIFY_TOKEN"   -H "Content-Type: application/json"   -d '{"searchKeywords": ["personal finance tips", "best investing 2026", "investing for beginners"], "maxResults": 50}'
node scripts/run_actor.js
--actor "apidojo~youtube-scraper"
--input '{"param": "value"}'
--output YYYY-MM-DD_results.json --format json
> `APIFY_TOKEN`必须在环境变量或`.env`文件中设置。

**若Apify MCP可用:**
工具: apify:run-actor Actor: "apidojo~youtube-scraper" 输入: { "searchKeywords": ["[NICHE]", "best [NICHE]", "[NICHE] 2026", "[NICHE] for beginners"], "maxResults": 50, "type": "video" }

**REST API备选方案:**
```bash
curl -X POST   "https://api.apify.com/v2/acts/apidojo~youtube-scraper/runs?token=$APIFY_TOKEN"   -H "Content-Type: application/json"   -d '{"searchKeywords": ["personal finance tips", "best investing 2026", "investing for beginners"], "maxResults": 50}'

Step 2: Analyze Title Patterns

步骤2:分析标题模式

Classify each video title:
title_formula:
  NUMBER_LIST = "Top [N]", "[N] Best", "[N] Things"
  HOW_TO = "How to", "Step-by-step", "The Complete Guide"
  VS_COMPARISON = "vs", "or", "Which is Better"
  WARNING = "Avoid", "Mistake", "Stop Doing", "Don't"
  STORY = "I tried", "What happened when", first-person
  YEAR_SPECIFIC = contains current year → high freshness signal
对每个视频标题进行分类:
title_formula:
  NUMBER_LIST = "Top [N]", "[N] Best", "[N] Things"
  HOW_TO = "How to", "Step-by-step", "The Complete Guide"
  VS_COMPARISON = "vs", "or", "Which is Better"
  WARNING = "Avoid", "Mistake", "Stop Doing", "Don't"
  STORY = "I tried", "What happened when", first-person
  YEAR_SPECIFIC = 包含当前年份 → 高新鲜度信号

Step 3: Score Trending Momentum

步骤3:计算热门势头得分

momentum = viewCount / days_since_published  # views per day

trend_score = (momentum / 10000, max 1) * 0.40
            + (likeCount / viewCount * 100 > 4 ? 1 : ratio/4) * 0.30
            + (commentCount / viewCount * 100 > 0.3 ? 1 : ratio/0.3) * 0.30
momentum = viewCount / days_since_published  # 每日播放量

trend_score = (momentum / 10000, max 1) * 0.40
            + (likeCount / viewCount * 100 > 4 ? 1 : ratio/4) * 0.30
            + (commentCount / viewCount * 100 > 0.3 ? 1 : ratio/0.3) * 0.30

Step 4: Edge Cases

步骤4:边缘情况处理

  • All trending videos from one channel: Likely a dominant creator in the niche — note this; it's a competitive signal, not a format trend. Look at the second and third most-viewed creators for broader signals
  • Niche is very small (< 10 videos above threshold): Lower
    min_views
    to 10K; report available data
  • Year-specific content dominates: Good sign for content with year in title — recommend "[niche] [year+1]" format as a strong ranking opportunity
  • 所有热门视频均来自同一频道:该频道可能是细分领域内的主导创作者 — 需记录这一竞争信号,而非格式趋势。查看播放量第二、第三的创作者以获取更广泛的趋势信号
  • 细分领域规模极小(符合阈值的视频不足10个):将
    min_views
    降至10K;基于现有数据生成报告
  • 年份相关内容占主导:这是标题中包含年份的内容的积极信号 — 推荐采用“[细分领域] [下一年]”的格式,这是一个良好的排名机会

Output Format

输出格式

undefined
undefined

YouTube Trending Topics: [NICHE]

YouTube热门话题:[细分领域]

Videos analyzed: [N] | Above threshold ([MIN_VIEWS] views): [N] | Date: [DATE]
分析视频数量:[N] | 超过阈值([MIN_VIEWS]播放量):[N] | 日期:[DATE]

Top Title Formulas (by Avg Views)

热门标题公式(按平均播放量排序)

Formula# VideosAvg ViewsAvg Like RateBest Example
Number List[N][N][X%]"[title]"
How-To[N][N][X%]
公式视频数量平均播放量平均点赞率最佳示例
数字列表[N][N][X%]"[标题]"
教程类[N][N][X%]

Top Performing Videos

表现最佳的视频

TitleViewsMomentum (views/day)Like RateTrend Score
标题播放量势头(每日播放量)点赞率趋势得分

Trending Topic Themes

热门主题方向

  1. [Theme] — [N] videos, [N] total views
  2. [Theme]
  1. [主题] — [N]个视频,总播放量[N]
  2. [主题]

Recommended Video Ideas

推荐视频创意

Based on trending patterns:
  1. "[Specific video title recommendation using a winning formula]"
  2. "[Video title recommendation]"
undefined
基于热门模式:
  1. "[采用成功公式的具体视频标题推荐]"
  2. "[视频标题推荐]"
undefined

Troubleshooting

故障排除

Results skewed by one old viral video: Filter by
published_date
in the
date_range
; sort by momentum (views/day) not total views. Title formulas are too generic: This is normal — YouTube title strategies are well-known. The value is in the specific topic within the formula. Niche has no recent high-performers: The niche may be saturated or declining on YouTube; consider whether YouTube is the right platform for this content.
结果被单个旧爆款视频影响:在
date_range
中按
published_date
筛选;按势头(每日播放量)而非总播放量排序。 标题公式过于通用:这是正常现象 — YouTube标题策略已广为人知,价值在于公式内的特定主题。 细分领域近期无高表现内容:该领域在YouTube上可能已饱和或呈衰退趋势;需考虑YouTube是否为该内容的合适平台。