# TikTok Comment Exporter (CSV/Excel/API) (`thodor/tiktok-comments-scraper`) Actor

Export TikTok comments to CSV, Excel, or JSON from any video URL. No comment cap, handles 100k+ comments, replies included. Use it as a TikTok comment scraper, downloader, or straight from the API.

- **URL**: https://apify.com/thodor/tiktok-comments-scraper.md
- **Developed by:** [Thodor](https://apify.com/thodor) (community)
- **Categories:** Social media, Automation, Videos
- **Features:** Limited permissions
- **Stats:** 744 total users, 13 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 comment scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Exporter – Video URL to CSV & Excel

A **TikTok comment exporter tool**: paste a TikTok video URL and **load all comments into a spreadsheet** as CSV, Excel, or JSON. Every comment and reply, with likes, timestamps, and usernames. No comment cap, no login, no TikTok account.

A 10,000-comment export takes around a minute.

### 📋 How to export TikTok comments to Excel or CSV

1. Paste video URLs into **TikTok Video URLs**.
2. Want the replies too? Toggle **Include replies** on.
3. Click **Start**.
4. Open the **Output** tab and export as CSV, Excel, or JSON.

### 🎁 So what do you get?

| 💬 Comment text | 🧵 Full reply threads | ❤️ Like counts |
| --- | --- | --- |
| 👤 Author & user ID | 📅 Timestamps | 🔁 Reply counts |
| 🖼️ Image comments | 📌 Pinned & creator-liked | 🛒 Purchase-intent flag |

### 🎯 Three things people run this for

| | How |
| --- | --- |
| 🔬 **Sentiment & audience research** | Export a campaign video's comment section and feed the CSV straight into your sentiment tool. |
| 🎲 **Giveaway picking** | Pull every entry comment into Excel and pick winners from the complete list. |
| 🎓 **Academic datasets** | Collect comments from a batch of videos in one run, thread structure included. |

### 📥 Input

The simplest input that works:

```json
{
    "videoUrls": ["https://www.tiktok.com/@ishowspeed/video/7621300668329905422"]
}
```

- `videoUrls`: the TikTok videos to export comments from. Full URLs, any number of them.
- `maxCommentsPerVideo`: default 500. Set 0 to export every comment on the video.
- `includeReplies`: default false. When on, replies count toward `maxCommentsPerVideo`.

#### ⚡ Everything from one viral video

```json
{
    "videoUrls": ["https://www.tiktok.com/@ishowspeed/video/7621300668329905422"],
    "maxCommentsPerVideo": 0,
    "includeReplies": true
}
```

#### 📦 A batch of videos, capped

```json
{
    "videoUrls": [
        "https://www.tiktok.com/@brand/video/7622233769231142165",
        "https://www.tiktok.com/@brand/video/7613032455011945748",
        "https://www.tiktok.com/@brand/video/7615909607940588310"
    ],
    "maxCommentsPerVideo": 1000
}
```

### 📤 Output

One flat row per comment or reply, duplicates dropped. Results stream in while the run is going.

```json
{
    "video_url": "https://www.tiktok.com/@txmfitt/video/7613032455011945748",
    "comment_id": "7616086972566078230",
    "parent_comment_id": "",
    "depth": 0,
    "comment": "how many did you do in an hour? I once did 500",
    "likes": 62,
    "reply_count": 3,
    "created_at": "2026-03-11T19:47:22+00:00",
    "author_username": "alanas698",
    "liked_by_video_creator": true,
    "pinned": false
    // HIDDEN: reply_to_reply_id, comment_image_url, author_display_name, author_id, reply_to_username, purchase_intent, comment_language, share_url
}
```

A reply row, same shape:

```json
{
    "comment_id": "7617031854978024193",
    "parent_comment_id": "7616086972566078230",
    "depth": 1,
    "comment": "i did 1,017",
    "author_username": "txmfitt"
    // HIDDEN: same fields as above
}
```

> ⚠️ **Replies are rows, not nested objects.** Filter `depth == 0` for top-level comments, or group on `parent_comment_id` to rebuild threads.

#### Fields

| Field | Notes |
| --- | --- |
| `video_url` | The video this comment belongs to |
| `comment_id` | Unique comment ID |
| `parent_comment_id` | Empty for top-level comments |
| `reply_to_reply_id` | Which reply inside the thread was answered |
| `depth` | 0 = top-level, 1 = reply |
| `comment` | Comment text, empty for image-only comments |
| `comment_image_url` | Image URL for image-only comments |
| `likes` | Like count |
| `reply_count` | Number of replies |
| `created_at` | ISO 8601 timestamp, UTC |
| `author_username` | Commenter's @username |
| `author_display_name` | Commenter's display name |
| `author_id` | TikTok numeric user ID |
| `reply_to_username` | Username being replied to |
| `liked_by_video_creator` | Creator liked this comment |
| `pinned` | Creator pinned this comment |
| `purchase_intent` | TikTok's flag for buying intent ("Where can I buy this?") |
| `comment_language` | Language code, `"un"` = undetermined |
| `share_url` | Direct share link |

### ⚙️ Use it as a TikTok comment API

Every run is an HTTP endpoint: POST the same JSON as the form and the comment rows come back in the response body.

#### Python

```python
import requests

resp = requests.post(
    "https://api.apify.com/v2/acts/thodor~tiktok-comments-scraper/run-sync-get-dataset-items",
    params={"token": "<YOUR_APIFY_TOKEN>"},
    json={"videoUrls": ["https://www.tiktok.com/@ishowspeed/video/7621300668329905422"]},
)
comments = resp.json()
```

#### Node.js

```javascript
const axios = require("axios");

const { data: comments } = await axios.post(
    "https://api.apify.com/v2/acts/thodor~tiktok-comments-scraper/run-sync-get-dataset-items",
    { videoUrls: ["https://www.tiktok.com/@ishowspeed/video/7621300668329905422"] },
    { params: { token: process.env.APIFY_TOKEN } }
);
```

#### curl

```bash
curl -X POST "https://api.apify.com/v2/acts/thodor~tiktok-comments-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"videoUrls": ["https://www.tiktok.com/@ishowspeed/video/7621300668329905422"]}'
```

Big video? Swap `run-sync-get-dataset-items` for `runs` to go async with a webhook. n8n, Make, and Zapier take the same input.

> 💡 **Tip:** no need to write the JSON by hand. Fill in the form on the Input tab, switch the editor from **Form** to **JSON**, and copy the result into your code.

### 💰 How much does it cost to export TikTok comments?

You pay per comment or reply pushed to the dataset, at the rate on the price card on this page. Retries, blocks, and duplicates cost nothing.

`maxCommentsPerVideo` is the cost cap. The default of 500 keeps a first run cheap.

> ⚠️ **A viral video can be a big bill.** `maxCommentsPerVideo: 0` with replies on against a 600,000-comment video bills all 600,000 rows.

### ❓ FAQ

**Is there a free tool that can scrape TikTok comments?**
Yes. Registering on Apify comes with $5 of free platform credit every month, no credit card needed. That covers around 10,000 comments.

**Do I need a browser extension to export TikTok comments?**
No. This runs in the cloud: nothing to install, no tab to keep open, works from any device.

**Is there an official TikTok comments API?**
TikTok's Research API is limited to vetted academic researchers, and the commercial Display API does not return comments. This actor works with any Apify account.

**Can I export comments from a whole profile by username?**
No. Input is video URLs only; the old username mode was removed.

**In what order do rows arrive when replies are on?**
Page by page: top-level comments first, then their replies, then the next page. For all top-level comments first, run once with replies off.

**Why did a video return 0 comments?**
Some videos have comments switched off or simply none. Blocks retry automatically, so 0 means there was nothing to get.

**Can I track new comments on a video over time?**
Yes. Put the actor on an Apify Schedule (daily or weekly) with the same URLs and compare runs on `comment_id` to see what is new.

**Is it legal to scrape TikTok comments?**
The actor reads only publicly visible comments on public videos. Storing and using personal data is governed by rules like GDPR; check what applies to your project.

### 🛟 Support

Something not working, or a field missing? Message me in the Issues tab and I'll look into it quickly. I'm a solo dev, so don't hesitate.

- Thodor

# Actor input Schema

## `videoUrls` (type: `array`):

TikTok video URLs to export comments from (e.g. https://www.tiktok.com/@username/video/1234567890).

## `maxCommentsPerVideo` (type: `integer`):

Maximum number of comments to extract per video. Set to 0 for all comments.

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

Whether to fetch reply threads for each comment.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.tiktok.com/@ishowspeed/video/7621300668329905422"
  ],
  "maxCommentsPerVideo": 500,
  "includeReplies": false
}
```

# Actor output Schema

## `results` (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 = {
    "videoUrls": [
        "https://www.tiktok.com/@ishowspeed/video/7621300668329905422"
    ]
};

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

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

```

## MCP server setup

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