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

Export public TikTok video comments with author details, likes, reply counts, timestamps, and stable IDs for research, moderation, and analysis.

- **URL**: https://apify.com/fetch\_cat/tiktok-comments-scraper.md
- **Developed by:** [Hanna Nosova](https://apify.com/fetch_cat) (community)
- **Categories:** Social media, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

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

Export TikTok comments and replies from public video or photo URLs. Use this TikTok comments scraper to scrape TikTok comments into analysis-ready JSON, CSV, Excel, or Google Sheets rows—without a TikTok login or API key.

### Input example

```json
{
  "videoUrls": ["https://www.tiktok.com/@scout2015/video/6718335390845095173"],
  "maxCommentsPerVideo": 50,
  "includeReplies": false
}
```

### Output example

```json
{
  "commentId": "6718425908423475205",
  "text": "The detail in this is amazing",
  "authorUsername": "example_user",
  "authorName": "Example User",
  "authorId": "123456789",
  "authorAvatarUrl": "https://p16-sign.tiktokcdn.com/avatar.jpeg",
  "likeCount": 42,
  "replyCount": 3,
  "createdAt": "2019-07-29T18:31:20.000Z",
  "isReply": false,
  "parentCommentId": null,
  "videoId": "6718335390845095173",
  "videoUrl": "https://www.tiktok.com/@scout2015/video/6718335390845095173",
  "fetchedAt": "2026-08-13T14:00:00.000Z",
  "sourceSessionId": "0c47a389-927c-42c5-a624-c679dd31422d",
  "extractionStatus": "ok",
  "missingFields": [],
  "isPinned": false,
  "commentLanguage": "en"
}
```

### What data can you export?

| Field | Description |
|---|---|
| `commentId` | TikTok comment identifier |
| `text` | Comment text |
| `authorUsername` | Public TikTok username |
| `authorName` | Public display name |
| `authorId` | Public author identifier |
| `authorAvatarUrl` | Public avatar URL |
| `likeCount` | Comment likes |
| `replyCount` | Number of replies reported by TikTok |
| `createdAt` | ISO 8601 publication time |
| `isReply` | Whether the row is a reply |
| `parentCommentId` | Parent ID for reply rows; otherwise `null` |
| `videoId` | Source post identifier |
| `videoUrl` | Source URL supplied in input |
| `fetchedAt` | ISO 8601 collection time |
| `sourceSessionId` | Session identifier useful for run diagnostics |
| `extractionStatus` | `ok` or `partial` |
| `missingFields` | Source fields unavailable on this row |
| `isPinned` | Whether TikTok marks the comment as pinned |
| `commentLanguage` | Language code when TikTok supplies one |

All 19 keys are present on every saved row. Replies are separate rows so exports remain easy to filter and join.

### Who is it for?

- **Social media teams** monitoring audience reactions and brand mentions.
- **Researchers and analysts** building sentiment or discussion datasets.
- **Marketing teams** comparing engagement across campaigns or competitor posts.
- **Journalists and archivists** preserving public discussion around newsworthy videos.
- **Community managers** identifying highly liked comments and active participants.

### Input settings

| Setting | Type | Default | Description |
|---|---|---:|---|
| `videoUrls` | string\[] | required | Public TikTok video/photo URLs or numeric post IDs |
| `maxCommentsPerVideo` | integer | 20 | Top-level comments per post (1–10,000) |
| `includeReplies` | boolean | false | Save replies as linked rows |
| `maxRepliesPerComment` | integer | 20 | Replies saved per parent (0–1,000) |
| `maxConcurrency` | integer | 1 | Posts processed concurrently (1–3) |
| `requestTimeoutSecs` | integer | 30 | Per-request timeout (10–120 seconds) |
| `proxyConfiguration` | object | none | Optional Apify or custom proxy configuration |

### Input recipes

**Several posts with replies**

```json
{
  "videoUrls": [
    "https://www.tiktok.com/@scout2015/video/6718335390845095173",
    "https://www.tiktok.com/@jenna_bushhager/video/7223827494913215786"
  ],
  "maxCommentsPerVideo": 100,
  "includeReplies": true,
  "maxRepliesPerComment": 10,
  "maxConcurrency": 2
}
```

**Fast validation run**

```json
{
  "videoUrls": ["7149523510589754670"],
  "maxCommentsPerVideo": 5
}
```

### Pricing

This Actor uses pay-per-event pricing:

- **Run started** is charged once when valid scraping work begins.
- **Comment scraped** is charged only for each comment row successfully saved.

See the [live Pricing tab](https://apify.com/fetch_cat/tiktok-comments-scraper/pricing) for current rates for your Apify plan tier. Apify platform usage may be billed separately according to your plan.

### Tips and limits

- Start with 20 comments and increase the limit after validating your post.
- A post may return fewer rows than its displayed total because TikTok filters, removes, or limits public comments.
- Deleted, private, age-restricted, or region-restricted posts may be unavailable.
- Reply collection can substantially increase run time and row count.
- Successful rows from other posts are preserved if one input fails.
- Re-running a post can capture newer comments; use `commentId` to deduplicate across runs.
- The Actor collects only comments visible on public posts without logging in. Follow TikTok's terms and applicable privacy rules.

### TikTok comments API usage

#### JavaScript

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('fetch_cat/tiktok-comments-scraper').call({
  videoUrls: ['https://www.tiktok.com/@scout2015/video/6718335390845095173'],
  maxCommentsPerVideo: 50,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient(token='YOUR_APIFY_TOKEN')
run = client.actor('fetch_cat/tiktok-comments-scraper').call(run_input={
    'videoUrls': ['https://www.tiktok.com/@scout2015/video/6718335390845095173'],
    'maxCommentsPerVideo': 50,
})
items = list(client.dataset(run['defaultDatasetId']).iterate_items())
```

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/fetch_cat~tiktok-comments-scraper/runs?token=YOUR_APIFY_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"videoUrls":["6718335390845095173"],"maxCommentsPerVideo":50}'
```

### Use with AI agents via MCP

Connect an MCP-compatible client to:

```text
https://mcp.apify.com?tools=fetch_cat/tiktok-comments-scraper
```

Example prompt: “Extract 100 comments from these TikTok posts and summarize recurring positive and negative themes.”

### FAQ

#### How can I export comments from a public TikTok video?

Add public video URLs to `videoUrls`, choose a comment limit, and run the Actor. Download the resulting dataset as JSON, CSV, or Excel.

#### Can I scrape TikTok comment authors, likes, replies, and timestamps?

Yes. Each row includes author identity fields, like and reply counts, creation time, and stable comment and video IDs when publicly available.

#### Can it scrape replies?

Yes. Enable `includeReplies`; every reply includes `isReply: true` and its `parentCommentId`.

#### Why did I receive fewer comments than requested?

The requested value is a maximum. TikTok may expose fewer public comments, and removed or filtered comments are not returned.

#### Can I process several posts in one run?

Yes. Add multiple values to `videoUrls`. Each post uses an independent session, and successful output is preserved when another target fails.

#### Does it support short TikTok links?

Use a full post URL or numeric post ID. Redirect-only short links are not accepted as input.

### Related Actors

- [TikTok Video Scraper](https://apify.com/fetch_cat/tiktok-video-scraper)
- [TikTok Profile Scraper](https://apify.com/fetch_cat/tiktok-profile-scraper)
- [TikTok Hashtag Scraper](https://apify.com/fetch_cat/tiktok-hashtag-scraper)
- [TikTok Search Results Scraper](https://apify.com/fetch_cat/tiktok-search-results-scraper)
- [TikTok User Search Scraper](https://apify.com/fetch_cat/tiktok-user-search-scraper)

### Support

Use the **Issues** tab on the Actor page and include the public post URL, input, and run ID. Do not post private credentials or cookies.

# Actor input Schema

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

Full public TikTok video/photo URLs or numeric post IDs.

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

Maximum top-level comments saved for each post.

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

Also save replies as separate rows linked by parentCommentId.

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

Maximum replies saved under each top-level comment.

## `maxConcurrency` (type: `integer`):

Number of posts processed at once. Keep low for route stability.

## `requestTimeoutSecs` (type: `integer`):

Timeout in seconds for each TikTok request.

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

Optional proxy for regional availability or rate limits.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.tiktok.com/@scout2015/video/6718335390845095173"
  ],
  "maxCommentsPerVideo": 20,
  "includeReplies": false,
  "maxRepliesPerComment": 20,
  "maxConcurrency": 1,
  "requestTimeoutSecs": 30
}
```

# Actor output Schema

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

Dataset containing one structured TikTok comment or reply record per item.

# 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/@scout2015/video/6718335390845095173"
    ],
    "maxCommentsPerVideo": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("fetch_cat/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/@scout2015/video/6718335390845095173"],
    "maxCommentsPerVideo": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("fetch_cat/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/@scout2015/video/6718335390845095173"
  ],
  "maxCommentsPerVideo": 20
}' |
apify call fetch_cat/tiktok-comments-scraper --silent --output-dataset

```

## MCP server setup

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