# TikTok Video Comments Scraper (With Replies) (`khadinakbar/tiktok-video-comments-scraper`) Actor

Extract TikTok video comments with full nested reply threads. Replies ON by default. Get comment text, author, likes, timestamps, and all replies per comment. Export to JSON, CSV, Excel.

- **URL**: https://apify.com/khadinakbar/tiktok-video-comments-scraper.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** Social media, MCP servers, Videos
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 comments

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Video Comments Scraper (With Replies)

Extract TikTok video comments with **full nested reply threads** — replies are ON by default. Get comment text, author details, like counts, timestamps, and every reply thread for each comment. No login required.

Export scraped data, run via API, schedule and monitor runs, or integrate with AI pipelines and other tools.

---

### What does this actor do?

This actor scrapes comments from one or more TikTok video URLs and returns them as structured JSON — including every nested reply under each comment. Unlike most TikTok comment scrapers that hide replies behind an opt-in toggle (defaulting to OFF), this actor surfaces reply threads by default so you get the full conversation context immediately.

It communicates directly with TikTok's internal comment API using the browser's own session credentials, which means no API keys, no cookies to manage, and no login required.

---

### Why use this actor?

- **Replies included by default** — full conversation threads, not just top-level comments
- **No login or cookies required** — works out of the box on any public TikTok video
- **Rich structured output** — 16 fields per comment including author metadata and nested replies array
- **MCP-compatible** — output schema is fully documented for AI agent integration
- **Reliable pagination** — handles videos with thousands of comments

---

### What data can this actor extract?

Each comment record contains the following fields:

| Field | Type | Description |
|-------|------|-------------|
| `comment_id` | string | Unique TikTok comment ID |
| `video_id` | string | ID of the video this comment belongs to |
| `video_url` | string | Full URL of the TikTok video |
| `text` | string | The comment text content |
| `author_username` | string | Commenter's @username |
| `author_nickname` | string | Commenter's display name |
| `author_id` | string | Commenter's unique TikTok user ID |
| `author_avatar_url` | string\|null | URL of commenter's profile picture |
| `like_count` | integer | Number of likes on the comment |
| `reply_count` | integer | Total replies to this comment on TikTok |
| `is_pinned` | boolean | Whether pinned by the video creator |
| `language` | string\|null | Detected language (ISO 639-1 code, e.g. "en") |
| `created_at` | string | ISO 8601 timestamp when comment was posted |
| `replies` | array | Nested reply objects (see below) |
| `scraped_at` | string | ISO 8601 timestamp when this data was scraped |
| `source_url` | string | The input video URL |

#### Reply object fields

Each item in the `replies` array contains:

| Field | Type | Description |
|-------|------|-------------|
| `reply_id` | string | Unique reply ID |
| `text` | string | Reply text |
| `author_username` | string | Reply author's @username |
| `author_nickname` | string | Reply author's display name |
| `author_id` | string | Reply author's user ID |
| `author_avatar_url` | string\|null | Reply author's avatar URL |
| `like_count` | integer | Likes on this reply |
| `replied_to_username` | string\|null | @username this reply is directed at |
| `created_at` | string | ISO 8601 timestamp when reply was posted |

---

### How to use this actor

#### Via the Apify Console

1. Open the actor and click **Try for free**
2. Paste one or more TikTok video URLs into the **TikTok Video URLs** field
3. Set your limits (default: 100 comments, 20 replies per comment)
4. Click **Start**
5. Download results as JSON, CSV, or Excel

#### Via the API

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

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

