tracking-brand-sentiment-across-platforms
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTracking Brand Sentiment Across Platforms
跨平台品牌舆情追踪
Monitors brand sentiment on Twitter, Reddit, and TikTok in parallel, then produces a unified brand health score. Each platform serves a different role: Twitter = real-time news/opinion, Reddit = deep community discussion, TikTok = Gen Z product culture.
并行监测Twitter、Reddit和TikTok三大平台的品牌舆情,生成统一的品牌健康分。各平台定位不同:Twitter = 实时资讯/观点、Reddit = 深度社区讨论、TikTok = Z世代产品文化。
Prerequisites
前置条件
- environment variable set
APIFY_TOKEN - Optional: Apify MCP server installed
- 已设置环境变量
APIFY_TOKEN - 可选:已安装Apify MCP服务器
Inputs
输入参数
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| array | ✅ | | Twitter advanced search queries (e.g. |
| string | Optional | | Sort order: |
| string | Optional | — | ISO 639-1 language code (e.g. |
| number | Optional | Unlimited | Maximum tweets to return |
| boolean | Optional | | Only tweets from verified users |
| boolean | Optional | | Only Twitter Blue subscribers |
| boolean | Optional | | Only tweets with images |
| boolean | Optional | | Only tweets with videos |
| boolean | Optional | | Only quote tweets |
| string | Optional | — | Filter to a specific author handle |
| string | Optional | — | Tweets replying to a specific handle |
| string | Optional | — | Tweets mentioning a specific handle |
| string | Optional | — | Tweets near a location |
| string | Optional | — | Radius around geotaggedNear |
| string | Optional | — | Lat/lng + radius string |
| string | Optional | — | Tweets tagged with a place |
| number | Optional | — | Minimum retweet count |
| number | Optional | — | Minimum like count |
| number | Optional | — | Minimum reply count |
| string | Optional | — | Tweets after this date (YYYY-MM-DD) |
| string | Optional | — | Tweets before this date (YYYY-MM-DD) |
| boolean | Optional | | Add the matched search term to each tweet |
| string | Optional | — | JavaScript function to transform each output object |
| 参数名称 | 类型 | 是否必填 | 默认值 | 说明 |
|---|---|---|---|---|
| 数组 | ✅ | | Twitter高级搜索查询语句(例如: |
| 字符串 | 可选 | | 排序方式: |
| 字符串 | 可选 | — | ISO 639-1语言代码(例如: |
| 数字 | 可选 | 无限制 | 返回的最大推文数量 |
| 布尔值 | 可选 | | 仅返回认证用户的推文 |
| 布尔值 | 可选 | | 仅返回Twitter Blue订阅用户的推文 |
| 布尔值 | 可选 | | 仅返回带图片的推文 |
| 布尔值 | 可选 | | 仅返回带视频的推文 |
| 布尔值 | 可选 | | 仅返回引用推文 |
| 字符串 | 可选 | — | 筛选特定作者的推文 |
| 字符串 | 可选 | — | 筛选回复特定账号的推文 |
| 字符串 | 可选 | — | 筛选提及特定账号的推文 |
| 字符串 | 可选 | — | 筛选特定地点附近的推文 |
| 字符串 | 可选 | — | |
| 字符串 | 可选 | — | 纬度/经度 + 半径字符串 |
| 字符串 | 可选 | — | 筛选标记特定地点的推文 |
| 数字 | 可选 | — | 筛选转发量达到最小值的推文 |
| 数字 | 可选 | — | 筛选点赞量达到最小值的推文 |
| 数字 | 可选 | — | 筛选回复量达到最小值的推文 |
| 字符串 | 可选 | — | 筛选该日期之后的推文(格式:YYYY-MM-DD) |
| 字符串 | 可选 | — | 筛选该日期之前的推文(格式:YYYY-MM-DD) |
| 布尔值 | 可选 | | 为每条推文添加匹配的搜索词 |
| 字符串 | 可选 | — | 用于转换每个输出对象的JavaScript函数 |
Workflow
工作流程
Progress:
- [ ] Step 1: Run scrapers for all three platforms in parallel
- [ ] Step 2: Classify sentiment per platform
- [ ] Step 3: Calculate cross-platform brand health score
- [ ] Step 4: Identify top themes and alerts
- [ ] Step 5: Deliver unified report进度:
- [ ] 步骤1:并行运行三大平台的爬虫
- [ ] 步骤2:按平台进行舆情分类
- [ ] 步骤3:计算跨平台品牌健康分
- [ ] 步骤4:识别热门主题与预警
- [ ] 步骤5:交付统一报告Step 1: Run Three Scrapers
步骤1:运行三个爬虫
Twitter (If Apify MCP is available):
Tool: apify:run-actor
Actor: "apidojo~tweet-scraper"
Input: {"searchTerms": ["[BRAND_NAME]"], "maxItems": 300, "tweetLanguage": "en"}Reddit:
Tool: apify:run-actor
Actor: "apidojo~tweet-scraper"
Input: {"searches": ["[BRAND_NAME]"], "maxItems": 200, "sort": "new", "time": "month"}TikTok:
Tool: apify:run-actor
Actor: "apidojo~tiktok-scraper"
Input: {"keywords": ["#[brandname]", "#[brandname]review"], "maxItems": 200}REST API fallback — run each sequentially:
bash
undefinedTwitter(若Apify MCP可用):
工具: apify:run-actor
Actor: "apidojo~tweet-scraper"
输入: {"searchTerms": ["[BRAND_NAME]"], "maxItems": 300, "tweetLanguage": "en"}Reddit:
工具: apify:run-actor
Actor: "apidojo~tweet-scraper"
输入: {"searches": ["[BRAND_NAME]"], "maxItems": 200, "sort": "new", "time": "month"}TikTok:
工具: apify:run-actor
Actor: "apidojo~tiktok-scraper"
输入: {"keywords": ["#[brandname]", "#[brandname]review"], "maxItems": 200}REST API备选方案 — 按顺序运行每个爬虫:
bash
undefinedcurl -X POST "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs?token=$APIFY_TOKEN" -H "Content-Type: application/json" -d '{"searchTerms": ["[BRAND_NAME]"], "maxItems": 300}'
curl -X POST "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs?token=$APIFY_TOKEN" -H "Content-Type: application/json" -d '{"searchTerms": ["[BRAND_NAME]"], "maxItems": 300}'
curl -X POST "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs?token=$APIFY_TOKEN" -H "Content-Type: application/json" -d '{"searches": ["[BRAND_NAME]"], "maxItems": 200, "sort": "new", "time": "month"}'
undefinedcurl -X POST "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs?token=$APIFY_TOKEN" -H "Content-Type: application/json" -d '{"searches": ["[BRAND_NAME]"], "maxItems": 200, "sort": "new", "time": "month"}'
undefinedStep 2: Sentiment Classification
步骤2:舆情分类
Use the same lexical model for all platforms (positive/negative/neutral indicators from skill). Weight by platform-specific engagement:
analyzing-twitter-sentiment-for-topic- Twitter:
likeCount + replyCount * 3 - Reddit:
upvotes + commentCount * 2 - TikTok:
playCount / 1000 + diggCount
所有平台使用相同的词汇模型(来自技能的正面/负面/中性指标),并根据平台特定的互动数据加权:
analyzing-twitter-sentiment-for-topic- Twitter:
likeCount + replyCount * 3 - Reddit:
upvotes + commentCount * 2 - TikTok:
playCount / 1000 + diggCount
Step 3: Brand Health Score
步骤3:品牌健康分计算
platform_sentiment[p] = (positive_count[p] - negative_count[p]) / total_count[p] # range: -1 to +1
platform_weight = {twitter: 0.35, reddit: 0.40, tiktok: 0.25} # Reddit = most considered opinion
brand_health_score = sum(platform_sentiment[p] * platform_weight[p] for p in platforms)
brand_health_score = (brand_health_score + 1) / 2 * 100 # normalize to 0-100Score interpretation: 0–40 = Crisis, 40–55 = Concerning, 55–70 = Neutral, 70–85 = Positive, 85–100 = Strong.
platform_sentiment[p] = (positive_count[p] - negative_count[p]) / total_count[p] # 范围:-1 至 +1
platform_weight = {twitter: 0.35, reddit: 0.40, tiktok: 0.25} # Reddit权重最高,代表深度观点
brand_health_score = sum(platform_sentiment[p] * platform_weight[p] for p in platforms)
brand_health_score = (brand_health_score + 1) / 2 * 100 # 归一化至0-100分得分解读:0–40 = 危机、40–55 = 值得关注、55–70 = 中性、70–85 = 正面、85–100 = 良好。
Step 4: Edge Cases
步骤4:特殊场景处理
- Brand name is a common word (e.g. "Apple"): Add qualifier ("Apple iPhone", "Apple Inc") to search to reduce noise; report disambiguation rate
- One platform dominates volume (e.g. TikTok has 10× Twitter posts): Weight by volume in the composite score
- Rapid sentiment shift (score changes > 20 points): Flag as — may indicate PR crisis or viral positive moment
ALERT - Reddit returns no results: Brand may not be discussed there; set and redistribute to other platforms
reddit_weight = 0
- 品牌名称为通用词汇(例如:"Apple"):在搜索词中添加限定词(如"Apple iPhone"、"Apple Inc")以减少干扰;报告消歧率
- 单一平台内容量占主导(例如:TikTok内容量是Twitter的10倍):在综合得分中按内容量调整权重
- 舆情快速变化(得分变动超过20分):标记为——可能预示公关危机或正向 viral 事件
ALERT - Reddit无结果返回:品牌可能未在该平台被讨论;将设为0并重新分配权重至其他平台
reddit_weight
Output Format
输出格式
undefinedundefinedCross-Platform Brand Sentiment: [BRAND_NAME]
跨平台品牌舆情:[BRAND_NAME]
Period: [DATE_RANGE] | Total posts: [N] | Date: [DATE]
统计周期:[DATE_RANGE] | 总帖子数:[N] | 生成日期:[DATE]
Brand Health Score: [X]/100 — [INTERPRETATION]
品牌健康分:[X]/100 — [解读结果]
Per-Platform Breakdown
各平台详情
| Platform | Posts | Positive | Negative | Neutral | Score |
|---|---|---|---|---|---|
| [N] | [X%] | [X%] | [X%] | [+/-X] | |
| [N] | [X%] | [X%] | [X%] | [+/-X] | |
| TikTok | [N] | [X%] | [X%] | [X%] | [+/-X] |
| 平台 | 帖子数 | 正面占比 | 负面占比 | 中性占比 | 平台得分 |
|---|---|---|---|---|---|
| [N] | [X%] | [X%] | [X%] | [+/-X] | |
| [N] | [X%] | [X%] | [X%] | [+/-X] | |
| TikTok | [N] | [X%] | [X%] | [X%] | [+/-X] |
Top Negative Themes (Cross-Platform)
跨平台热门负面主题
- [Theme] — [N] posts across [platforms]
- [Theme]
- [主题] — 涉及[平台]共[N]条帖子
- [主题]
Top Positive Themes
热门正面主题
- [Theme] — [N] posts
- [Theme]
- [主题] — 共[N]条帖子
- [主题]
Most Impactful Posts
高影响力帖子
🔴 Top negative: [platform] | [handle] | [N engagement] | "[excerpt]"
🟢 Top positive: [platform] | [handle] | [N engagement] | "[excerpt]"
undefined🔴 热门负面:[平台] | [账号] | [互动量] | "[内容摘要]"
🟢 热门正面:[平台] | [账号] | [互动量] | "[内容摘要]"
undefinedTroubleshooting
问题排查
Brand health score conflicts between platforms: This is meaningful signal — discuss in output why platforms diverge (e.g. "Reddit community discusses product quality issues while TikTok shows positive unboxing content").
Sample too small for reliable sentiment (< 50 posts per platform): Widen date range or note low confidence in that platform's score.
Brand name not found on a platform: Some brands have no organic TikTok presence — note as gap in output.
Recommended — run_actor.js (handles waiting, output, and file saving automatically):
bash
undefined各平台品牌健康分存在差异:这是有价值的信号——在输出中说明平台差异的原因(例如:"Reddit社区讨论产品质量问题,而TikTok上则是正面的开箱内容")。
样本量过小导致舆情结果不可靠(单平台帖子数<50):扩大统计日期范围,或标注该平台得分可信度低。
某平台未搜索到品牌相关内容:部分品牌在TikTok等平台无自然曝光——在输出中注明该缺口。
推荐使用 — run_actor.js(自动处理等待、输出及文件保存):
bash
undefinedQuick answer (prints table to chat)
快速输出(在聊天窗口打印表格)
node scripts/run_actor.js
--actor "apidojo~tweet-scraper"
--input '{"param": "value"}'
--actor "apidojo~tweet-scraper"
--input '{"param": "value"}'
node scripts/run_actor.js
--actor "apidojo~tweet-scraper"
--input '{"param": "value"}'
--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
--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
--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
--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.node scripts/run_actor.js
--actor "apidojo~tweet-scraper"
--input '{"param": "value"}'
--output YYYY-MM-DD_results.json --format json
--actor "apidojo~tweet-scraper"
--input '{"param": "value"}'
--output YYYY-MM-DD_results.json --format json
> `APIFY_TOKEN`需在环境变量或`.env`文件中配置。