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

Scrape TikTok comments from any video URL with advanced features like stealth browsing, rate limiting, and complete comment data including user info, timestamps, and engagement metrics.

- **URL**: https://apify.com/easyapi/tiktok-comments-scraper.md
- **Developed by:** [EasyApi](https://apify.com/easyapi) (community)
- **Categories:** Social media
- **Security:** Limited permissions
- **Stats:** 95 total users, 0 monthly users, 0.0% runs succeeded, 2 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 🤖

Powerful and reliable scraper for extracting comments from TikTok videos. Get detailed comment data including user information, timestamps, engagement metrics and more.

### Features ✨

- Extract comments from any public TikTok video URL
- Get comprehensive comment data including:
  - Comment text and creation time
  - Author details (username, nickname, avatar)
  - Engagement metrics (likes, replies)
  - Comment language and translation status
  - Reply chains and nested comments
- Configurable maximum items limit
- Clean structured JSON output

### Input Parameters 📝

The actor accepts the following input parameters:

| Field | Type | Description |
|-------|------|-------------|
| `postUrls` | Array | List of TikTok video URLs to scrape comments from |
| `maxItems` | Integer | Maximum number of comments to collect per video |

### Output Format 📊

The actor outputs comments in JSON format with detailed fields including:

- `cid`: Unique comment ID
- `text`: Comment content
- `create_time`: Timestamp of when comment was posted
- `digg_count`: Number of likes
- `reply_comment_total`: Number of replies
- `user`: Detailed information about comment author
- `comment_language`: Language of the comment
- And many more fields...

### Usage Tips 💡

1. Use specific video URLs from TikTok (format: `https://www.tiktok.com/@username/video/videoId`)
2. Adjust `maxItems` based on your needs - higher numbers will take longer to scrape
3. Results are saved to the default dataset in your Apify storage

### Use Cases 🎯

- Social media monitoring and analysis
- User engagement research
- Content moderation
- Sentiment analysis
- Market research and trend analysis

#### Input Example

A full explanation of an input example in JSON.

```
{
    "postUrls": [
        "https://www.tiktok.com/@espnfc/video/7218224837217635626"
	],
    "maxItems": 20
}
```

#### Output sample

The results will be wrapped into a dataset which you can always find in the **Storage** tab. Here's an excerpt from the data you'd get if you apply the input parameters above:

And here is the same data but in JSON. You can choose in which format to download your data: JSON, JSONL, Excel spreadsheet, HTML table, CSV, or XML.

```
[
	{
		"author_pin": false,
		"aweme_id": "7218224837217635626",
		"cid": "7219147054538113834",
		"collect_stat": 0,
		"comment_language": "en",
		"comment_post_item_ids": null,
		"create_time": 1680838674,
		"digg_count": 78,
		"forbid_reply_with_video": true,
		"image_list": null,
		"is_author_digged": false,
		"is_comment_translatable": true,
		"label_list": null,
		"no_show": false,
		"reply_comment": null,
		"reply_comment_total": 0,
		"reply_id": "0",
		"reply_to_reply_id": "0",
		"share_info": {
			"acl": {
				"code": 0,
				"extra": "{}"
			},
			"desc": "malteese211’s comment: He’s never used a hammer",
			"title": "When Kingsley Coman tried a Bavarian tradition 😂 #bundesliga #fcbayern #bayernmunich #bavaria  (via @fcbayern)",
			"url": "https://m.tiktok.com/v/7218224837217635626.html?_d=eh17dkjcbi42af&comment_author_id=7020982602435167238&preview_pb=0&share_comment_id=7219147054538113834&share_item_id=7218224837217635626&sharer_language=en&source=h5_m&u_code=ecc7g0jj45gmlj"
		},
		"sort_extra_score": {
			"reply_score": 0.000137,
			"show_more_score": 0.000365
		},
		"sort_tags": "{\"top_list\":1}",
		"status": 1,
		"stick_position": 0,
		"text": "He’s never used a hammer",
		"text_extra": [],
		"trans_btn_style": 0,
		"user": {
			"account_labels": null,
			"ad_cover_url": null,
			"advance_feature_item_order": null,
			"advanced_feature_info": null,
			"avatar_thumb": {
				"uri": "tos-useast8-avt-0068-tx2/aef91be8c6445eb4a5c853299eafbaed",
				"url_list": [
					"https://p16-pu-sign-useast8.tiktokcdn-us.com/tos-useast8-avt-0068-tx2/aef91be8c6445eb4a5c853299eafbaed~c5_100x100.jpg?lk3s=30310797&nonce=12843&refresh_token=805970aacd2ba7ca75da6580e17d3762&x-expires=1730296800&x-signature=c%2B40k3Dw7N2EaC0m%2F7DgBYiL7V4%3D&shp=30310797&shcp=-",
					"https://p19-pu-sign-useast8.tiktokcdn-us.com/tos-useast8-avt-0068-tx2/aef91be8c6445eb4a5c853299eafbaed~c5_100x100.jpg?lk3s=30310797&nonce=87213&refresh_token=99788ffabae2d16afb5ce8a301d16fed&x-expires=1730296800&x-signature=5NZGvdPO550AcvgdLKfXmTtqosw%3D&shp=30310797&shcp=-",
					"https://p16-pu-sign-useast8.tiktokcdn-us.com/tos-useast8-avt-0068-tx2/aef91be8c6445eb4a5c853299eafbaed~c5_100x100.jpeg?lk3s=30310797&nonce=94382&refresh_token=171404aae96da323915291f062f87f31&x-expires=1730296800&x-signature=bq8on0C3yMh%2BsRSQ5APzSRAsY4s%3D&shp=30310797&shcp=-"
				],
				"url_prefix": null
			},
			"bold_fields": null,
			"can_message_follow_status_list": null,
			"can_set_geofencing": null,
			"cha_list": null,
			"cover_url": null,
			"custom_verify": "",
			"enterprise_verify_reason": "",
			"events": null,
			"followers_detail": null,
			"geofencing": null,
			"homepage_bottom_toast": null,
			"item_list": null,
			"mutual_relation_avatars": null,
			"need_points": null,
			"nickname": "malteese211",
			"platform_sync_info": null,
			"relative_users": null,
			"search_highlight": null,
			"sec_uid": "MS4wLjABAAAA-2Zn5X6TMwBOThdiyuECyKM4w1laLK58NMkIkwqlDWCFXiVFQnJsqKIkN6DEFWvC",
			"shield_edit_field_info": null,
			"type_label": null,
			"uid": "7020982602435167238",
			"unique_id": "y_dillon_ft_bronx",
			"user_profile_guide": null,
			"user_tags": null,
			"white_cover_url": null
		},
		"user_buried": false,
		"user_digged": 0
	},
	{
		"author_pin": false,
		"aweme_id": "7218224837217635626",
		"cid": "7220159466032366378",
		"collect_stat": 0,
		"comment_language": "en",
		"comment_post_item_ids": null,
		"create_time": 1681074394,
		"digg_count": 40,
		"forbid_reply_with_video": true,
		"image_list": null,
		"is_author_digged": false,
		"is_comment_translatable": true,
		"label_list": null,
		"no_show": false,
		"reply_comment": null,
		"reply_comment_total": 0,
		"reply_id": "0",
		"reply_to_reply_id": "0",
		"share_info": {
			"acl": {
				"code": 0,
				"extra": "{}"
			},
			"desc": "Jh’s comment: Who?",
			"title": "When Kingsley Coman tried a Bavarian tradition 😂 #bundesliga #fcbayern #bayernmunich #bavaria  (via @fcbayern)",
			"url": "https://m.tiktok.com/v/7218224837217635626.html?_d=eh17dkjcbi42af&comment_author_id=7178077957648237614&preview_pb=0&share_comment_id=7220159466032366378&share_item_id=7218224837217635626&sharer_language=en&source=h5_m&u_code=ecc7g0jj45gmlj"
		},
		"sort_extra_score": {
			"reply_score": 0.000126,
			"show_more_score": 0.000071
		},
		"sort_tags": "{\"top_list\":1}",
		"status": 1,
		"stick_position": 0,
		"text": "Who?",
		"text_extra": [],
		"trans_btn_style": 0,
		"user": {
			"account_labels": null,
			"ad_cover_url": null,
			"advance_feature_item_order": null,
			"advanced_feature_info": null,
			"avatar_thumb": {
				"uri": "tos-useast5-avt-0068-tx/7346383898743406638",
				"url_list": [
					"https://p16-pu-sign-useast8.tiktokcdn-us.com/tos-useast5-avt-0068-tx/7346383898743406638~c5_100x100.jpg?lk3s=30310797&nonce=24860&refresh_token=dd09b3ef01b971a8c2077ee7c92152d6&x-expires=1730296800&x-signature=CtALKbX6Xf3HEbXp4w3nLUaQInM%3D&shp=30310797&shcp=-",
					"https://p19-pu-sign-useast8.tiktokcdn-us.com/tos-useast5-avt-0068-tx/7346383898743406638~c5_100x100.jpg?lk3s=30310797&nonce=28578&refresh_token=3a3e53caae029b471158c67b7240cf67&x-expires=1730296800&x-signature=mweSyYdRpwIbsxpxzYIYDsw%2F2w8%3D&shp=30310797&shcp=-",
					"https://p16-pu-sign-useast8.tiktokcdn-us.com/tos-useast5-avt-0068-tx/7346383898743406638~c5_100x100.jpeg?lk3s=30310797&nonce=81345&refresh_token=0bcf5c2699d0d35aa49e17587b587799&x-expires=1730296800&x-signature=NPXQuK4ZvKXgrJBNwoqYJmkTAXA%3D&shp=30310797&shcp=-"
				],
				"url_prefix": null
			},
			"bold_fields": null,
			"can_message_follow_status_list": null,
			"can_set_geofencing": null,
			"cha_list": null,
			"cover_url": null,
			"custom_verify": "",
			"enterprise_verify_reason": "",
			"events": null,
			"followers_detail": null,
			"geofencing": null,
			"homepage_bottom_toast": null,
			"item_list": null,
			"mutual_relation_avatars": null,
			"need_points": null,
			"nickname": "Jh",
			"platform_sync_info": null,
			"relative_users": null,
			"search_highlight": null,
			"sec_uid": "MS4wLjABAAAA0xqGlm85W3tuLuh8zpSL1UarNIsszcapFqOQoWvl6LeBrMzZUMfl8eXsfhMPFUS5",
			"shield_edit_field_info": null,
			"type_label": null,
			"uid": "7178077957648237614",
			"unique_id": "jsh18739",
			"user_profile_guide": null,
			"user_tags": null,
			"white_cover_url": null
		},
		"user_buried": false,
		"user_digged": 0
	},
    ...
]
```

### Related Actors

- 🎥 [TikTok Profile Posts Scraper](https://apify.com/easyapi/tiktok-profile-posts-scraper) - Extract comprehensive post data from TikTok user profiles with rich metadata and engagement metrics
- 📱 [TikTok Videos Scraper](https://apify.com/easyapi/tiktok-videos-scraper) - Scrape TikTok video search results with advanced filtering capabilities
- 🎵 [TikTok Following Scraper](https://apify.com/easyapi/tiktok-following-scraper) - Extract detailed user information from TikTok following lists
- 👥 [TikTok Followers Scraper](https://apify.com/easyapi/tiktok-followers-scraper) - Extract detailed follower information from TikTok accounts
- 🔍 [TikTok Users Scraper](https://apify.com/easyapi/tiktok-users-scraper) - Scrape TikTok user profiles from search results
- 🎥 [TikTok LIVE Scraper](https://apify.com/easyapi/tiktok-live-scraper) - Extract real-time data from TikTok live streams
- 📥 [TikTok Video Downloader](https://apify.com/easyapi/tiktok-video-downloader) - Download TikTok videos without watermarks in original quality
- 📧 [TikTok Email Scraper](https://apify.com/easyapi/tiktok-email-scraper) - Find TikTok creators matching your keywords and specific email domains
- 💬 [Instagram Comments Scraper](https://apify.com/easyapi/instagram-comments-scraper) - Extract comments from Instagram posts with user details and engagement metrics
- 💭 [Facebook Post Comments Scraper](https://apify.com/easyapi/facebook-post-comments-scraper) - Extract comments from public Facebook posts with detailed information
- 🗨️ [Reddit Comments Scraper](https://apify.com/easyapi/reddit-comments-scraper) - Extract Reddit comments with complete thread structure and engagement metrics
- 📝 [YouTube Comments Scraper](https://apify.com/easyapi/youtube-comments-scraper) - Scrape YouTube video comments with pagination support
- 💬 [Pinterest Comments Scraper](https://apify.com/easyapi/pinterest-comments-scraper) - Extract user feedback from Pinterest pins with detailed information
- 📊 [Text Sentiment Analysis](https://apify.com/easyapi/text-sentiment-analysis) - Analyze the sentiment of text content with detailed sentiment breakdown
- 🔄 [All-in-One Social Media Email Scraper](https://apify.com/easyapi/all-in-one-social-media-email-scraper) - Discover emails across 30+ social platforms for lead generation and outreach

# Actor input Schema

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

TikTok video URL to scrape comments from

## `maxItems` (type: `integer`):

Maximum number of comments to collect per video

## Actor input object example

```json
{
  "postUrls": [
    "https://www.tiktok.com/@espnfc/video/7218224837217635626"
  ],
  "maxItems": 20
}
```

# Actor output Schema

## `files` (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/@espnfc/video/7218224837217635626"
    ],
    "maxItems": 20
};

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

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

```

## MCP server setup

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