finding-trending-twitter-topics-for-content

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Finding Trending Twitter Topics for Content

查找Twitter热门话题用于内容创作

Identifies trending conversations in a niche on Twitter to inform timely content. Twitter trends are 48–72 hour windows — act fast or pivot to the evergreen angle.
识别Twitter某细分领域的热门对话,为时效性内容创作提供参考。Twitter热门话题的窗口期为48–72小时——需快速行动,或转向常青内容角度。

Prerequisites

前提条件

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

Inputs

输入参数

ParameterTypeRequiredDefaultNotes
searchTerms
array
[]
Twitter advanced search queries (e.g.
["#AI lang:en", "from:NASA"]
)
sort
stringOptional
Top
Sort order:
Latest
,
Top
, or
Latest+Top
tweetLanguage
stringOptionalISO 639-1 language code (e.g.
en
)
maxItems
numberOptionalUnlimitedMaximum tweets to return
onlyVerifiedUsers
booleanOptional
false
Only tweets from verified users
onlyTwitterBlue
booleanOptional
false
Only Twitter Blue subscribers
onlyImage
booleanOptional
false
Only tweets with images
onlyVideo
booleanOptional
false
Only tweets with videos
onlyQuote
booleanOptional
false
Only quote tweets
author
stringOptionalFilter to a specific author handle
inReplyTo
stringOptionalTweets replying to a specific handle
mentioning
stringOptionalTweets mentioning a specific handle
geotaggedNear
stringOptionalTweets near a location
withinRadius
stringOptionalRadius around geotaggedNear
geocode
stringOptionalLat/lng + radius string
placeObjectId
stringOptionalTweets tagged with a place
minimumRetweets
numberOptionalMinimum retweet count
minimumFavorites
numberOptionalMinimum like count
minimumReplies
numberOptionalMinimum reply count
start
stringOptionalTweets after this date (YYYY-MM-DD)
end
stringOptionalTweets before this date (YYYY-MM-DD)
includeSearchTerms
booleanOptional
false
Add the matched search term to each tweet
customMapFunction
stringOptionalJavaScript function to transform each output object
参数类型是否必填默认值说明
searchTerms
数组
[]
Twitter高级搜索查询(例如
["#AI lang:en", "from:NASA"]
sort
字符串可选
Top
排序方式:
Latest
Top
Latest+Top
tweetLanguage
字符串可选ISO 639-1语言代码(例如
en
maxItems
数字可选无限制返回的最大推文数量
onlyVerifiedUsers
布尔值可选
false
仅返回认证用户的推文
onlyTwitterBlue
布尔值可选
false
仅返回Twitter Blue订阅用户的推文
onlyImage
布尔值可选
false
仅返回带图片的推文
onlyVideo
布尔值可选
false
仅返回带视频的推文
onlyQuote
布尔值可选
false
仅返回引用推文
author
字符串可选筛选特定作者的推文(用户名)
inReplyTo
字符串可选筛选回复特定用户名的推文
mentioning
字符串可选筛选提及特定用户名的推文
geotaggedNear
字符串可选筛选特定地点附近的推文
withinRadius
字符串可选
geotaggedNear
参数对应的范围半径
geocode
字符串可选纬度/经度 + 半径字符串
placeObjectId
字符串可选筛选标记了特定地点的推文
minimumRetweets
数字可选最低转发量
minimumFavorites
数字可选最低点赞量
minimumReplies
数字可选最低回复量
start
字符串可选筛选此日期之后的推文(格式:YYYY-MM-DD)
end
字符串可选筛选此日期之前的推文(格式:YYYY-MM-DD)
includeSearchTerms
布尔值可选
false
为每条推文添加匹配的搜索词
customMapFunction
字符串可选用于转换每个输出对象的JavaScript函数

Workflow

工作流程

Progress:
- [ ] Step 1: Search niche keywords + trending signals
- [ ] Step 2: Extract high-engagement tweet clusters
- [ ] Step 3: Identify topic themes and their velocity
- [ ] Step 4: Score content opportunity per topic
- [ ] Step 5: Deliver trending topic brief
进度:
- [ ] 步骤1:搜索细分领域关键词 + 热门信号
- [ ] 步骤2:提取高互动推文集群
- [ ] 步骤3:识别话题主题及其传播速度
- [ ] 步骤4:为每个话题打分内容机会值
- [ ] 步骤5:交付热门话题简报

Step 1: Search Tweets

步骤1:搜索推文

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~tweet-scraper"
--input '{"param": "value"}'
node scripts/run_actor.js
--actor "apidojo~tweet-scraper"
--input '{"param": "value"}'

Save as CSV

保存为CSV格式

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

Save as JSON

保存为JSON格式

node scripts/run_actor.js
--actor "apidojo~tweet-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~tweet-scraper" Input: { "searchTerms": ["[NICHE]", "#[niche]", "[NICHE] [current_year]"], "maxItems": 500, "tweetLanguage": "en", "since": "[7 days ago]" }

**REST API fallback:**
```bash
curl -X POST   "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs?token=$APIFY_TOKEN"   -H "Content-Type: application/json"   -d '{
    "searchTerms": ["B2B SaaS", "#saas", "B2B SaaS 2026"],
    "maxItems": 500,
    "tweetLanguage": "en"
  }'
node scripts/run_actor.js
--actor "apidojo~tweet-scraper"
--input '{"param": "value"}'
--output YYYY-MM-DD_results.json --format json
> 需在环境变量或`.env`文件中设置`APIFY_TOKEN`。

**如果Apify MCP可用:**
工具: apify:run-actor Actor: "apidojo~tweet-scraper" Input: { "searchTerms": ["[细分领域]", "#[细分领域]", "[细分领域] [当前年份]"], "maxItems": 500, "tweetLanguage": "en", "since": "[7天前]" }

**REST API备用方案:**
```bash
curl -X POST   "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs?token=$APIFY_TOKEN"   -H "Content-Type: application/json"   -d '{
    "searchTerms": ["B2B SaaS", "#saas", "B2B SaaS 2026"],
    "maxItems": 500,
    "tweetLanguage": "en"
  }'

Step 2: Identify Trending Topics

步骤2:识别热门话题

Group tweets by topic cluster using keyword co-occurrence. For each cluster:
topic_velocity = count_of_tweets_in_cluster
topic_engagement = sum(likeCount + replyCount * 3 + retweetCount * 2) / topic_velocity
Topic freshness:
freshness = proportion of cluster tweets from last 48 hours
通过关键词共现将推文按话题集群分组。对于每个集群:
topic_velocity = 集群内推文数量
topic_engagement = (点赞数总和 + 回复数总和*3 + 转发数总和*2) / topic_velocity
话题新鲜度:
freshness = 集群内近48小时发布的推文占比

Step 3: Score Content Opportunity

步骤3:为内容机会打分

opportunity_score = (topic_velocity / 50, max 1) * 0.30
                  + (topic_engagement / 100, max 1) * 0.30
                  + freshness * 0.20
                  + (top_tweet_by_influencer ? 1 : 0) * 0.20
Content angle recommendation by freshness:
  • Freshness > 0.7 → "Timely reaction piece / hot take"; publish within 24h
  • Freshness 0.3–0.7 → "Analysis / deep dive"; publish within 72h
  • Freshness < 0.3 → "Evergreen explainer"; no urgency
opportunity_score = (topic_velocity / 50, 最大值1) * 0.30
                  + (topic_engagement / 100, 最大值1) * 0.30
                  + freshness * 0.20
                  + (是否有网红发布的顶级推文 ? 1 : 0) * 0.20
根据新鲜度推荐内容角度:
  • 新鲜度 > 0.7 → "时效性回应/热点点评"; 24小时内发布
  • 新鲜度 0.3–0.7 → "分析/深度解读"; 72小时内发布
  • 新鲜度 < 0.3 → "常青内容讲解"; 无发布紧迫性

Step 4: Edge Cases

步骤4:边缘情况

  • Topic is news event, not evergreen: Flag as
    NEWS_REACTIVE
    — good for social media posts but risky for long-form content investment
  • Trending topic is negative controversy: Flag as
    RISK_TOPIC
    ; joining controversy can be brand-damaging; present option to "inform from a distance"
  • Niche too broad (returns unrelated topics): Add second qualifier — "B2B SaaS growth" not just "SaaS"
  • Trending terms are abbreviations or jargon: Define them in output for non-native audience clarity
  • 话题是新闻事件而非常青内容:标记为
    NEWS_REACTIVE
    — 适合社交媒体帖子,但不适合投入长内容创作
  • 热门话题是负面争议:标记为
    RISK_TOPIC
    ; 参与争议可能损害品牌形象; 提供"保持距离式报道"的选项
  • 细分领域过宽(返回无关话题):添加第二个限定词 — 比如用"B2B SaaS增长"而非仅"SaaS"
  • 热门术语是缩写或行话:在输出中为非本土受众进行定义说明

Output Format

输出格式

undefined
undefined

Trending Twitter Topics: [NICHE]

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

Period: [DATE_RANGE] | Tweets analyzed: [N] | Topic clusters identified: [N] | Date: [DATE]
时间段: [日期范围] | 分析推文数量: [N] | 识别话题集群数量: [N] | 日期: [日期]

Top Trending Topics

顶级热门话题

#TopicTweetsAvg EngagementFreshnessTypeScore
1[topic][N][N][X%][TRENDING/NEWS/EVERGREEN][0.XX]
#话题推文数量平均互动量新鲜度类型得分
1[话题][N][N][X%][TRENDING/NEWS/EVERGREEN][0.XX]

Content Opportunities

内容机会

1. [Topic Name] (Score: [X])

1. [话题名称] (得分: [X])

Volume: [N] tweets | Avg engagement: [N] | Freshness: [X%] Angle: [recommended content format and angle] Top tweet: @[handle] ([N] likes): "[excerpt]"
推文数量: [N] | 平均互动量: [N] | 新鲜度: [X%] 角度: [推荐的内容形式与角度] 顶级推文: @[用户名] ([N] 点赞): "[节选]"

2. [Topic Name] ...

2. [话题名称] ...

Hashtag Map

话题标签映射

HashtagUsage CountAvg LikesCo-used With
undefined
话题标签使用次数平均点赞数共同使用的标签
undefined

Troubleshooting

故障排除

No trending topics (flat distribution): Niche may not be particularly active on Twitter; try extending to 14-day window or switching to Reddit for content research in this niche. All topics are political/news: Add niche qualifier more aggressively in search terms; most general news topics will surface on any broad search. Content idea doesn't fit your format: Trending topics are inputs, not prescriptions — adapt the angle to your format (e.g. a Twitter controversy about pricing → a blog post "How to Communicate Pricing Changes").
无热门话题(分布平缓):该细分领域在Twitter上可能不够活跃; 尝试将时间窗口延长至14天,或切换到Reddit进行该领域的内容调研。 所有话题均为政治/新闻类:在搜索词中更严格地添加细分领域限定词; 大多数通用新闻话题会在任何宽泛搜索中出现。 创意不符合你的内容形式:热门话题只是输入,并非硬性规定 — 可调整角度适配你的内容形式(例如,Twitter上关于定价的争议 → 博客文章《如何传达价格变动》)。