# Tiktok Comment Scraper | No Login | No Cookie (`rexreus/tiktok-comment-scraper`) Actor

Fast TikTok comment scraper with reply threads, sentiment analysis & advanced filters. Extract author profiles, like counts, emojis, and nested replies from any TikTok video URL. Lightweight, no browser.

- **URL**: https://apify.com/rexreus/tiktok-comment-scraper.md
- **Developed by:** [REXREUS D.O](https://apify.com/rexreus) (community)
- **Categories:**
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 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?

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 Comment Scraper (with Replies, Sentiment & Filtering)

<img src="./assets/banner.png" alt="TikTok Comment Scraper Hero Banner" width="100%" />

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-blue.svg)](https://apify.com)
[![Node.js 20](https://img.shields.io/badge/Node.js-20.x-brightgreen.svg)](https://nodejs.org)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue.svg)](https://www.typescriptlang.org)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

An **enterprise-grade, ultra-fast, and cost-efficient Apify Actor** to scrape TikTok comments, nested reply threads, commenter metadata, and instant lightweight sentiment/emoji analytics.

***

### 🌟 Why Choose This TikTok Comment Scraper?

- **⚡ ~190x Cheaper Compute**: Runs on **256MB RAM default** using a lightweight HTTP API engine (`got-scraping`). Costs up to 80% less in Apify Compute Units compared to heavy browser scrapers (Playwright/Puppeteer).
- **💬 Deep Nested Reply Threads**: Recursively extracts nested comment reply hierarchies (`maxRepliesPerComment`) preserving parent-child relationships (`parent_comment_id`).
- **🧠 Zero-Cost Built-in Sentiment & Emojis**: Automatic on-the-fly sentiment tagging (`POSITIVE`, `NEUTRAL`, `NEGATIVE`) with normalized scoring and emoji extraction without requiring third-party OpenAI keys or heavy ML models.
- **🎯 Granular Pre-Filtering**: Filter comments before saving by keyword, minimum likes, verified author status, and date range.
- **📊 CSV & JSON Ready**: Formatted dataset schema ready for 1-click export to CSV, JSON, Excel, or integration into Pandas / Tableau pipelines.

***

### 📥 Input Parameters

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `postUrls` | `Array<String>` | **Required** | List of TikTok video URLs (e.g., `https://www.tiktok.com/@user/video/739182...`) or Video IDs. |
| `maxComments` | `Integer` | `500` | Safety limit on top-level comments per video. |
| `maxRepliesPerComment` | `Integer` | `10` | Depth limit for nested comment replies per thread. Set to `0` to disable reply scraping. |
| `filterKeywords` | `Array<String>` | `[]` | Case-insensitive list of keywords. Only saves comments matching at least one keyword. |
| `minLikes` | `Integer` | `0` | Minimum like count threshold filter. |
| `verifiedOnly` | `Boolean` | `false` | Only extract comments from verified TikTok accounts. |
| `proxyConfiguration` | `Object` | `{ "useApifyProxy": true }` | Apify Proxy configuration (Residential proxy recommended for zero-block runs). |

#### Input JSON Example

```json
{
  "postUrls": [
    "https://www.tiktok.com/@scout20/video/7391827364510294021"
  ],
  "maxComments": 100,
  "maxRepliesPerComment": 5,
  "filterKeywords": ["great", "love", "scam"],
  "minLikes": 2,
  "verifiedOnly": false
}
```

***

### 📤 Output Dataset Schema

Each dataset item contains 14 structured fields:

```json
{
  "comment_id": "718293849501823",
  "text": "This product is absolutely amazing! 🔥😍",
  "author_handle": "tech_fan_99",
  "author_name": "Tech Fan",
  "author_avatar": "https://p16-sign.tiktokcdn.com/...",
  "author_verified": true,
  "likes_count": 1420,
  "reply_count": 12,
  "created_at": "2026-08-28T14:30:00.000Z",
  "video_id": "7391827364510294021",
  "parent_comment_id": null,
  "sentiment_label": "POSITIVE",
  "sentiment_score": 0.85,
  "emojis": ["🔥", "😍"]
}
```

***

### 💰 Compute Cost Efficiency

| Metric | Heavy Playwright Scraper | TikTok Comment Scraper (This Actor) | Savings |
| :--- | :--- | :--- | :--- |
| **Container Memory** | 1,024 MB - 2,048 MB | **256 MB** | **4x lower RAM** |
| **Speed (1k comments)** | ~90 seconds | **~5 seconds** | **18x faster** |
| **Compute Cost / 1k items** | $0.0040 USD | **$0.000056 USD** | **71.4x lower CUs** |
| **Residential Proxy Bandwidth** | ~20 MB ($0.156) | **~100 KB ($0.00078)** | **200x cheaper data** |

***

### ❓ Frequently Asked Questions (FAQ)

#### Q: Do I need an OpenAI API key for sentiment analysis?

**No.** This Actor includes a zero-dependency, built-in AFINN-165 sentiment engine and Unicode emoji parser. Sentiment tagging is instant and 100% free.

#### Q: Does it extract nested comment replies?

**Yes.** Set `maxRepliesPerComment` to your desired reply depth. Replies are saved with their parent comment ID linked (`parent_comment_id`).

***

### 📜 License

MIT License. Free for commercial & personal use on Apify platform.

# Actor input Schema

## `postUrls` (type: `array`):

List of full TikTok video URLs (e.g., https://www.tiktok.com/@user/video/1234567890) or standalone video IDs.

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

Maximum number of top-level comments to scrape per video. Default is 500.

## `maxRepliesPerComment` (type: `integer`):

Maximum number of nested comment replies to scrape per parent comment. Set to 0 to disable reply scraping.

## `filterKeywords` (type: `array`):

Case-insensitive list of keywords. If specified, only comments containing at least one keyword will be saved.

## `minLikes` (type: `integer`):

Only save comments with at least this number of likes.

## `verifiedOnly` (type: `boolean`):

If true, only save comments from verified TikTok accounts.

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

Select Apify Proxy (Residential recommended for high reliability).

## Actor input object example

```json
{
  "postUrls": [
    "https://www.tiktok.com/@scout20/video/7391827364510294021"
  ],
  "maxComments": 500,
  "maxRepliesPerComment": 10,
  "filterKeywords": [],
  "minLikes": 0,
  "verifiedOnly": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset containing all scraped TikTok comments with sentiment analysis, author info, and emoji data.

# 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 = {
    "postUrls": [
        "https://www.tiktok.com/@scout20/video/7391827364510294021"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("rexreus/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 = { "postUrls": ["https://www.tiktok.com/@scout20/video/7391827364510294021"] }

# Run the Actor and wait for it to finish
run = client.actor("rexreus/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 '{
  "postUrls": [
    "https://www.tiktok.com/@scout20/video/7391827364510294021"
  ]
}' |
apify call rexreus/tiktok-comment-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rexreus/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/chB0hmocPUsSDixaZ/builds/unD8UFllKdsslxmqv/openapi.json
