关于 monitoring-trending-topics-twitter-by-niche
此技能使用 apidojo 推文抓取器监测 Twitter 细分领域的趋势话题,并指导搜索、筛选、趋势分类和评分,适用于营销研究。
主要功能
- 01Twitter 搜索词监测
- 02按日期、互动量和媒体筛选
- 03按趋势速度分类
- 04评分并整理结果
适用场景
- 01追踪细分市场的新兴话题
- 02按作者或地理位置筛选推文
- 03导出经过筛选的趋势结果
MCP 相关
可通过 Apify MCP 的 apify:run-actor 工具运行 apidojo~tweet-scraper;也可使用脚本或 REST API。
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ apidojo-io/ apidojo-skills --skill monitoring-trending-topics-twitter-by-niche安装后在 Claude Code 中输入/monitoring-trending-topics-twitter-by-niche确认已加载。
详细介绍
按细分领域监控 Twitter 热门话题
使用 apidojo 抓取工具按细分领域监控 Twitter 热门话题。属于 apidojo intelligence 技能库的一部分。
前置条件
- 已设置
APIFY_TOKEN环境变量 - 可选:已安装 Apify MCP 服务
输入
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
searchTerms | array | ✅ | [] | Twitter 高级搜索查询(例如 ["#AI lang:en", "from:NASA"]) |
sort | string | 可选 | Top | 排序方式:Latest、Top 或 Latest+Top |
tweetLanguage | string | 可选 | — | ISO 639-1 语言代码(例如 en) |
maxItems | number | 可选 | Unlimited | 返回推文的最大数量 |
onlyVerifiedUsers | boolean | 可选 | false | 仅包含来自已验证用户的推文 |
onlyTwitterBlue | boolean | 可选 | false | 仅包含 Twitter Blue 订阅用户的推文 |
onlyImage | boolean | 可选 | false | 仅包含带图片的推文 |
onlyVideo | boolean | 可选 | false | 仅包含带视频的推文 |
onlyQuote | boolean | 可选 | false | 仅包含引用推文 |
author | string | 可选 | — | 筛选特定作者账号的推文 |
inReplyTo | string | 可选 | — | 回复特定账号的推文 |
mentioning | string | 可选 | — | 提及特定账号的推文 |
geotaggedNear | string | 可选 | — | 特定地点附近的推文 |
withinRadius | string | 可选 | — | geotaggedNear 周边的半径 |
geocode | string | 可选 | — | 纬度/经度 + 半径字符串 |
placeObjectId | string | 可选 | — | 标记了地点的推文 |
minimumRetweets | number | 可选 | — | 最低转发数 |
minimumFavorites | number | 可选 | — | 最低点赞数 |
minimumReplies | number | 可选 | — | 最低回复数 |
start | string | 可选 | — | 此日期之后的推文(YYYY-MM-DD) |
end | string | 可选 | — | 此日期之前的推文(YYYY-MM-DD) |
includeSearchTerms | boolean | 可选 | false | 在每条推文中添加匹配的搜索词 |
customMapFunction | string | 可选 | — | 用于转换每个输出对象的 JavaScript 函数 |
工作流
Progress:
- [ ] Step 1: Define parameters
- [ ] Step 2: Run tweet-scraper
- [ ] Step 3: Filter and classify results
- [ ] Step 4: Score by quality and relevance
- [ ] Step 5: Deliver output
步骤 2:运行 Actor
推荐 — run_actor.js(自动处理等待、输出和文件保存):
# Quick answer (prints table to chat)
node scripts/run_actor.js \
--actor "apidojo~tweet-scraper" \
--input '{"param": "value"}'
# Save as CSV
node scripts/run_actor.js \
--actor "apidojo~tweet-scraper" \
--input '{"param": "value"}' \
--output YYYY-MM-DD_results.csv --format csv
# Save as JSON
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 可用:
Tool: apify:run-actor
Actor: "apidojo~tweet-scraper"
Input:
{
"searchTerms": ["[NICHE]", "#[niche]trending", "[NICHE] breaking"],
"maxItems": 100
}
REST API 备用方案:
curl -X POST \
"https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"searchTerms": ["[NICHE]", "#[niche]trending", "[NICHE] breaking"], "maxItems": 100}'
等待状态变为 SUCCEEDED。获取数据集:
curl "https://api.apify.com/v2/actor-runs/$RUN_ID/dataset/items?token=$APIFY_TOKEN"
步骤 3:对结果分类
classification: BREAKING (velocity > 3×) | RISING (1.5-3×) | STEADY (0.8-1.5×) | DECLINING (< 0.8×)
步骤 4:为每条结果评分
score = trend_velocity = count(tweets_in_last_24h) / count(tweets_in_prior_24h)
步骤 5:边缘情况
- 区分细分领域内的热门话题与 Twitter 全站热门话题 — 检查共同出现的关键词,确认话题确实与该细分领域相关
其他备用方案:
- 结果少于 20 条:扩大搜索词范围;移除次要筛选条件
- 无结果:确认搜索词无误;尝试其他表达方式
- 数据质量问题:移除缺少关键字段的条目;在输出中注明数量
输出格式
# Monitoring Trending Topics Twitter By Niche
Results: [N] | Date: [DATE]
| # | [Key Field] | [Metric 1] | [Metric 2] | [Classification] | [Score] |
|---|------------|-----------|-----------|-----------------|---------|
| 1 | [value] | [value] | [value] | [type] | [0.XX] |
## Summary
Top result: [description]
Key finding: [insight]
故障排除
结果过少: 扩大主要搜索词的范围;移除限制性筛选条件。 结果质量较低: 应用最低分数阈值(≥ 0.50)以过滤噪声。 Actor 运行失败: 确认 API 密钥;在 apify.com/apidojo 查看 Actor 状态。
评论
支持 Markdown