# TikTok Comment Scraper (`powerai/tiktok-comment-scraper`) Actor

Extract TikTok video comments with comprehensive metadata including user profiles, engagement metrics, and reply information. Perfect for sentiment analysis, audience research, and content feedback analysis. Supports pagination for large-scale data collection.

- **URL**: https://apify.com/powerai/tiktok-comment-scraper.md
- **Developed by:** [PowerAI](https://apify.com/powerai) (community)
- **Categories:** Social media, Videos
- **Stats:** 139 total users, 0 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## 💬 TikTok Comment Scraper

Extract TikTok video comments with comprehensive metadata! This powerful tool helps you gather in-depth information about video comments, including user profiles, engagement metrics, and reply information.

### ✨ Key Features

- 📥 Get video comments with flexible filters
- 📊 Get detailed comment metadata including:
  - Comment content and statistics
  - User information
  - Engagement metrics
  - Reply counts
  - Creation timestamps
- 🔗 Generate direct URLs for:
  - User profiles
  - Comment threads
  - Video content
- 📈 Support for large result sets with automatic pagination
- 📋 Clean and structured JSON output

### 💪 Why Choose This Actor?

- **Comprehensive**: Get all comment details from TikTok
- **Flexible**: Multiple search filters and parameters
- **Efficient**: Automatic pagination for large result sets
- **Structured**: Clean JSON output for easy integration
- **Reliable**: Stable and consistent data extraction
- **User-Friendly**: Simple input parameters

### 🎯 Perfect For

- 📊 Social Media Analysts
- �� Content Creators
- 📱 Community Managers
- Market Researchers
- Brand Managers
- Sentiment Analysts

### 📈 Use Cases

1. **Sentiment Analysis**: Analyze comment sentiment
2. **Audience Research**: Study audience feedback
3. **Content Analysis**: Track comment engagement
4. **Community Management**: Monitor user interactions
5. **Brand Monitoring**: Track brand mentions

### 📝 Input Requirements

The actor accepts the following input parameters:

- `url` (required): The video URL or ID
  - Full URL: https://www.tiktok.com/@tiktok/video/7093219391759764782
  - Video ID: 7093219391759764782
- `maxResults` (optional): Maximum number of comments to extract (default: 50)

#### Input Example

```json
{
  "url": "https://www.tiktok.com/@tiktok/video/7093219391759764782",
  "maxResults": 50
}
```

#### Output Example

```json
[
  {
    "id": "7093322092531893035",
    "video_id": "7093219391759764782",
    "text": "Tik tok u ban my main and YOU DON'T BAN A VIDEO THAT A GIRL GIVES BIRTH YOU DON'T BAN HEAT YOU DON'T BAN ABUSE IM SICK OF IT WHAT DID I DO",
    "create_time": 1651542755,
    "digg_count": 81,
    "reply_total": 23,
    "user": {
      "id": "7084370207821530155",
      "region": "US",
      "sec_uid": "MS4wLjABAAAAm87YVobD2abMFVoATkTLQpJxp_tneV1S-AUujJBNFYqdNYDCJDr-lEVCps6-gz7M",
      "unique_id": "meme_hub2293",
      "nickname": "I don't post anymore        🕷",
      "signature": "",
      "avatar": "https://p16-amd-va.tiktokcdn.com/tos-maliva-avt-0068/7348414042634977323~tplv-tiktokx-cropcenter-q:100:100:q75.jpeg?dr=10794&idc=maliva&ps=87d6e48a&s=COMMENT_LIST&sc=avatar&shcp=ff37627b&shp=30310797&t=223449c4",
      "verified": false,
      "secret": false,
      "aweme_count": 0,
      "following_count": 0,
      "follower_count": 0,
      "favoriting_count": 0,
      "total_favorited": 0,
      "ins_id": "",
      "youtube_channel_title": "",
      "youtube_channel_id": "",
      "twitter_name": "",
      "twitter_id": ""
    },
    "status": 1,
    "scrapedAt": "2025-05-14T03:56:18.642Z"
  },
  ...
]
```

# Actor input Schema

## `url` (type: `string`):

The video URL or ID (full URL, video ID)

## `maxResults` (type: `integer`):

Maximum number of comments to extract

## Actor input object example

```json
{
  "url": "https://www.tiktok.com/@tiktok/video/7093219391759764782",
  "maxResults": 50
}
```

# 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("powerai/tiktok-comment-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("powerai/tiktok-comment-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 powerai/tiktok-comment-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,powerai/tiktok-comment-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/3CqTBVg3wZH2NxQhc/builds/mBFf8UgfcqQUMmwwt/openapi.json
