# TikTok Comments Scraper - Comments, Authors & Engagement (`webdata_labs/tiktok-comments-scraper`) Actor

\[💵 $1.00 / 1K] Scrape public TikTok video comments with author profiles, likes, replies, dates, video IDs, and transparent partial-result summaries.

- **URL**: https://apify.com/webdata\_labs/tiktok-comments-scraper.md
- **Developed by:** [WebData Labs](https://apify.com/webdata_labs) (community)
- **Categories:** Social media, Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use 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 - Comments, Authors & Engagement

### ✅ What does TikTok Comments Scraper do?

TikTok Comments Scraper extracts public top-level comments directly from TikTok video pages. It returns comment text, public author profile, likes, reply counts, timestamps, video IDs, source URLs, and a per-video completeness summary.

Run it manually, through the Apify API, on a schedule, or from integrations such as Make and Zapier.

### 🔎 Why use TikTok Comments Scraper?

- Export comments for audience and customer research.
- Find questions, complaints, product feedback, and campaign reactions.
- Preserve the source video and public author profile for every row.
- Detect partial runs instead of silently treating a small result as complete.
- Feed the dataset into enrichment Actors such as TikTok Comment Intent Leads.

### ⚙️ How to scrape TikTok comments

1. Open the Input tab.
2. Paste one or more public TikTok video URLs.
3. Choose the maximum comments per video.
4. Click **Save & Start**.
5. Export the dataset as JSON, CSV, Excel, XML, or HTML.

### 📥 Input

```json
{
    "postUrls": ["https://www.tiktok.com/@creator/video/1234567890123456789"],
    "commentsPerPost": 100,
    "maxScrolls": 30
}
````

`commentsPerPost` controls the maximum output for each video. `maxScrolls` is a safety limit that prevents long or stalled browser runs.

### 📤 Output

```json
{
    "recordType": "comment",
    "text": "Where can I buy this?",
    "authorName": "Sample User",
    "authorUsername": "sample_user",
    "authorProfileUrl": "https://www.tiktok.com/@sample_user",
    "likes": 12,
    "replyCount": 2,
    "postedAt": "2025-05-14T20:31:05+00:00",
    "videoUrl": "https://www.tiktok.com/@creator/video/1234567890123456789",
    "videoId": "1234567890123456789"
}
```

Each video also produces a `video_summary` object in the run's `OUTPUT` record with the visible TikTok comment count, extracted count, duration, status, and `isPartial` flag. Only comment rows are written to the default dataset and billed as results; summaries and errors are not charged.

### 📊 TikTok comment fields

| Field                 | Description                                                |
| --------------------- | ---------------------------------------------------------- |
| `text`                | Public comment text                                        |
| `authorUsername`      | Public TikTok handle                                       |
| `authorProfileUrl`    | Public author profile URL                                  |
| `likes`               | Visible comment likes                                      |
| `replyCount`          | Visible reply count                                        |
| `postedAt`            | UTC timestamp when TikTok supplies it                      |
| `videoUrl`, `videoId` | Source provenance                                          |
| `isPartial`           | Whether TikTok displayed more comments than were extracted |

### 💵 How much does it cost to scrape TikTok comments?

The price starts at $1 per 1,000 delivered comment records, with platform usage included. Browser execution makes very small runs less efficient, so group several video URLs into one run when practical. Summary and error records are not charged. Confirm the current price on the Pricing tab before a large extraction.

### 🔁 Tips and advanced options

- Start with 20-100 comments while validating a new workflow.
- Increase `maxScrolls` only when a video has many comments and TikTok is loading additional rows.
- Use the summary row to reject empty or unexpectedly partial results automatically.
- Schedule public videos only while they remain available; deleted, private, age-restricted, or region-restricted pages cannot be scraped.

### ⚠️ Limits, legality, and support

TikTok changes its website and may limit visible comments for logged-out users, regions, or datacenter IPs. The Actor returns top-level comments and a reply count; it does not currently emit each reply as a separate row. TikTok's visible count can include replies, so it may exceed the available top-level rows. The Actor reports partial and error states rather than claiming full coverage. It does not access private profiles, private comments, emails, or hidden demographic data.

Only collect public data for a legitimate purpose. Follow TikTok's terms and privacy, research, and direct-marketing laws applicable to you. For extraction bugs, open an issue with a public example URL and the run ID.

### ❓ FAQ

#### Does it return replies as separate rows?

No. It returns public top-level comments and the visible reply count for each comment.

#### Why can the extracted count be lower than TikTok's displayed count?

TikTok's count can include replies or comments that are unavailable to the current region or logged-out session. Check the per-video summary and `isPartial` status.

# Actor input Schema

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

One or more public TikTok video URLs.

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

Maximum comments returned for each video.

## `maxScrolls` (type: `integer`):

Safety limit for comment-panel scrolling per video.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.tiktok.com/@vida.luz70/video/7504077256151600414"
  ],
  "commentsPerPost": 100,
  "maxScrolls": 30
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `summary` (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 = {
    "postUrls": [
        "https://www.tiktok.com/@vida.luz70/video/7504077256151600414"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("webdata_labs/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/@vida.luz70/video/7504077256151600414"] }

# Run the Actor and wait for it to finish
run = client.actor("webdata_labs/tiktok-comments-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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/@vida.luz70/video/7504077256151600414"
  ]
}' |
apify call webdata_labs/tiktok-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=webdata_labs/tiktok-comments-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TikTok Comments Scraper - Comments, Authors & Engagement",
        "description": "[💵 $1.00 / 1K] Scrape public TikTok video comments with author profiles, likes, replies, dates, video IDs, and transparent partial-result summaries.",
        "version": "0.1",
        "x-build-id": "HkxpFC8UOdUv9Z1rI"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/webdata_labs~tiktok-comments-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-webdata_labs-tiktok-comments-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/webdata_labs~tiktok-comments-scraper/runs": {
            "post": {
                "operationId": "runs-sync-webdata_labs-tiktok-comments-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/webdata_labs~tiktok-comments-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-webdata_labs-tiktok-comments-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "postUrls"
                ],
                "properties": {
                    "postUrls": {
                        "title": "TikTok video URLs",
                        "type": "array",
                        "description": "One or more public TikTok video URLs.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "commentsPerPost": {
                        "title": "Comments per post",
                        "minimum": 1,
                        "maximum": 2000,
                        "type": "integer",
                        "description": "Maximum comments returned for each video.",
                        "default": 100
                    },
                    "maxScrolls": {
                        "title": "Maximum loading scrolls",
                        "minimum": 1,
                        "maximum": 300,
                        "type": "integer",
                        "description": "Safety limit for comment-panel scrolling per video.",
                        "default": 30
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
