# Tiktok Comments Scraper (`scrapesmith/tiktok-comments-scraper`) Actor

⚡$0.20  Fast Tiktok Comments Scraper – Extract all comments from any video with text, likes, comments, publish dates, thumbnails. No proxies needed. Get thousands of profiles videos in minutes, 100% free.

- **URL**: https://apify.com/scrapesmith/tiktok-comments-scraper.md
- **Developed by:** [Scrape Smith](https://apify.com/scrapesmith) (community)
- **Categories:** Videos, Social media, Automation
- **Stats:** 35 total users, 2 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: 4.10 out of 5 stars

## Pricing

from $0.20 / 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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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

Extract thousands of TikTok comments quickly and efficiently from videos or profiles. This free actor lets you collect detailed comment data, including usernames, text, likes, timestamps, and replies — all in structured format for analysis or research.

### 🚀 Features

- **Multi-Video Support**: Scrape comments from multiple TikTok videos in one run  
- **Full Comment Data**: Extract usernames, comment text, likes, timestamps, and replies  
- **Flexible Input**: Accepts video URLs or profile URLs to automatically fetch all comments  
- **Fast Performance**: Around **1,000 comments in ~75 seconds**  
- **Free to Use**: No hidden fees — only standard Apify compute costs  

### 💰 Cost

- **Actor Price**: FREE  
- **Compute Cost**: ~$0.02 per 1,000 comments scraped  
- **Performance**: ~75 seconds per 1,000 comments  

*Note: Actual compute cost may vary based on run size.*

### 📊 Data Extracted

#### Comment Information
- Comment text  
- Comment ID  
- Username and profile link  
- User avatar URL  
- Like count  
- Reply count  
- Timestamp (ISO and Unix formats)  
- Parent comment ID (for replies)  
- Video ID and URL  

#### Video Metadata (Optional)
- Video description  
- Video author username and nickname  
- Like, share, comment, and bookmark counts  
- Video URL and cover image  

### 🎯 Use Cases

- **Sentiment Analysis**: Understand audience reactions to TikTok videos  
- **Brand Monitoring**: Track what users say about products or creators  
- **Influencer Research**: Analyze engagement and audience tone  
- **Trend Discovery**: Detect viral themes from comment sentiment  
- **Data Mining**: Collect large comment datasets for NLP or AI training  

### 🔧 Input Parameters

#### Video or Profile URLs (Required)
Enter one or more TikTok links to scrape comments from. Accepts:
- Full video URLs: `https://www.tiktok.com/@username/video/1234567890`  
- Profile URLs (to scrape comments from all recent videos)  
- Multiple links supported, one per line  

**Example:**
https://www.tiktok.com/@charlidamelio/video/1234567890


#### Maximum Comments Per Video
Set how many comments to scrape from each video.  
- **Default**: 500  
- **Range**: 1 - 10,000  

### 📤 Output Format

Results are exported in a structured dataset with organized columns:
- Comment ID, text, likes, replies, timestamp  
- Username and profile details  
- Video and parent comment reference  
- Easy-to-analyze structured JSON or CSV  

Available download formats: **JSON, CSV, Excel, HTML, or XML**

### ⚡ Quick Start

1. **Add video or profile URLs**: One per line  
2. **Set comment limit**: Choose number of comments per video  
3. **Run the actor** and wait for completion  
4. **Export** your results in your preferred format  

### 📋 Output Example

Each comment entry includes:
- User metadata (username, avatar, profile link)  
- Comment text, like count, and timestamp  
- Parent comment (if reply)  
- Associated video info for context  

Clean, structured format ready for analysis or visualization.

### ⚠️ Fair Use

This actor is intended for:
- ✅ Public data research and sentiment analysis  
- ✅ Market and brand monitoring  
- ✅ Academic and social media research  
- ✅ Personal data exploration  

Please use responsibly and follow TikTok’s terms of service.

### 🔄 Updates & Support

This actor is actively maintained and optimized for speed and accuracy.  
For issues or suggestions, report them via the Apify platform.

### 📞 Need Help?

- Review input schema for correct URL formats  
- Run small tests to verify outputs  
- Monitor progress in the Apify console  

---

**Made with ❤️ by ScrapeSmith for the Apify community**

*Free actor • Fast performance • Rich comment data*

# Actor input Schema

## `videoUrls` (type: `array`):

List of TikTok video URLs to scrape comments from
## `maxComments` (type: `integer`):

Maximum number of comments to collect per video (0 = all)
## `includeReplies` (type: `boolean`):

Fetch reply threads for each comment
## `maxRepliesPerComment` (type: `integer`):

Maximum replies to fetch per comment (0 = all)

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.tiktok.com/@mrbeast/video/7505849400019717406"
  ],
  "maxComments": 10,
  "includeReplies": false,
  "maxRepliesPerComment": 10
}
````

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

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

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Tiktok Comments Scraper",
        "description": "⚡$0.20  Fast Tiktok Comments Scraper – Extract all comments from any video with text, likes, comments, publish dates, thumbnails. No proxies needed. Get thousands of profiles videos in minutes, 100% free.",
        "version": "0.0",
        "x-build-id": "h1olQXcd1EExmGCo6"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapesmith~tiktok-comments-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapesmith-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/scrapesmith~tiktok-comments-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scrapesmith-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/scrapesmith~tiktok-comments-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scrapesmith-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": [
                    "videoUrls"
                ],
                "properties": {
                    "videoUrls": {
                        "title": "Video URLs",
                        "type": "array",
                        "description": "List of TikTok video URLs to scrape comments from",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxComments": {
                        "title": "Max Comments Per Video",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum number of comments to collect per video (0 = all)",
                        "default": 10
                    },
                    "includeReplies": {
                        "title": "Include Replies",
                        "type": "boolean",
                        "description": "Fetch reply threads for each comment",
                        "default": false
                    },
                    "maxRepliesPerComment": {
                        "title": "Max Replies Per Comment",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum replies to fetch per comment (0 = all)",
                        "default": 10
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
