extracting-tiktok-comments-for-research

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Extracting 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

前提条件

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

Inputs

输入参数

ParameterTypeRequiredDefaultNotes
startUrls
array
[]
TikTok video URLs to scrape comments from
includeReplies
booleanOptional
false
Include reply comments (nested)
maxItems
numberOptionalUnlimitedMaximum comments to return
customMapFunction
stringOptionalJavaScript function to transform each output object
参数类型是否必填默认值说明
startUrls
数组
[]
要抓取评论的TikTok视频URL
includeReplies
布尔值可选
false
是否包含回复评论(嵌套评论)
maxItems
数字可选无限制返回的最大评论数量
customMapFunction
字符串可选用于转换每个输出对象的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.,
    https://www.tiktok.com/@creator/video/[ID]
    ) OR
  • 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
undefined

Quick answer (prints table to chat)

快速输出(在聊天中打印表格)

node scripts/run_actor.js
--actor "apidojo~tiktok-comments-scraper"
--input '{"param": "value"}'
node scripts/run_actor.js
--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
node scripts/run_actor.js
--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
> `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
SUCCEEDED
. Fetch dataset.
node scripts/run_actor.js
--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
  }'
等待任务状态变为
SUCCEEDED
后,获取数据集。

Step 3: Clean Comment Dataset

步骤3:清理评论数据集

From raw dataset, extract per comment:
  • text
    — the comment text
  • author.uniqueId
    — commenter username
  • diggCount
    — likes on the comment
  • replyCommentTotal
    — how many replies this comment received
  • createTime
    — timestamp
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
diggCount
— a liked comment reflects community agreement.
Goal: 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
diggCount
descending. Top-liked comments represent the community's most agreed-upon reactions.
目标:情感分析 将每条评论分类为正面/负面/中性(采用与Twitter情感分析工具相同的词汇方法)。按
diggCount
加权——获赞的评论更能反映社区共识。
目标:产品反馈 重点关注:
  • 功能需求:“我希望”、“你应该”、“如果能……会更好”、“需要”
  • 痛点:“为什么不”、“不敢相信”、“存在的问题”、“无法正常工作”
  • 特定产品提及:在多条评论中重复出现的名词
目标:受众画像 从评论者简介(若可用)和评论语言中:
  • 识别受众人口统计信号(年龄、地域、兴趣信号)
  • 找出受众最常提出的问题
目标:顶级评论 直接按
diggCount
降序排序。获赞最多的评论代表社区最认可的反馈。

Step 5: Format Output

步骤5:格式化输出

Output Format

输出格式

undefined
undefined

TikTok Comment Analysis

TikTok评论分析

Video(s): [N] | Total comments analyzed: [N] | Date: [DATE]
视频数量: [N] | 分析的总评论数: [N] | 日期: [DATE]

Source Videos

来源视频

VideoCreatorViewsComments 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评论

#CommentLikesReplies
1"[comment text]"[N][N]
排名评论内容获赞数回复数
1"[评论内容]"[N][N]

Key Themes in Comments

评论核心主题

ThemeFrequencyAvg Likes per Comment
[Theme 1][N][N]
[Theme 2][N][N]
主题出现频次单条评论平均获赞数
[主题1][N][N]
[主题2][N][N]

Most Asked Questions

最常被问到的问题

  1. "[question text]" — asked by [N] commenters
  2. "[question text]" — [N] commenters
  1. "[问题内容]" —— 被[N]位评论者提及
  2. "[问题内容]" —— [N]位评论者提及

Common Complaints / Pain Points

常见投诉/痛点

  1. "[pain point]" — [N] comments, [N] total likes
  1. "[痛点内容]" —— [N]条评论,总获赞数[N]

Audience Signals

受众信号

  • Age/demographic indicators: [summary]
  • Geographic signals: [summary]
  • Interest signals: [summary]
undefined
  • 年龄/人口统计指标: [总结]
  • 地域信号: [总结]
  • 兴趣信号: [总结]
undefined

Troubleshooting

故障排除

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的评论,这类通常是机器人发布的。