# TikTok Comments Scraper (Video Comments & Replies) (`webdatatools/tiktok-comments-scraper`) Actor

Scrape public comments of TikTok videos: text, author, likes, reply count and date, with optional replies. No login. Give video URLs; get one row per comment.

- **URL**: https://apify.com/webdatatools/tiktok-comments-scraper.md
- **Developed by:** [Murat Uzun](https://apify.com/webdatatools) (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.60 / 1,000 comments

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

### What is TikTok Comments Scraper?

**TikTok Comments Scraper** returns the **public comments of TikTok videos** as one clean row per comment: the **text, author, like count, reply count and date**. Turn on **Include replies** to also get the replies under each comment, marked so you can rebuild the thread.

Use it for comment sentiment analysis, audience research, spotting common questions and objections, tracking how a video's discussion changes over time, or collecting comments for a brand-monitoring report.

### What data does TikTok Comments Scraper extract?

| Field | Description |
|---|---|
| `commentId`, `text`, `createdAt`, `likes` | The comment itself and its engagement |
| `replyCount` | How many replies TikTok shows under the comment |
| `isReply`, `parentCommentId` | Set for replies, pointing at the comment they answer |
| `videoId`, `videoUrl` | The video the comment belongs to |
| `authorUsername`, `authorNickname`, `authorUid`, `authorVerified`, `authorAvatarUrl` | Who wrote it |
| `language` | Language TikTok detected for the comment |

### How to use TikTok Comments Scraper

1. Add **Video URLs**: `https://www.tiktok.com/@user/video/…` links, one per line or comma-separated. Short `vm.tiktok.com` links and bare video IDs also work.
2. Set **Max comments per video** (default 100).
3. Optional: turn on **Include replies** and set **Max replies per comment** (default 10).
4. Run. Rows are saved as they arrive, so a stopped run keeps what it already collected.
5. Download the rows as JSON, CSV, Excel or HTML, or read them through the API.

### Example input

```json
{
    "videos": ["https://www.tiktok.com/@nasa/video/7665075736742530317"],
    "maxComments": 20,
    "includeReplies": true,
    "maxRepliesPerComment": 5
}
```

### Example output

This row is from a real run on 22 October 2026 (`maxComments` 20, replies on, 75 rows in total):

```json
{
    "type": "comment",
    "commentId": "7665081157037802254",
    "videoId": "7665075736742530317",
    "videoUrl": "https://www.tiktok.com/@usedgov/video/7665075736742530317",
    "text": "TO THE MOON!! 🚀",
    "createdAt": "2026-07-21T20:30:12.000Z",
    "likes": 4821,
    "replyCount": 66,
    "isReply": false,
    "parentCommentId": null,
    "authorUsername": "usedgov",
    "authorNickname": "U.S. Department of Education",
    "authorUid": "7620511313148298254",
    "authorVerified": false,
    "language": "en",
    "input": "https://www.tiktok.com/@nasa/video/7665075736742530317"
}
```

### How much does it cost?

Pay per result: **$0.001 per comment or reply ($1 per 1,000)**, with volume discounts on paid Apify plans. URLs that are not TikTok video links and videos TikTok cannot load go to the `ERRORS` record and cost nothing. Set **Maximum cost per run** to cap spend.

### Limits

- TikTok returns about 20 comments per page. A video whose comment pages TikTok stops serving ends early; the run's `ERRORS` record says when a page could not be loaded. Pages are not counted as errors when they are simply empty.
- Replies are read one level deep: replies to replies are not included.
- Avatar URLs are signed by TikTok and expire after some days.
- The Actor fetches pages directly and switches to Apify Residential proxy only if TikTok blocks the direct request.

### Using TikTok Comments Scraper with AI agents

The Actor is pay-per-event with limited permissions, so AI agents can call it through Apify's MCP server (`mcp.apify.com`), for example with `{"videos": ["https://www.tiktok.com/@nasa/video/7665075736742530317"], "maxComments": 50}`. It also accepts `videoUrls`, `urls`, `url` and `startUrls`.

### FAQ

**Is scraping TikTok comments legal?** The Actor reads comments that anyone can see on a public video page, without an account. Check that your use of the data, especially personal data in comments, is allowed where you are.

**Can it read private or deleted comments?** No. Only the comments TikTok shows publicly are returned.

**Does it return the videos themselves?** No. It returns comments only. Use the TikTok Profile Scraper for the video's view and like counts.

### Related Actors

Part of the **webdatatools** web-intelligence suite: every Actor is pay-per-event, reads public data without a login, and returns one clean row per entity. See the TikTok Profile Scraper for accounts and video statistics.

# Actor input Schema

## `videos` (type: `array`):

TikTok video URLs, e.g. `https://www.tiktok.com/@nasa/video/7665075736742530317`. Short `vm.tiktok.com` links and bare video IDs work too.

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

Top-level comments per video (TikTok order, 20 per page).

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

Also return replies to each comment (they are marked `isReply`).

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

Only when replies are included.

## `proxyMode` (type: `string`):

auto: direct first, Apify Residential proxy only if TikTok blocks. never: direct only. always: Residential from the start.

## Actor input object example

```json
{
  "videos": [
    "https://www.tiktok.com/@nasa/video/7665075736742530317"
  ],
  "maxComments": 100,
  "includeReplies": false,
  "maxRepliesPerComment": 10,
  "proxyMode": "auto"
}
```

# Actor output Schema

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

All comments from this run.

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

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

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

```

## MCP server setup

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