apify-trend-analysis
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTrend Analysis
趋势分析
Discover and track emerging trends using Apify Actors to extract data from multiple platforms.
使用Apify Actors从多个平台提取数据,发现并追踪新兴趋势。
Prerequisites
前提条件
(No need to check it upfront)
- file with
.envAPIFY_TOKEN - Node.js 20.6+ (for native support)
--env-file - CLI tool:
mcpcnpm install -g @apify/mcpc
(无需预先检查)
- 包含的
APIFY_TOKEN文件.env - Node.js 20.6+(支持原生功能)
--env-file - CLI工具:
mcpcnpm install -g @apify/mcpc
Workflow
工作流程
Copy this checklist and track progress:
Task Progress:
- [ ] Step 1: Identify trend type (select Actor)
- [ ] Step 2: Fetch Actor schema via mcpc
- [ ] Step 3: Ask user preferences (format, filename)
- [ ] Step 4: Run the analysis script
- [ ] Step 5: Summarize findings复制此检查清单并跟踪进度:
任务进度:
- [ ] 步骤1:确定趋势类型(选择Actor)
- [ ] 步骤2:通过mcpc获取Actor模式
- [ ] 步骤3:询问用户偏好(格式、文件名)
- [ ] 步骤4:运行分析脚本
- [ ] 步骤5:总结发现Step 1: Identify Trend Type
步骤1:确定趋势类型
Select the appropriate Actor based on research needs:
| User Need | Actor ID | Best For |
|---|---|---|
| Search trends | | Google Trends data |
| Hashtag tracking | | Hashtag content |
| Hashtag metrics | | Performance stats |
| Visual trends | | Post analysis |
| Trending discovery | | Search trends |
| Comprehensive tracking | | Full data |
| API-based trends | | API access |
| Engagement trends | | Comment tracking |
| Product trends | | Marketplace data |
| Visual analysis | | Photo trends |
| Community trends | | Group monitoring |
| YouTube Shorts | | Short-form trends |
| YouTube hashtags | | Hashtag videos |
| TikTok hashtags | | Hashtag content |
| Trending sounds | | Audio trends |
| TikTok ads | | Ad trends |
| Discover page | | Discover trends |
| Explore trends | | Explore content |
| Trending content | | Viral content |
根据研究需求选择合适的Actor:
| 用户需求 | Actor ID | 适用场景 |
|---|---|---|
| 搜索趋势 | | Google Trends数据 |
| 话题标签追踪 | | 话题标签内容 |
| 话题标签指标 | | 表现统计数据 |
| 视觉趋势 | | 帖子分析 |
| 趋势发现 | | 搜索趋势 |
| 全面追踪 | | 完整数据 |
| 基于API的趋势 | | API访问 |
| 互动趋势 | | 评论追踪 |
| 产品趋势 | | 商城数据 |
| 视觉分析 | | 图片趋势 |
| 社区趋势 | | 群组监控 |
| YouTube Shorts | | 短视频趋势 |
| YouTube话题标签 | | 话题标签视频 |
| TikTok话题标签 | | 话题标签内容 |
| 热门音效 | | 音频趋势 |
| TikTok广告 | | 广告趋势 |
| 发现页面 | | 发现页趋势 |
| 探索趋势 | | 探索页内容 |
| 热门内容 | | 爆款内容 |
Step 2: Fetch Actor Schema
步骤2:获取Actor模式
Fetch the Actor's input schema and details dynamically using mcpc:
bash
export $(grep APIFY_TOKEN .env | xargs) && mcpc --json mcp.apify.com --header "Authorization: Bearer $APIFY_TOKEN" tools-call fetch-actor-details actor:="ACTOR_ID" | jq -r ".content"Replace with the selected Actor (e.g., ).
ACTOR_IDapify/google-trends-scraperThis returns:
- Actor description and README
- Required and optional input parameters
- Output fields (if available)
使用mcpc动态获取Actor的输入模式和详细信息:
bash
export $(grep APIFY_TOKEN .env | xargs) && mcpc --json mcp.apify.com --header "Authorization: Bearer $APIFY_TOKEN" tools-call fetch-actor-details actor:="ACTOR_ID" | jq -r ".content"将替换为所选的Actor(例如:)。
ACTOR_IDapify/google-trends-scraper此命令将返回:
- Actor描述和README
- 必填和可选输入参数
- 输出字段(如果有)
Step 3: Ask User Preferences
步骤3:询问用户偏好
Before running, ask:
- Output format:
- Quick answer - Display top few results in chat (no file saved)
- CSV - Full export with all fields
- JSON - Full export in JSON format
- Number of results: Based on character of use case
运行前,询问用户以下内容:
- 输出格式:
- 快速答复 - 在聊天中显示前几条结果(不保存文件)
- CSV - 导出包含所有字段的完整数据
- JSON - 以JSON格式导出完整数据
- 结果数量:根据使用场景确定
Step 4: Run the Script
步骤4:运行脚本
Quick answer (display in chat, no file):
bash
node --env-file=.env ${CLAUDE_PLUGIN_ROOT}/reference/scripts/run_actor.js \
--actor "ACTOR_ID" \
--input 'JSON_INPUT'CSV:
bash
node --env-file=.env ${CLAUDE_PLUGIN_ROOT}/reference/scripts/run_actor.js \
--actor "ACTOR_ID" \
--input 'JSON_INPUT' \
--output YYYY-MM-DD_OUTPUT_FILE.csv \
--format csvJSON:
bash
node --env-file=.env ${CLAUDE_PLUGIN_ROOT}/reference/scripts/run_actor.js \
--actor "ACTOR_ID" \
--input 'JSON_INPUT' \
--output YYYY-MM-DD_OUTPUT_FILE.json \
--format json快速答复(在聊天中显示,不保存文件):
bash
node --env-file=.env ${CLAUDE_PLUGIN_ROOT}/reference/scripts/run_actor.js \
--actor "ACTOR_ID" \
--input 'JSON_INPUT'CSV格式:
bash
node --env-file=.env ${CLAUDE_PLUGIN_ROOT}/reference/scripts/run_actor.js \
--actor "ACTOR_ID" \
--input 'JSON_INPUT' \
--output YYYY-MM-DD_OUTPUT_FILE.csv \
--format csvJSON格式:
bash
node --env-file=.env ${CLAUDE_PLUGIN_ROOT}/reference/scripts/run_actor.js \
--actor "ACTOR_ID" \
--input 'JSON_INPUT' \
--output YYYY-MM-DD_OUTPUT_FILE.json \
--format jsonStep 5: Summarize Findings
步骤5:总结发现
After completion, report:
- Number of results found
- File location and name
- Key trend insights
- Suggested next steps (deeper analysis, content opportunities)
完成后,汇报以下内容:
- 找到的结果数量
- 文件位置和名称
- 关键趋势洞察
- 建议的后续步骤(深入分析、内容机会)
Error Handling
错误处理
APIFY_TOKEN not found.envAPIFY_TOKEN=your_tokenmcpc not foundnpm install -g @apify/mcpcActor not foundRun FAILEDTimeout--timeoutAPIFY_TOKEN not foundAPIFY_TOKEN=your_tokenmcpc not foundnpm install -g @apify/mcpcActor not foundRun FAILEDTimeout--timeout