Skip to main content
skill CX Codex

extracting-tiktok-comments-for-research — Claude Code skill

Collects TikTok comments and supports sentiment, theme, and top-reaction analysis. Useful for audience research, product feedback, and content studies.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add apidojo-io/apidojo-skills --skill extracting-tiktok-comments-for-research -a claude-code
Open on GitHub

What extracting-tiktok-comments-for-research does

This skill runs apidojo~tiktok-comments-scraper on Apify for TikTok video URLs. Its output includes comment text, commenter username, comment likes, reply count, and creation time. You can include nested replies, cap the returned records, or reshape each output item with a JavaScript function.

The workflow identifies videos and the research goal, runs the scraper, fetches and cleans the dataset, then examines themes, sentiment, and highly liked comments. Cleaning can remove empty, emoji-only, spam, and creator-authored replies. The actor will not run without APIFY_TOKEN in the environment. Apify MCP is an optional way to run it.

What it helps with

  • collect comments from TikTok videos
  • classify audience sentiment
  • spot recurring themes in viewer feedback
  • rank reactions by comment likes
  • clean spam before building a research dataset

Example prompts for the agent

  • Collect comments from these TikTok videos and summarize the main themes.
  • Analyze sentiment in the comments for this video and show the most liked reactions.
  • Save the TikTok comments as JSON, remove spam, and exclude replies from the creator.

How to install extracting-tiktok-comments-for-research

1Skills CLI (Vercel)

npx skills add apidojo-io/apidojo-skills --skill extracting-tiktok-comments-for-research -a claude-code

2Manually: put the files in place

~/.claude/skills/extracting-tiktok-comments-for-research/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/extracting-tiktok-comments-for-research/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about extracting-tiktok-comments-for-research

How do I install extracting-tiktok-comments-for-research in Claude Code?

Run npx skills add apidojo-io/apidojo-skills --skill extracting-tiktok-comments-for-research -a claude-code. The installed skill is at ~/.claude/skills/extracting-tiktok-comments-for-research/SKILL.md.

What does extracting-tiktok-comments-for-research do?

It collects public TikTok comments through Apify, returns author and engagement fields, and guides cleanup plus analysis of sentiment, themes, and top comments.

What is required to run the skill?

Set APIFY_TOKEN in the environment before running the actor. Nested replies are controlled with includeReplies, whose default is false.

Source text

SKILL.md · Apache-2.0
---
name: extracting-tiktok-comments-for-research
description: >
  Extracts and analyzes TikTok comments from any video or creator using apidojo's TikTok Comments scraper on Apify.
  Triggers when the user asks to: scrape TikTok comments from a video, analyze what viewers say about a
  TikTok post, extract comment data for sentiment analysis, find top comments on a viral TikTok video,
  collect TikTok user feedback from comments, build a dataset of TikTok community reactions, study
  audience sentiment on TikTok content, or research what a target audience cares about from TikTok comments.
  Returns commenter username, comment text, likes on comment, reply count, and timestamp.
  Ideal for market researchers, brand managers, content creators, and academic researchers.
license: Apache-2.0
metadata:
  author: apidojo
  version: "1.0"
  apify-actor: apidojo/tiktok-comments-scraper
---

# Extracting TikTok Comments for Research

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.

## Prerequisites

- `APIFY_TOKEN` environment variable set
- Optional: Apify MCP server installed


## Inputs

| Parameter | Type | Required | Default | Notes |
|-----------|------|----------|---------|-------|
| `startUrls` | array | ✅ | `[]` | TikTok video URLs to scrape comments from |
| `includeReplies` | boolean | Optional | `false` | Include reply comments (nested) |
| `maxItems` | number | Optional | Unlimited | Maximum comments to return |
| `customMapFunction` | string | Optional | — | JavaScript function to transform each output object |
## 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
```

### Step 1: Clarify Parameters

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.

### Step 2: Run the Actor


**Recommended — run_actor.js (handles waiting, output, and file saving automatically):**
```bash
# Quick answer (prints table to chat)
node scripts/run_actor.js \
  --actor "apidojo~tiktok-comments-scraper" \
  --input '{"param": "value"}'

# Save as 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
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.

### Step 3: Clean Comment Dataset

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`)

### Step 4: Analyze by Goal

**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.

### Step 5: Format Output

## Output Format

```
# TikTok Comment Analysis
Video(s): [N] | Total comments analyzed: [N] | Date: [DATE]

## Source Videos
| Video | Creator | Views | Comments Extracted |
|-------|---------|-------|-------------------|
| [url] | @[handle] | [N] | [N] |

## Sentiment Distribution (if goal = sentiment)
Positive: [X%] ([N] comments) | Negative: [X%] | Neutral: [X%]
Weighted by likes — Positive: [X%] | Negative: [X%]

## Top 10 Most-Liked Comments
| # | Comment | Likes | Replies |
|---|---------|-------|---------|
| 1 | "[comment text]" | [N] | [N] |

## Key Themes in Comments
| Theme | Frequency | Avg Likes per Comment |
|-------|-----------|----------------------|
| [Theme 1] | [N] | [N] |
| [Theme 2] | [N] | [N] |

## Most Asked Questions
1. "[question text]" — asked by [N] commenters
2. "[question text]" — [N] commenters

## Common Complaints / Pain Points
1. "[pain point]" — [N] comments, [N] total likes

## Audience Signals
- Age/demographic indicators: [summary]
- Geographic signals: [summary]
- Interest signals: [summary]
```

## 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.

© apidojo · Apache-2.0 · apidojo-io/apidojo-skills

Similar skills

All skills for Browser and scraping →

From the same set57

tracking-hiring-signals-from-company-tweets Pulls hiring signals out of company tweets through apidojo's Apify scraper: who is recruiting, for which team, and how recently. CX Codex +1 760installs scraping-youtube-playlist Collects video details from a YouTube playlist through an Apify scraper. Use it to export playlist metadata and stats for analysis. CX Codex +1 759installs scraping-google-search-results Pulls Google search results for any query: URLs, titles, snippets, positions and SERP feature types. Handy when you need raw SERP data for SEO or competitor work. CX Codex +1 759installs benchmarking-instagram-influencer-engagement Pulls recent Instagram posts and turns them into engagement benchmarks: followers, average likes and comments, ER, posting frequency. CX Codex +1 757installs discovering-pre-launch-startups-on-twitter Finds startups before public launch on Twitter and groups signals by stage. Use it to scout early products, beta programs, and waitlists. CX Codex +1 754installs finding-software-engineers-on-twitter A skill that hunts for engineers and developers on Twitter/X by tech stack and open-to-work signals. Built for technical recruiters and hiring managers. CX Codex +1 752installs scraping-instagram-comments Collects Instagram post comments through Apify, including text, engagement counts, timestamps, and commenter details. Useful for audience reaction analysis. CX Codex +1 750installs finding-freelancers-by-skill-on-twitter Finds freelancers and independent contractors on Twitter by skill, profile details, and signs they are open to work. Useful when a project needs outside specialists. CX Codex +1 740installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor