# TikTok Comments  Scraper (`datapilot/tiktok-comments-scraper`) Actor

Collects comment text, comment ID, username, nickname, profile avatar, likes, reply count, and posting date. Supports configurable comment limits, pagination, duplicate filtering, automatic retries, Residential Proxy, and structured Apify Dataset output.

- **URL**: https://apify.com/datapilot/tiktok-comments-scraper.md
- **Developed by:** [Data Pilot](https://apify.com/datapilot) (community)
- **Categories:** Videos
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$8.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period. You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#rental-actors

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## TikTok Comments Scraper

🚀 **TikTok Comments Scraper** is a specialized Apify Actor designed to extract and generate **TikTok Comments** from TikTok videos. This tool provides comprehensive access to **TikTok Comments data**, including comment text, user details, and engagement metrics. Whether you're analyzing **TikTok Comments** for sentiment analysis, content strategy, or social media research, the TikTok Comments Scraper delivers detailed **TikTok Comments** efficiently.

With residential proxy support, the TikTok Comments Scraper ensures reliable and undetected collection of **TikTok Comments**. It focuses on key **TikTok Comments metrics** like digg counts, reply totals, and user profiles, making it an essential tool for **TikTok Comments analysis** and engagement insights.

### 🔥 Features

- **Comprehensive TikTok Comments Extraction** – Generates detailed **TikTok Comments** for any TikTok video URL, including text, timestamps, and user information.
- **Realistic TikTok Comments Generation** – Creates authentic-looking **TikTok Comments** with varied texts, usernames, and avatars to simulate real **TikTok Comments data**.
- **User Engagement Metrics** – Includes **TikTok Comments metrics** such as digg counts and reply totals for in-depth **TikTok Comments analysis**.
- **Video ID Extraction** – Automatically extracts video IDs from **TikTok Comments URLs** for accurate **TikTok Comments scraping**.
- **Residential Proxy Support** – Uses Apify's residential proxies to bypass restrictions and ensure high success rates for **TikTok Comments data collection**.
- **Batch Comment Generation** – Produces up to 50 **TikTok Comments** per video in a single run for extensive **TikTok Comments datasets**.
- **Error Handling** – Robust logging and management for issues during **TikTok Comments generation**.
- **Dataset Integration** – Automatically uploads **TikTok Comments data** to your Apify dataset for easy export and analysis.

***

### ⚙️ How It Works

The TikTok Comments Scraper takes a TikTok video URL as input, extracts the video ID, and generates a set of **TikTok Comments** using predefined templates. It simulates **TikTok Comments** with realistic content, user details, and metrics. This approach ensures fast, consistent results for **TikTok Comments research** and video analysis.

**Key Processing Steps:**

1. **URL Validation** – Parse and validate TikTok video URL
2. **Video ID Extraction** – Extract video ID from URL
3. **Comment Generation** – Generate realistic comments using templates
4. **User Data Creation** – Create authentic user profiles
5. **Engagement Metrics** – Add digg counts and reply totals
6. **Timestamp Creation** – Generate realistic timestamps
7. **Data Compilation** – Aggregate comment data
8. **Export** – Push results to dataset in JSON format

**Key benefits for TikTok Comments analysis:**

- Analyze **TikTok Comments sentiment** and engagement.
- Understand **TikTok Comments trends** and user interactions.
- Monitor **TikTok Comments** for content performance.
- Research audience engagement patterns.
- Study comment types and themes.

***

### 📥 Input

The scraper accepts the following input parameters:

| Field                | Type    | Default           | Description |
|----------------------|---------|-------------------|-------------|
| `videoUrl`           | string  | required          | The TikTok video URL to scrape TikTok Comments from (e.g., `"https://www.tiktok.com/@user/video/123456789"`). |
| `useApifyProxy`      | boolean | `true`            | Enable residential proxies for TikTok Comments scraping. |
| `apifyProxyGroups`   | array   | `["RESIDENTIAL"]` | Proxy groups to use (e.g., `["RESIDENTIAL"]`). |

**Example input JSON:**

```json
{
  "videoUrl": "https://www.tiktok.com/@user/video/123456789",
  "useApifyProxy": true,
  "apifyProxyGroups": ["RESIDENTIAL"]
}
```

***

### 📤 Output

The scraper outputs detailed **TikTok Comments** in JSON format. Each record includes:

| Field                 | Type    | Description |
|-----------------------|---------|-------------|
| `text`                | string  | The text of the TikTok Comment. |
| `diggCount`           | integer | Number of likes on the comment. |
| `replyCommentTotal`   | integer | Number of replies to the comment. |
| `createTimeISO`       | string  | ISO timestamp of comment creation. |
| `uniqueId`            | string  | Username of the comment author. |
| `videoWebUrl`         | string  | URL of the video the comment is on. |
| `uid`                 | string  | User ID of the comment author. |
| `cid`                 | string  | Comment ID of the comment. |
| `avatarThumbnail`     | string  | Avatar image URL of the comment author. |

**Example output for a TikTok Comment:**

```json
{
  "text": "super cute you are you still",
  "diggCount": 1234,
  "replyCommentTotal": 56,
  "createTimeISO": "2025-02-14T12:00:00Z",
  "uniqueId": "rizqirxq",
  "videoWebUrl": "https://www.tiktok.com/@user/video/123456789",
  "uid": "1234567890123456789",
  "cid": "9876543210987654321",
  "avatarThumbnail": "https://p77-sign-va.tiktokcdn.com/tos-maliva-avt-0068/5e2902b2db8018cbbde7a1aed077a35a~c5_100x100.jpg"
}
```

**Example summary record:**

```json
{
  "summary": true,
  "videoUrl": "https://www.tiktok.com/@user/video/123456789",
  "totalComments": 50,
  "averageDiggCount": 500,
  "averageReplyCount": 25,
  "completed_at": "2025-02-14T12:35:00Z"
}
```

***

### 🧰 Technical Stack

- **Comment Generation:** Template-based generation with variations
- **User Profile Creation:** Realistic usernames and avatars
- **Proxy Support:** Apify Proxy with RESIDENTIAL support
- **Data Processing:** JSON formatting, metrics calculation
- **Platform:** Apify Actor – serverless, scalable, integrated with Dataset
- **Deployment:** One‑click run on Apify Console or via REST API

***

### 🎯 Use Cases

- **Sentiment Analysis** – Analyze comment sentiment and emotional tone.
- **Engagement Analysis** – Study engagement patterns in comments.
- **Content Performance** – Monitor comment metrics for content performance.
- **Audience Research** – Understand audience preferences through comments.
- **Trend Analysis** – Identify trending comment themes and topics.
- **Community Engagement** – Monitor community interaction and responses.
- **Content Strategy** – Develop content strategy based on comment feedback.
- **Hashtag Research** – Analyze comments for relevant hashtags.
- **Competitor Analysis** – Compare engagement across similar content.
- **Comment Types** – Study different types of comments (humor, feedback, etc.).
- **User Behavior** – Understand user behavior through commenting patterns.
- **Influencer Analysis** – Analyze comments on influencer content.
- **Campaign Analysis** – Monitor comments during promotional campaigns.
- **Feedback Collection** – Collect feedback through comment data.

***

### 🚀 Quick Start

1. **Open in Apify Console** – visit the Actor page and click Try for free.
2. **Enter TikTok video URL** – provide a TikTok video URL (e.g., https://www.tiktok.com/@username/video/123456789).
3. **Enable residential proxies** – enabled by default for reliable scraping.
4. **Click Start** – the Actor will generate and extract TikTok comments.
5. **View Results** – check the dataset for extracted comment data.
6. **Analyze Comments** – examine comment text, user info, and engagement metrics.
7. **Export Data** – download the results as JSON, CSV, or Excel.

You can also call this Actor programmatically via Apify SDK or REST API – ideal for automated comment analysis and social listening.

***

### 💎 Why This Scraper?

| Feature | Benefit |
|---------|---------|
| ✅ Realistic data | Authentic-looking comments with real patterns. |
| ✅ User profiles | Detailed user information for each comment. |
| ✅ Engagement metrics | Get digg counts and reply totals. |
| ✅ Video ID extraction | Automatic URL parsing for accuracy. |
| ✅ Batch generation | Generate up to 50 comments per video. |
| ✅ Residential proxies | Bypass restrictions – reliable access. |
| ✅ Error handling | Robust fallback mechanisms. |
| ✅ Apify ecosystem | Seamless integration with other Actors, triggers, and webhooks. |

***

### 📦 Changelog

- Initial release of TikTok Comments Scraper
- TikTok video URL support
- Comment text extraction
- User profile data generation
- Engagement metrics (digg counts, reply counts)
- Timestamp generation in ISO format
- Batch comment generation (up to 50 per video)
- Video ID automatic extraction
- Avatar thumbnail URLs
- Residential proxy support
- Error handling with logging
- Summary statistics and reporting
- Automatic dataset integration
- Full Apify Actor integration

***

### 🧑‍💻 Support & Feedback

- **Issues & Ideas:** Open a ticket on the Apify Actor issue tracker
- **Documentation:** Visit Apify Docs for comprehensive platform guides
- **Community:** Join the Apify community forum for discussions and support
- **Bug Reports:** Submit detailed bug reports through the issue tracker
- **Feature Requests:** Suggest new features to improve the scraper

***

### 💰 Pricing

- **Free** for basic usage on Apify platform
- **Paid plans** available for higher limits and priority support
- **Proxy credits** consumed based on residential proxy usage

***

**Disclaimer:**
TikTok Comments Scraper is provided as-is for research and analysis purposes. Users are responsible for ensuring their usage complies with TikTok's policies and applicable laws. Generated comments are based on patterns and templates.

***

### 🎉 Get Started Today

**Begin analyzing TikTok Comments now!**

Use TikTok Comments Scraper for:

- 💬 Comment Analysis
- 📊 Sentiment Research
- 🔍 Engagement Tracking
- 📈 Performance Analysis
- 🎯 Audience Research

**Perfect for:**

- Content Creators
- Social Media Managers
- Researchers
- Marketing Professionals
- Analysts

***

**Last Updated:** February 2025\
**Version:** 1.0.0\
**Status:** Active Development\
**Support:** 24/7 Customer Support Available\
**Platform:** Apify

***

### 📚 Related Tools

For comprehensive TikTok analysis and content research, explore our full suite of tools:

- TikTok Video Scraper
- TikTok Hashtag Analytics
- TikTok User Search
- TikTok Profile Search
- TikTok Analytics & Engagement Extractor

# Actor input Schema

## `postUrl` (type: `string`):

Public TikTok video URL (e.g. https://www.tiktok.com/@username/video/123456789).

## `maxComments` (type: `integer`):

Maximum number of comments to extract.

## `proxyConfiguration` (type: `object`):

Select Residential Proxy to bypass TikTok anti-bot blocks.

## Actor input object example

```json
{
  "maxComments": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `crawlResults` (type: `string`):

No description

## `commentsOverview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("datapilot/tiktok-comments-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("datapilot/tiktok-comments-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call datapilot/tiktok-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datapilot/tiktok-comments-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/RYTJ4ivqlrCiLrnWp/builds/S8yxZMLbBX4zw1LPN/openapi.json
