# TikTok Comments Extractor (`scrapeforge/tiktok-comments-extractor`) Actor

Extract comments, replies, and user data from any TikTok video or profile. Fast, reliable, and low-bandwidth — scrapes ~400 comments in under 40 seconds. Export to JSON, CSV, or Excel.

- **URL**: https://apify.com/scrapeforge/tiktok-comments-extractor.md
- **Developed by:** [ScrapeForge](https://apify.com/scrapeforge) (community)
- **Categories:** Social media, Videos, Automation
- **Stats:** 314 total users, 40 monthly users, 100.0% runs succeeded, 4 bookmarks
- **User rating**: 4.70 out of 5 stars

## Pricing

from $0.50 / 1,000 results

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?

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 Extractor — Fast & Reliable

Extract comments from any TikTok video **5-6x faster** than traditional scrapers. No scrolling, no waiting — fast and reliable comment extraction at scale.

### Why this scraper?

Most TikTok comment scrapers rely on slow browser scrolling to load comments page by page. **This scraper is different:**

- **Blazing fast** — ~400 comments in 37 seconds, compared to 3-5 minutes with traditional scrapers
- **Low proxy bandwidth** — optimized to minimize data transfer costs
- **Reliable pagination** — no missed comments, no stalled scrolling
- **Anti-bot resistant** — handles TikTok's signature verification automatically

### What data do you get?

Each comment includes:

| Field | Description |
|-------|-------------|
| `text` | Full comment text |
| `commentLanguage` | Detected language (en, es, pt, etc.) |
| `diggCount` | Number of likes on the comment |
| `replyCount` | Number of replies |
| `isPinned` | Whether the comment is pinned by the creator |
| `createTime` | Unix timestamp |
| `createTimeISO` | Human-readable ISO 8601 date |
| `videoId` | Source video ID |
| `videoUrl` | Source video URL |
| `user.nickname` | Commenter's display name |
| `user.uniqueId` | Commenter's @username |
| `user.uid` | Commenter's unique user ID |
| `user.avatarThumb` | Commenter's profile picture URL |
| `replies` | Array of reply comments (when enabled) |

#### Sample output

```json
{
    "commentId": "7612627934659183381",
    "text": "This is amazing! 🔥",
    "commentLanguage": "en",
    "diggCount": 742,
    "replyCount": 17,
    "isPinned": false,
    "createTime": 1772453079,
    "createTimeISO": "2026-03-02T12:04:39.000Z",
    "videoId": "7612442632152681758",
    "videoUrl": "https://www.tiktok.com/@user/video/7612442632152681758",
    "user": {
        "nickname": "John Doe",
        "uniqueId": "johndoe",
        "uid": "7327658799938290694",
        "avatarThumb": "https://p16-sign-va.tiktokcdn.com/..."
    },
    "replies": []
}
```

### How to use it

#### Input

| Field | Description | Default |
|-------|-------------|---------|
| `postURLs` | List of TikTok video URLs | `[]` |
| `profileURLs` | List of TikTok profile URLs or @usernames — scrapes all their videos | `[]` |
| `commentsPerPost` | Max comments per video. Set to `0` for all comments | `0` |
| `maxRepliesPerComment` | Max replies to fetch per comment. Set to `0` to skip | `0` |
| `excludePinnedPosts` | Exclude pinned posts when scraping profiles | `false` |
| `proxy` | Proxy configuration (Apify Proxy recommended) | Apify Proxy |

#### Example input

```json
{
    "postURLs": [
        "https://www.tiktok.com/@username/video/1234567890"
    ],
    "commentsPerPost": 500,
    "maxRepliesPerComment": 5
}
```

#### Scraping comments from a profile

You can also pass TikTok profile URLs or usernames. The scraper will automatically discover all videos from those profiles and extract comments from each one:

```json
{
    "profileURLs": [
        "https://www.tiktok.com/@username",
        "@another_user"
    ],
    "commentsPerPost": 100
}
```

### Use cases

- **Sentiment analysis** — Analyze audience reactions to products, campaigns, or creators
- **Brand monitoring** — Track what people say about your brand across TikTok videos
- **Competitor research** — Study engagement patterns on competitor content
- **Influencer vetting** — Evaluate comment quality and authenticity before partnerships
- **Trend detection** — Spot emerging topics and opinions in comment sections
- **Academic research** — Collect data for social media studies and NLP projects
- **Content strategy** — Understand what resonates with audiences by analyzing top comments

### How it works

This scraper uses a proprietary approach that bypasses the slow scroll-based method used by most TikTok scrapers. Instead of loading comments page by page in a browser, it communicates directly with TikTok's internal API to fetch comments in bulk.

The result: **no scroll delays, no overlay dismissals, no stalled pagination**. Just fast, reliable data extraction.

### Export formats

Export your data in JSON, CSV, Excel, XML, or HTML. Integrate via the Apify API, webhooks, or connect directly to Google Sheets, Slack, Zapier, Make, and more.

### Performance

| Metric | This scraper | Scroll-based scrapers |
|--------|-------------|----------------------|
| 100 comments | ~12 seconds | ~60-90 seconds |
| 400 comments | ~37 seconds | ~3-5 minutes |
| 1000 comments | ~90 seconds | ~10-15 minutes |
| Proxy bandwidth | Very low (JSON only) | High (full page loads) |

### Ethical scraping

This scraper only extracts **publicly available** data. It does not:

- Access private accounts or DMs
- Extract email addresses, phone numbers, or locations
- Bypass login requirements
- Store or share any personal credentials

### Pricing

Pay only for what you use — **$0.50 per 1,000 comments** extracted. No monthly fees, no minimums.

### FAQ

**Can it scrape all comments from a video?**
Yes. Set `commentsPerPost` to `0` and it will paginate through all available comments.

**Does it support short TikTok URLs?**
Yes. URLs like `vm.tiktok.com/xxx` and `tiktok.com/t/xxx` are automatically resolved.

**Can I scrape multiple videos at once?**
Yes. Pass multiple URLs in `postURLs` or use `profileURLs` to scrape all videos from a profile.

**What about replies to comments?**
Set `maxRepliesPerComment` to the number of replies you want per comment. Replies include the same fields as regular comments.

**Does it work without proxy?**
It can, but TikTok may block requests from datacenter IPs. We strongly recommend using Apify Proxy for reliable results.

**How often does TikTok change their API?**
TikTok updates their anti-bot measures regularly. Our approach is designed to be resilient to these changes and is actively maintained.

# Actor input Schema

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

List of TikTok video URLs to scrape comments from (e.g., https://www.tiktok.com/@user/video/1234567890)

## `profileURLs` (type: `array`):

List of TikTok profile URLs or usernames. All videos from these profiles will have their comments scraped.

## `commentsPerPost` (type: `integer`):

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

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

Maximum number of replies to fetch per comment. Set to 0 to skip replies.

## `excludePinnedPosts` (type: `boolean`):

If true, pinned posts from profile scraping will be excluded.

## `proxy` (type: `object`):

Proxy settings for the scraper. In harvest mode (default) TikTok's organic responses work reliably from Apify's automatic datacenter proxy, which is far cheaper. Only select RESIDENTIAL if you disable harvest mode (legacy signed-request method needs it) or hit blocks.

## `harvestMode` (type: `boolean`):

Collect comments from TikTok's organic responses via scrolling (reliable, low bandwidth). Disable to use the legacy signed-request method.

## Actor input object example

```json
{
  "postURLs": [],
  "profileURLs": [],
  "commentsPerPost": 0,
  "maxRepliesPerComment": 0,
  "excludePinnedPosts": false,
  "proxy": {
    "useApifyProxy": true
  },
  "harvestMode": true
}
```

# Actor output Schema

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

Dataset containing all extracted comments with user data, timestamps, and replies

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapeforge/tiktok-comments-extractor").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("scrapeforge/tiktok-comments-extractor").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 '{}' |
apify call scrapeforge/tiktok-comments-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapeforge/tiktok-comments-extractor"
        }
    }
}

```

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/Btqk3GeGeTJMlMz0R/builds/ybnVTeehHeO9aafhD/openapi.json
