# TikTok Comments Scraper - $0.25 / 1000 Comments (`scrapeunblocker/tiktok-comments-scraper`) Actor

Scrape the comments of any TikTok video or photo post as clean JSON: comment text, likes, reply count, language, date, author (username, nickname, avatar, profile link), creator and liked-by-creator flags, plus the replies TikTok preloads. No login or cookies. $0.25 per 1000 comments.

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

## Pricing

from $0.25 / 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.

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 Comments Scraper

Scrape the **comments of any public TikTok video or photo post** as clean, structured JSON - the comment text, **likes**, **reply count**, language, date (ISO and Unix timestamp), the **author** (username, nickname, user id, avatar, profile link), whether the **creator wrote or liked** the comment, and the **replies TikTok preloads** under it. Paste post links, bare ids or vm.tiktok.com short links. No TikTok account, login, cookies or proxies to set up.

### Features

- **Any public post** - video or photo post, by full link, id or short link.
- **Up to 500 comments per post**, in the order TikTok shows them, numbered by `position`.
- **Engagement per comment** - likes and reply count, so the most discussed comments are easy to find.
- **Author details** - username, nickname, user id, secUid, avatar and profile link.
- **Creator signals** - `isCreator` (the post's author commented) and `likedByCreator` (the author liked it).
- **Preloaded replies** - the replies TikTok loads with the comment, nested in `replies` (optional, never billed extra).
- **Post totals** - every item carries the post's `postTotalComments`.
- **Deduplicated input** - the same post given as a link and as an id is read and billed once.

### Use cases

- **Audience research** - read what viewers ask, praise and complain about under a creator's or competitor's videos.
- **Sentiment and brand monitoring** - feed comments into sentiment or topic analysis on a schedule.
- **Influencer vetting** - check comment quality and real engagement before a collaboration.
- **Campaign reporting** - collect the comments under sponsored posts for a client report.
- **Lead and community discovery** - find active commenters around a topic.

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `postUrls` | array | example NASA post | TikTok post links, ids or short links. |
| `maxCommentsPerPost` | integer | `50` | Top-level comments per post (1-500). |
| `includeReplies` | boolean | `true` | Keep the replies TikTok preloads under each comment. |
| `proxy_country` | string | empty | Exit-IP country (ISO-2), only for region-restricted posts. |
| `concurrency` | integer | `2` | Posts read at the same time (1-3). |

#### Example input

```json
{
  "postUrls": [
    "https://www.tiktok.com/@nasa/video/7665075736742530317",
    "7665075736742530317"
  ],
  "maxCommentsPerPost": 200
}
```

### Output

One dataset item per top-level comment (author names shortened here):

```json
{
  "id": "7670116182175171360",
  "text": "Nasa is this Real that earth will lose gravity for 7 seconds or this is fake?",
  "createdAt": "2026-08-04T10:08:24+00:00",
  "createdTimestamp": 1785838104,
  "likes": 8,
  "replyCount": 9,
  "language": "en",
  "author": {
    "username": "user_a",
    "nickname": "User A",
    "userId": "7406804621522551841",
    "secUid": "MS4wLjABAAAA...",
    "avatar": "https://p16-common-sign.tiktokcdn-us.com/...",
    "profileUrl": "https://www.tiktok.com/@user_a"
  },
  "isCreator": false,
  "likedByCreator": false,
  "replyToCommentId": null,
  "replies": [
    {
      "id": "7670326798128218888",
      "text": "its a false rumor its physically impossible",
      "createdAt": "2026-08-04T23:45:51+00:00",
      "likes": 17,
      "language": "en",
      "author": {"username": "user_b", "nickname": "User B", "profileUrl": "https://www.tiktok.com/@user_b"},
      "isCreator": false,
      "likedByCreator": false,
      "replyToCommentId": "7670116182175171360"
    }
  ],
  "position": 29,
  "postId": "7665075736742530317",
  "postUrl": "https://www.tiktok.com/@nasa/video/7665075736742530317",
  "postTotalComments": 3143,
  "input": "https://www.tiktok.com/@nasa/video/7665075736742530317"
}
```

Posts that could not be read (deleted, private, comments turned off) go to the `ERRORS` record in the run's key-value store, with the reason. They are not billed.

### Pricing

**$0.25 per 1000 comments** (pay per result) - one dataset item is one top-level comment; preloaded replies ride along for free. Failed posts are free.

### Notes

- A post is read in a real browser session and its comment panel is scrolled, so a call takes about 10-40 seconds; 20 comments arrive per scroll.
- TikTok only preloads some replies. To get every reply of a busy thread, open the comment on TikTok.
- Powered by [ScrapeUnblocker](https://www.scrapeunblocker.com).

# Actor input Schema

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

TikTok video or photo post links (https://www.tiktok.com/@user/video/...), bare post ids or vm.tiktok.com short links. Each post returns its top-level comments in the order TikTok shows them.

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

How many top-level comments to collect from each post (1-500). TikTok loads about 20 per scroll, so large numbers take longer.

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

Keep the replies TikTok preloads under a comment in its 'replies' field. Replies are part of their comment's item and are not billed separately.

## `proxy_country` (type: `string`):

Exit-IP country (ISO-2, e.g. 'US'). Leave empty to let the scraper choose - comments are the same worldwide; set it only for region-restricted posts.

## `concurrency` (type: `integer`):

How many posts to read at the same time (1-3).

## Actor input object example

```json
{
  "postUrls": [
    "https://www.tiktok.com/@nasa/video/7665075736742530317"
  ],
  "maxCommentsPerPost": 50,
  "includeReplies": true,
  "proxy_country": "",
  "concurrency": 2
}
```

# Actor output Schema

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

One item per comment: text, likes, reply count, date, language and author

## `errors` (type: `string`):

Posts whose comments could not be read, with the reason (not billed)

# 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/@nasa/video/7665075736742530317"
    ]
};

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

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

```

## MCP server setup

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