extracting-tiktok-comments-for-research
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseExtracting TikTok Comments for Research
提取TikTok评论用于研究
Pulls all public comments from TikTok videos for audience sentiment analysis, product research, or competitive intelligence. Comments are the rawest form of consumer voice — unfiltered reactions at scale.
获取TikTok视频的所有公开评论,用于受众情感分析、产品调研或竞争情报分析。评论是最原始的消费者声音——大规模的无过滤反馈。
Prerequisites
前提条件
- environment variable set
APIFY_TOKEN - Optional: Apify MCP server installed
- 已设置环境变量
APIFY_TOKEN - 可选:已安装Apify MCP服务器
Inputs
输入参数
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| array | ✅ | | TikTok video URLs to scrape comments from |
| boolean | Optional | | Include reply comments (nested) |
| number | Optional | Unlimited | Maximum comments to return |
| string | Optional | — | JavaScript function to transform each output object |
| 参数 | 类型 | 是否必填 | 默认值 | 说明 |
|---|---|---|---|---|
| 数组 | ✅ | | 要抓取评论的TikTok视频URL |
| 布尔值 | 可选 | | 是否包含回复评论(嵌套评论) |
| 数字 | 可选 | 无限制 | 返回的最大评论数量 |
| 字符串 | 可选 | — | 用于转换每个输出对象的JavaScript函数 |
Workflow
工作流程
Progress:
- [ ] Step 1: Identify target video(s) and research goal
- [ ] Step 2: Run tiktok-comments-scraper
- [ ] Step 3: Fetch and clean comment dataset
- [ ] Step 4: Analyze themes, sentiment, and top comments
- [ ] Step 5: Deliver research output进度:
- [ ] 步骤1:确定目标视频及研究目标
- [ ] 步骤2:运行tiktok-comments-scraper
- [ ] 步骤3:获取并清理评论数据集
- [ ] 步骤4:分析主题、情感及顶级评论
- [ ] 步骤5:交付研究成果Step 1: Clarify Parameters
步骤1:明确参数
Ask the user for:
- TikTok video URL(s) — direct links to specific videos (e.g., ) OR
https://www.tiktok.com/@creator/video/[ID] - Creator handle — pull comments from their most recent/viral videos
- Max comments per video (default: 500; max: ~3,000)
- Research goal — sentiment analysis, product feedback, audience profiling, or competitive intel
- Date filter (optional — focus on recent comments only)
Tip for best research: Use 3-5 videos from the same creator or about the same topic for a reliable dataset.
向用户确认以下信息:
- TikTok视频URL —— 特定视频的直接链接(例如:) 或
https://www.tiktok.com/@creator/video/[ID] - 创作者账号 —— 抓取其最新/热门视频的评论
- 单视频最大评论数(默认:500;上限:约3000)
- 研究目标 —— 情感分析、产品反馈、受众画像或竞争情报
- 日期筛选(可选——仅关注近期评论)
研究小贴士: 选择同一创作者或同一主题的3-5个视频,以获取可靠的数据集。
Step 2: Run the Actor
步骤2:运行Actor
Recommended — run_actor.js (handles waiting, output, and file saving automatically):
bash
undefined推荐方式——使用run_actor.js(自动处理等待、输出及文件保存):
bash
undefinedQuick answer (prints table to chat)
快速输出(在聊天中打印表格)
node scripts/run_actor.js
--actor "apidojo~tiktok-comments-scraper"
--input '{"param": "value"}'
--actor "apidojo~tiktok-comments-scraper"
--input '{"param": "value"}'
node scripts/run_actor.js
--actor "apidojo~tiktok-comments-scraper"
--input '{"param": "value"}'
--actor "apidojo~tiktok-comments-scraper"
--input '{"param": "value"}'
Save as CSV
保存为CSV格式
node scripts/run_actor.js
--actor "apidojo~tiktok-comments-scraper"
--input '{"param": "value"}'
--output YYYY-MM-DD_results.csv --format csv
--actor "apidojo~tiktok-comments-scraper"
--input '{"param": "value"}'
--output YYYY-MM-DD_results.csv --format csv
node scripts/run_actor.js
--actor "apidojo~tiktok-comments-scraper"
--input '{"param": "value"}'
--output YYYY-MM-DD_results.csv --format csv
--actor "apidojo~tiktok-comments-scraper"
--input '{"param": "value"}'
--output YYYY-MM-DD_results.csv --format csv
Save as JSON
保存为JSON格式
node scripts/run_actor.js
--actor "apidojo~tiktok-comments-scraper"
--input '{"param": "value"}'
--output YYYY-MM-DD_results.json --format json
--actor "apidojo~tiktok-comments-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~tiktok-comments-scraper"
Input:
{
"postURLs": [
"https://www.tiktok.com/@[handle]/video/[VIDEO_ID_1]",
"https://www.tiktok.com/@[handle]/video/[VIDEO_ID_2]"
],
"maxCommentsPerPost": 500,
"includeReplies": false
}
**REST API fallback:**
```bash
curl -X POST \
"https://api.apify.com/v2/acts/apidojo~tiktok-comments-scraper/runs?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"postURLs": [
"https://www.tiktok.com/@[handle]/video/[VIDEO_ID]"
],
"maxCommentsPerPost": 500,
"includeReplies": false
}'Wait for . Fetch dataset.
SUCCEEDEDnode scripts/run_actor.js
--actor "apidojo~tiktok-comments-scraper"
--input '{"param": "value"}'
--output YYYY-MM-DD_results.json --format json
--actor "apidojo~tiktok-comments-scraper"
--input '{"param": "value"}'
--output YYYY-MM-DD_results.json --format json
> 需在环境变量或`.env`文件中设置`APIFY_TOKEN`。
**若Apify MCP可用:**工具: apify:run-actor
Actor: "apidojo~tiktok-comments-scraper"
输入:
{
"postURLs": [
"https://www.tiktok.com/@[handle]/video/[VIDEO_ID_1]",
"https://www.tiktok.com/@[handle]/video/[VIDEO_ID_2]"
],
"maxCommentsPerPost": 500,
"includeReplies": false
}
**备选方案:REST API**
```bash
curl -X POST \
"https://api.apify.com/v2/acts/apidojo~tiktok-comments-scraper/runs?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"postURLs": [
"https://www.tiktok.com/@[handle]/video/[VIDEO_ID]"
],
"maxCommentsPerPost": 500,
"includeReplies": false
}'等待任务状态变为后,获取数据集。
SUCCEEDEDStep 3: Clean Comment Dataset
步骤3:清理评论数据集
From raw dataset, extract per comment:
- — the comment text
text - — commenter username
author.uniqueId - — likes on the comment
diggCount - — how many replies this comment received
replyCommentTotal - — timestamp
createTime
Clean:
- Remove empty or emoji-only comments (if doing text analysis)
- Remove spam patterns (repeated text, links, self-promotions)
- Remove the creator's own replies (identified by matching )
author.uniqueId
从原始数据集中提取每条评论的以下字段:
- —— 评论内容
text - —— 评论者用户名
author.uniqueId - —— 评论获赞数
diggCount - —— 该评论的回复数
replyCommentTotal - —— 时间戳
createTime
清理操作:
- 移除空评论或仅含表情的评论(若需进行文本分析)
- 移除垃圾评论(重复内容、链接、自我推广)
- 移除创作者本人的回复(通过匹配识别)
author.uniqueId
Step 4: Analyze by Goal
步骤4:按目标进行分析
Goal: Sentiment analysis
Classify each comment as Positive / Negative / Neutral (use the same lexical method as the Twitter sentiment skill). Weight by — a liked comment reflects community agreement.
diggCountGoal: Product feedback
Look for:
- Feature requests: "I wish", "you should", "would be better if", "needs"
- Pain points: "why doesn't it", "can't believe", "problem with", "doesn't work"
- Specific product mentions: nouns that repeat across multiple comments
Goal: Audience profiling
From commenter bios (if available) and comment language:
- Identify audience demographics signals (age signals, geographic signals, interest signals)
- Find what questions the audience asks most
Goal: Top comments
Simply sort by descending. Top-liked comments represent the community's most agreed-upon reactions.
diggCount目标:情感分析
将每条评论分类为正面/负面/中性(采用与Twitter情感分析工具相同的词汇方法)。按加权——获赞的评论更能反映社区共识。
diggCount目标:产品反馈
重点关注:
- 功能需求:“我希望”、“你应该”、“如果能……会更好”、“需要”
- 痛点:“为什么不”、“不敢相信”、“存在的问题”、“无法正常工作”
- 特定产品提及:在多条评论中重复出现的名词
目标:受众画像
从评论者简介(若可用)和评论语言中:
- 识别受众人口统计信号(年龄、地域、兴趣信号)
- 找出受众最常提出的问题
目标:顶级评论
直接按降序排序。获赞最多的评论代表社区最认可的反馈。
diggCountStep 5: Format Output
步骤5:格式化输出
Output Format
输出格式
undefinedundefinedTikTok Comment Analysis
TikTok评论分析
Video(s): [N] | Total comments analyzed: [N] | Date: [DATE]
视频数量: [N] | 分析的总评论数: [N] | 日期: [DATE]
Source Videos
来源视频
| Video | Creator | Views | Comments Extracted |
|---|---|---|---|
| [url] | @[handle] | [N] | [N] |
| 视频 | 创作者 | 播放量 | 提取的评论数 |
|---|---|---|---|
| [url] | @[handle] | [N] | [N] |
Sentiment Distribution (if goal = sentiment)
情感分布(若目标为情感分析)
Positive: [X%] ([N] comments) | Negative: [X%] | Neutral: [X%]
Weighted by likes — Positive: [X%] | Negative: [X%]
正面: [X%] ([N]条评论) | 负面: [X%] | 中性: [X%]
按获赞数加权——正面: [X%] | 负面: [X%]
Top 10 Most-Liked Comments
获赞Top10评论
| # | Comment | Likes | Replies |
|---|---|---|---|
| 1 | "[comment text]" | [N] | [N] |
| 排名 | 评论内容 | 获赞数 | 回复数 |
|---|---|---|---|
| 1 | "[评论内容]" | [N] | [N] |
Key Themes in Comments
评论核心主题
| Theme | Frequency | Avg Likes per Comment |
|---|---|---|
| [Theme 1] | [N] | [N] |
| [Theme 2] | [N] | [N] |
| 主题 | 出现频次 | 单条评论平均获赞数 |
|---|---|---|
| [主题1] | [N] | [N] |
| [主题2] | [N] | [N] |
Most Asked Questions
最常被问到的问题
- "[question text]" — asked by [N] commenters
- "[question text]" — [N] commenters
- "[问题内容]" —— 被[N]位评论者提及
- "[问题内容]" —— [N]位评论者提及
Common Complaints / Pain Points
常见投诉/痛点
- "[pain point]" — [N] comments, [N] total likes
- "[痛点内容]" —— [N]条评论,总获赞数[N]
Audience Signals
受众信号
- Age/demographic indicators: [summary]
- Geographic signals: [summary]
- Interest signals: [summary]
undefined- 年龄/人口统计指标: [总结]
- 地域信号: [总结]
- 兴趣信号: [总结]
undefinedTroubleshooting
故障排除
Few comments returned: Video may have comments disabled or be relatively new. Try a different video.
All comments in non-English: Add a language filter post-processing, or adjust the search to English-language TikTok creators.
Spam dominates results: Apply a filter: remove comments shorter than 5 words AND with 0 likes, which tend to be bots.
返回评论数量少: 视频可能已关闭评论功能或发布时间较短。尝试更换其他视频。
所有评论均为非英语: 在后期处理中添加语言筛选,或调整搜索范围至英语创作者的TikTok内容。
垃圾评论占比高: 应用筛选规则:移除字数少于5且获赞数为0的评论,这类通常是机器人发布的。