const run = await client.actor('khadinakbar/tiktok-video-comments-scraper').call({
    postURLs: [
        'https://www.tiktok.com/@bellapoarch/video/6862153058223197445',
    ],
    maxCommentsPerPost: 200,
    includeReplies: true,
    maxRepliesPerComment: 30,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
````

#### Example output

```json
{
    "comment_id": "7234567890123456789",
    "video_id": "6862153058223197445",
    "video_url": "https://www.tiktok.com/@bellapoarch/video/6862153058223197445",
    "text": "This is so cute! 😍",
    "author_username": "johndoe123",
    "author_nickname": "John Doe",
    "author_id": "6761572823670931457",
    "author_avatar_url": "https://p16-sign.tiktokcdn-us.com/...",
    "like_count": 142,
    "reply_count": 3,
    "is_pinned": false,
    "language": "en",
    "created_at": "2024-01-15T10:30:00.000Z",
    "replies": [
        {
            "reply_id": "7234567890999888777",
            "text": "Agreed!! 🔥",
            "author_username": "jane_smith",
            "author_nickname": "Jane Smith",
            "author_id": "123456789",
            "author_avatar_url": "https://p16-sign.tiktokcdn-us.com/...",
            "like_count": 12,
            "replied_to_username": "johndoe123",
            "created_at": "2024-01-15T11:00:00.000Z"
        }
    ],
    "scraped_at": "2026-04-08T12:00:00.000Z",
    "source_url": "https://www.tiktok.com/@bellapoarch/video/6862153058223197445"
}
```

***

### Input parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `postURLs` | array | — | TikTok video URLs to scrape. Required. |
| `maxCommentsPerPost` | integer | 100 | Max top-level comments per video |
| `includeReplies` | boolean | true | Fetch nested reply threads |
| `maxRepliesPerComment` | integer | 20 | Max replies per comment (0 = all) |
| `proxyConfiguration` | object | none | Optional proxy settings |

***

### Use cases

- **Sentiment analysis** — Analyze audience reactions to content, brands, or trends
- **Brand monitoring** — Track what people say about your brand on TikTok
- **Competitor research** — Study engagement and comment quality on competitor videos
- **Influencer vetting** — Evaluate comment authenticity before partnerships
- **Market research** — Collect qualitative data at scale for social media studies
- **Content strategy** — Understand what resonates by analyzing high-engagement comment threads
- **AI training data** — Generate labeled conversation datasets from TikTok discussions

***

### Pricing

This actor uses **pay-per-event** pricing — you are charged per comment collected.

| Comments | Approximate cost |
|----------|-----------------|
| 100 | ~$0.08 |
| 1,000 | ~$0.80 |
| 10,000 | ~$8.00 |
| 100,000 | ~$80.00 |

Replies within comments are not charged separately — only top-level comments are billed.

***

### Works great with

- **Apify's TikTok Scraper** — Get video metadata, then pass URLs to this actor to scrape their comment sections
- **Google Sheets integration** — Export comments directly to spreadsheets for analysis

***

### FAQ

**Does this require a TikTok login?**
No. This actor scrapes public comment sections without any authentication.

**Does it work on private accounts?**
No. Only public videos are supported.

**How many comments can I scrape?**
As many as exist on the video. Set `maxCommentsPerPost` to 0 for unlimited (may be slow for viral videos with millions of comments).

**Are replies included?**
Yes — by default. Set `includeReplies: false` to disable and only collect top-level comments (much faster).

**What about short TikTok links (vm.tiktok.com)?**
Supported — the actor follows the redirect automatically.

***

### Legal disclaimer

*This actor is intended for lawful data collection from publicly available TikTok content. Users are responsible for compliance with applicable laws, TikTok's Terms of Service, and data protection regulations (GDPR, CCPA, etc.). Do not use this actor to collect data on private individuals without consent, or for any purpose that violates applicable law.*

# Actor input Schema

## `postURLs` (type: `array`):

Use this field when the user provides a specific TikTok video URL. Add one or more TikTok video URLs to scrape comments from. Accepts full URLs (https://www.tiktok.com/@user/video/123) or short links (vm.tiktok.com/XXXX). Do NOT use this when you only have a username — this field is for direct video links.

## `maxCommentsPerPost` (type: `integer`):

Maximum number of top-level comments to collect per video. Set to 0 for unlimited (may be very slow for viral videos with millions of comments).

## `includeReplies` (type: `boolean`):

When enabled (default), the actor fetches all nested reply threads under each comment. Disable to collect only top-level comments — much faster.

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

Maximum number of replies to fetch per comment when Include Replies is enabled. Set to 0 for all replies.

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

Optional proxy settings. Leave blank to use no proxy (works for most videos). Use Apify Proxy or custom proxies for region-restricted content.

## Actor input object example

```json
{
  "postURLs": [
    "https://www.tiktok.com/@bellapoarch/video/6862153058223197445"
  ],
  "maxCommentsPerPost": 100,
  "includeReplies": true,
  "maxRepliesPerComment": 20
}
```

# Actor output Schema

## `comments` (type: `string`):

All scraped TikTok comments — text, author username, likes, reply count, timestamps, and nested replies when enabled.

# 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/@bellapoarch/video/6862153058223197445"
    ],
    "maxCommentsPerPost": 100,
    "includeReplies": true,
    "maxRepliesPerComment": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/tiktok-video-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 = {
    "postURLs": ["https://www.tiktok.com/@bellapoarch/video/6862153058223197445"],
    "maxCommentsPerPost": 100,
    "includeReplies": True,
    "maxRepliesPerComment": 20,
}

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

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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/@bellapoarch/video/6862153058223197445"
  ],
  "maxCommentsPerPost": 100,
  "includeReplies": true,
  "maxRepliesPerComment": 20
}' |
apify call khadinakbar/tiktok-video-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=khadinakbar/tiktok-video-comments-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TikTok Video Comments Scraper (With Replies)",
        "description": "Extract TikTok video comments with full nested reply threads. Replies ON by default. Get comment text, author, likes, timestamps, and all replies per comment. Export to JSON, CSV, Excel.",
        "version": "1.0",
        "x-build-id": "r6RfeN5Ix5AfeUt3u"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/khadinakbar~tiktok-video-comments-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-khadinakbar-tiktok-video-comments-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/khadinakbar~tiktok-video-comments-scraper/runs": {
            "post": {
                "operationId": "runs-sync-khadinakbar-tiktok-video-comments-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/khadinakbar~tiktok-video-comments-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-khadinakbar-tiktok-video-comments-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "postURLs": {
                        "title": "TikTok Video URLs",
                        "type": "array",
                        "description": "Use this field when the user provides a specific TikTok video URL. Add one or more TikTok video URLs to scrape comments from. Accepts full URLs (https://www.tiktok.com/@user/video/123) or short links (vm.tiktok.com/XXXX). Do NOT use this when you only have a username — this field is for direct video links.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxCommentsPerPost": {
                        "title": "Max comments per video",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of top-level comments to collect per video. Set to 0 for unlimited (may be very slow for viral videos with millions of comments).",
                        "default": 100
                    },
                    "includeReplies": {
                        "title": "Include replies",
                        "type": "boolean",
                        "description": "When enabled (default), the actor fetches all nested reply threads under each comment. Disable to collect only top-level comments — much faster.",
                        "default": true
                    },
                    "maxRepliesPerComment": {
                        "title": "Max replies per comment",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum number of replies to fetch per comment when Include Replies is enabled. Set to 0 for all replies.",
                        "default": 20
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Optional proxy settings. Leave blank to use no proxy (works for most videos). Use Apify Proxy or custom proxies for region-restricted content."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
