# Tiktok Comments (Include Replies) Scraper (`xtracto/tiktok-comments-scraper`) Actor

Fetch TikTok comments include nested replies for sentiment analysis, research, and monitoring with parallel processing. No browser, no login, no proxy - just fast and efficient data extraction.

- **URL**: https://apify.com/xtracto/tiktok-comments-scraper.md
- **Developed by:** [Xtractoo](https://apify.com/xtracto) (community)
- **Categories:** Videos, Social media, Lead generation
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.00025 / result

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/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 & Replies Extractor

Extract all comments included nested replies from any TikTok video. Get comment text, author info, likes, reply counts, and timestamps. Supports **bulk extraction** with parallel reply fetching.

### ✨ Why Use This Actor?

- 🔥 **High throughput** - Extracts up to **~1000 comments/min** with built-in pagination
- 💬 **Nested replies** - Optionally fetch all replies nested under each comment
- ⚡ **Parallel processing** - Replies are fetched concurrently (5 workers) for speed
- 💰 **Cost efficient** - HTTP-only
- 🪶 **Lightweight** - No browser needed
- 🚫 **No proxy needed** – Works reliably without proxies → zero proxy cost
- ✅ **No login required** - Works without any TikTok account
- 🔗 **Flexible input** - Accepts video ID or full TikTok URL
- 🔄 **Built-in reliability** - Host rotation, UA rotation, automatic retries

### 🎯 Use Cases

- **Sentiment analysis** - Extract all comments to analyze audience sentiment toward a video
- **Community research** - Understand what topics and questions viewers are discussing
- **Brand monitoring** - Track what people say about your brand on TikTok
- **Competitor analysis** - See how audiences react to competitor content
- **Content strategy** - Discover what viewers want more of by reading their comments
- **NLP/AI training** - Collect comment datasets for natural language processing
- **Crisis detection** - Monitor comments for negative sentiment spikes

### 📥 Input

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `video_id` | string | Yes | - | TikTok video ID or full video URL |
| `max_results` | integer | No | 100 | Maximum number of comments. Set `0` for all. |
| `include_replies` | boolean | No | `true` | Fetch and nest replies under each comment |
| `max_replies_per_comment` | integer | No | 0 | Max replies per comment. Set `0` for all. |

#### Example input

```json
{
    "video_id": "7602547300065430804",
    "max_results": 100,
    "include_replies": true,
    "max_replies_per_comment": 10
}
````

You can also pass a full URL:

```json
{
    "video_id": "https://www.tiktok.com/@user/video/7602547300065430804"
}
```

### 📤 Output

Each item in the dataset is a **raw comment object** directly from TikTok's comment API. All original fields (`cid`, `text`, `create_time`, `digg_count`, `user`, etc.) are preserved exactly as returned by TikTok — no parsing or renaming.

The scraper adds two metadata fields:

| Field | Type | Description |
|-------|------|-------------|
| `_video_id` | string | The video ID the comment belongs to |
| `_replies` | array | Nested raw reply objects. **See note below.** |

This means you get the full, unmodified TikTok API response for each comment. Field names and structures may vary as TikTok updates their API.

#### ⚠️ Important: inconsistent fields and `_replies` behavior

TikTok's API omits fields entirely (rather than returning `null` or `[]`) when their value would be empty or default. This affects both TikTok's own fields and the scraper-added `_replies` field.

**`_replies` is absent** (not `null`, not `[]`) in two cases:

1. The comment has no replies (`reply_comment_total` is `0`)
2. `include_replies` was set to `false` in the input

Always use safe access when reading any field:

```python
## Python
replies = comment.get("_replies", [])
avatar = comment.get("user", {}).get("avatar_thumb", {}).get("url_list", [None])[0]
```

```javascript
// JavaScript
const replies = comment._replies ?? [];
const avatar = comment.user?.avatar_thumb?.url_list?.[0];
```

Similarly, fields like `image_list`, `label_list`, `reply_to_reply_id` (inside replies), and others may be absent or `null` on some comments but present on others. Check `reply_comment_total` to know in advance whether a comment has replies.

#### Example output

```json
{
    "cid": "7612308101140939541",
    "text": "mau keluar kn kartu juga tapi takut kartu Timezone pulak yg keluar 😭",
    "aweme_id": "7612255881434090772",
    "create_time": 1772378608,
    "digg_count": 55349,
    "status": 1,
    "user": {
      "uid": "7576590030333166612",
      "short_id": "0",
      "nickname": ".",
      "signature": "",
      "avatar_thumb": {
        "uri": "tos-alisg-avt-0068/b7c7ee71e68bb54abdbb61345aeda731",
        "url_list": [
          "https://p16-common-sign.tiktokcdn-us.com/tos-alisg-avt-0068/b7c7ee71e68bb54abdbb61345aeda731~tplv-tiktokx-cropcenter-q:100:100:q70.webp?dr=8835&idc=useast5&ps=87d6e48a&refresh_token=1e174475&s=COMMENT_LIST&sc=avatar&shcp=ff37627b&shp=30310797&t=223449c4&x-expires=1776016800&x-signature=FIHQ62hqVv8yJmfl09lRsmIZeL4%3D",
          "https://p19-common-sign.tiktokcdn-us.com/tos-alisg-avt-0068/b7c7ee71e68bb54abdbb61345aeda731~tplv-tiktokx-cropcenter-q:100:100:q70.webp?dr=8835&idc=useast5&ps=87d6e48a&refresh_token=8d87c0af&s=COMMENT_LIST&sc=avatar&shcp=ff37627b&shp=30310797&t=223449c4&x-expires=1776016800&x-signature=09IRWMY4GQo9sK2C1nziYjtrF6g%3D",
          "https://p16-common-sign.tiktokcdn-us.com/tos-alisg-avt-0068/b7c7ee71e68bb54abdbb61345aeda731~tplv-tiktokx-cropcenter-q:100:100:q70.jpeg?dr=8835&idc=useast5&ps=87d6e48a&refresh_token=4161485d&s=COMMENT_LIST&sc=avatar&shcp=ff37627b&shp=30310797&t=223449c4&x-expires=1776016800&x-signature=xQI6pdbqq6RQmR1ulCtJF5rlI6w%3D"
        ],
        "width": 720,
        "height": 720,
        "data_size": 0,
        "url_prefix": null
      },
      "follow_status": 0,
      "aweme_count": 0,
      "following_count": 0,
      "follower_count": 0,
      "favoriting_count": 0,
      "total_favorited": 0,
      "is_block": false,
      "hide_search": false,
      "custom_verify": "",
      "unique_id": "sacaa234",
      "bind_phone": "",
      "special_lock": 1,
      "need_recommend": 0,
      "has_facebook_token": false,
      "has_twitter_token": false,
      "fb_expire_time": 0,
      "tw_expire_time": 0,
      "has_youtube_token": false,
      "youtube_expire_time": 0,
      "room_id": 0,
      "live_verify": 0,
      "authority_status": 0,
      "verify_info": "",
      "shield_follow_notice": 0,
      "shield_digg_notice": 0,
      "shield_comment_notice": 0,
      "with_commerce_entry": false,
      "verification_type": 0,
      "enterprise_verify_reason": "",
      "is_ad_fake": false,
      "followers_detail": null,
      "region": "ID",
      "account_region": "",
      "commerce_user_level": 0,
      "live_agreement": 0,
      "platform_sync_info": null,
      "with_shop_entry": false,
      "is_discipline_member": false,
      "secret": 0,
      "has_orders": false,
      "prevent_download": false,
      "show_image_bubble": false,
      "geofencing": null,
      "unique_id_modify_time": 1775931534,
      "video_icon": {
        "uri": "",
        "url_list": [],
        "width": 720,
        "height": 720,
        "url_prefix": null
      },
      "ins_id": "",
      "google_account": "",
      "youtube_channel_id": "",
      "youtube_channel_title": "",
      "apple_account": 0,
      "is_phone_binded": false,
      "accept_private_policy": false,
      "twitter_id": "",
      "twitter_name": "",
      "user_canceled": false,
      "has_email": false,
      "status": 1,
      "create_time": 0,
      "avatar_uri": "tos-alisg-avt-0068/b7c7ee71e68bb54abdbb61345aeda731",
      "follower_status": 0,
      "comment_setting": 1,
      "duet_setting": 0,
      "user_rate": 1,
      "download_setting": 0,
      "download_prompt_ts": 0,
      "react_setting": 0,
      "live_commerce": false,
      "cover_url": [],
      "language": "id",
      "has_insights": false,
      "item_list": null,
      "user_mode": 1,
      "user_period": 0,
      "is_star": false,
      "cv_level": "",
      "type_label": null,
      "ad_cover_url": null,
      "comment_filter_status": 0,
      "relative_users": null,
      "cha_list": null,
      "sec_uid": "MS4wLjABAAAAU_T55WZmX49plUgJ8PY8PTz8Mf3yI_sXEOs9_TTQp3nqDWVtgKWd42E7VPp-8Jxj",
      "need_points": null,
      "homepage_bottom_toast": null,
      "can_set_geofencing": null,
      "white_cover_url": null,
      "user_tags": null,
      "stitch_setting": 0,
      "bold_fields": null,
      "search_highlight": null,
      "mutual_relation_avatars": null,
      "events": null,
      "predicted_age_group": "",
      "advance_feature_item_order": null,
      "mention_status": 1,
      "special_account": {
        "special_account_list": null
      },
      "advanced_feature_info": null,
      "user_profile_guide": null,
      "shield_edit_field_info": null,
      "friends_status": 0,
      "can_message_follow_status_list": null,
      "matched_friend_available": true,
      "account_labels": null,
      "fake_data_info": {},
      "is_mute": 0,
      "reply_with_video_flag": 4,
      "user_spark_info": {},
      "is_mute_non_story_post": 0,
      "is_mute_story": 0,
      "is_mute_lives": 0,
      "enabled_filter_all_comments": false
    },
    "reply_id": "0",
    "user_digged": 0,
    "reply_comment": null,
    "text_extra": [],
    "reply_comment_total": 20,
    "reply_to_reply_id": "0",
    "is_author_digged": false,
    "stick_position": 0,
    "user_buried": false,
    "label_list": null,
    "author_pin": false,
    "no_show": false,
    "collect_stat": 0,
    "trans_btn_style": 1,
    "share_info": {
      "url": "https://www.tiktok.com/@h4luworld/video/7612255881434090772?_d=0&_r=1&comment_author_id=7576590030333166612&preview_pb=0&share_comment_id=7612308101140939541&share_item_id=7612255881434090772&sharer_language=en&source=h5_m&u_code=0",
      "acl": {
        "code": 0,
        "extra": "{}"
      },
      "desc": ".’s comment: mau keluar kn kartu juga tapi takut kartu Timezone pulak yg keluar 😭",
      "title": "gmn mau nikah😫"
    },
    "comment_language": "id",
    "image_list": null,
    "comment_post_item_ids": null,
    "is_comment_translatable": true,
    "sort_extra_score": {
      "reply_score": 0.000067,
      "show_more_score": 0.013731
    },
    "sort_tags": "{\"top_list\":1}",
    "is_high_purchase_intent": false,
    "allow_download_photo": true,
    "fold_status": -1,
    "thread_id": 0,
    "thread_has_more": false,
    "_video_id": "7612255881434090772",
    "_replies": [
      {
        "aweme_id": "7612255881434090772",
        "cid": "7612362420498187015",
        "collect_stat": 0,
        "comment_language": "id",
        "comment_post_item_ids": null,
        "create_time": 1772391254,
        "digg_count": 324,
        "fold_status": 0,
        "image_list": null,
        "is_author_digged": false,
        "is_comment_translatable": true,
        "is_high_purchase_intent": true,
        "label_list": null,
        "no_show": false,
        "reply_comment": null,
        "reply_id": "7612308101140939541",
        "reply_to_reply_id": "0",
        "share_info": {
          "acl": {
            "code": 0,
            "extra": "{}"
          },
          "desc": "𝟖×𝟐’s comment: @ig:tiarasianipar_ kartu uno sih tkut kbawa😭",
          "title": "gmn mau nikah😫",
          "url": "https://www.tiktok.com/@h4luworld/video/7612255881434090772?_d=0&_r=1&comment_author_id=6763145425420551169&preview_pb=0&share_comment_id=7612362420498187015&share_item_id=7612255881434090772&sharer_language=en&source=h5_m&u_code=0"
        },
        "status": 1,
        "stick_position": 0,
        "text": "@ig:tiarasianipar_ kartu uno sih tkut kbawa😭",
        "text_extra": [
          {
            "end": 18,
            "group_id": 0,
            "group_name": "",
            "group_scene": "",
            "hashtag_id": "",
            "hashtag_name": "",
            "product_id": 0,
            "product_schema": "",
            "product_title": "",
            "sec_uid": "MS4wLjABAAAAgde0Zvm8YudOuGAlT8p5mOSfF47dA7kO1P19hfA7MBEcfqeywYWKevwyxLj9kLUY",
            "start": 0,
            "type": 0,
            "user_id": "6948732515050800130"
          }
        ],
        "thread_has_more": true,
        "thread_id": 1,
        "trans_btn_style": 1,
        "user": {
          "accept_private_policy": false,
          "account_labels": null,
          "account_region": "",
          "ad_cover_url": null,
          "advance_feature_item_order": null,
          "advanced_feature_info": null,
          "apple_account": 0,
          "authority_status": 0,
          "avatar_thumb": {
            "data_size": 0,
            "height": 720,
            "uri": "tos-alisg-avt-0068/6eabe89b406dda9602fecc38ee7f40e0",
            "url_list": [
              "https://p16-common-sign.tiktokcdn-us.com/tos-alisg-avt-0068/6eabe89b406dda9602fecc38ee7f40e0~tplv-tiktokx-cropcenter-q:100:100:q70.webp?dr=8835&idc=useast5&ps=87d6e48a&refresh_token=9d7de70e&s=COMMENT_LIST&sc=avatar&shcp=ff37627b&shp=30310797&t=223449c4&x-expires=1776016800&x-signature=BnCPbmDoawOO32KAqC%2FxegqHOUA%3D",
              "https://p19-common-sign.tiktokcdn-us.com/tos-alisg-avt-0068/6eabe89b406dda9602fecc38ee7f40e0~tplv-tiktokx-cropcenter-q:100:100:q70.webp?dr=8835&idc=useast5&ps=87d6e48a&refresh_token=a4f03eb4&s=COMMENT_LIST&sc=avatar&shcp=ff37627b&shp=30310797&t=223449c4&x-expires=1776016800&x-signature=lpFNrsbpMyhFqYhbE6faGPlposs%3D",
              "https://p16-common-sign.tiktokcdn-us.com/tos-alisg-avt-0068/6eabe89b406dda9602fecc38ee7f40e0~tplv-tiktokx-cropcenter-q:100:100:q70.jpeg?dr=8835&idc=useast5&ps=87d6e48a&refresh_token=d7b35ee1&s=COMMENT_LIST&sc=avatar&shcp=ff37627b&shp=30310797&t=223449c4&x-expires=1776016800&x-signature=JrjkUikbaBHtN3sK%2BTn%2FAodSBy4%3D"
            ],
            "url_prefix": null,
            "width": 720
          },
          "avatar_uri": "tos-alisg-avt-0068/6eabe89b406dda9602fecc38ee7f40e0",
          "aweme_count": 0,
          "bind_phone": "",
          "bold_fields": null,
          "can_message_follow_status_list": null,
          "can_set_geofencing": null,
          "cha_list": null,
          "comment_filter_status": 0,
          "comment_setting": 1,
          "commerce_user_level": 0,
          "cover_url": [],
          "create_time": 0,
          "custom_verify": "",
          "cv_level": "",
          "download_prompt_ts": 0,
          "download_setting": 3,
          "duet_setting": 0,
          "enabled_filter_all_comments": false,
          "enterprise_verify_reason": "",
          "events": null,
          "fake_data_info": {},
          "favoriting_count": 0,
          "fb_expire_time": 0,
          "follow_status": 0,
          "follower_count": 0,
          "follower_status": 0,
          "followers_detail": null,
          "following_count": 0,
          "friends_status": 0,
          "geofencing": null,
          "google_account": "",
          "has_email": false,
          "has_facebook_token": false,
          "has_insights": false,
          "has_orders": false,
          "has_twitter_token": false,
          "has_youtube_token": false,
          "hide_search": true,
          "homepage_bottom_toast": null,
          "ins_id": "",
          "is_ad_fake": false,
          "is_block": false,
          "is_discipline_member": false,
          "is_mute": 0,
          "is_mute_lives": 0,
          "is_mute_non_story_post": 0,
          "is_mute_story": 0,
          "is_phone_binded": false,
          "is_star": false,
          "item_list": null,
          "language": "id",
          "live_agreement": 0,
          "live_commerce": false,
          "live_verify": 0,
          "matched_friend_available": false,
          "mention_status": 1,
          "mutual_relation_avatars": null,
          "need_points": null,
          "need_recommend": 0,
          "nickname": "𝟖×𝟐",
          "platform_sync_info": null,
          "predicted_age_group": "",
          "prevent_download": false,
          "react_setting": 0,
          "region": "ID",
          "relative_users": null,
          "reply_with_video_flag": 4,
          "room_id": 0,
          "search_highlight": null,
          "sec_uid": "MS4wLjABAAAAwaN65i9cIqVn9Zb24Hr0LaikgqVWu3TLaGuJvcY5KZ3-ujHpJKwwfG-CP_0W4L11",
          "secret": 0,
          "shield_comment_notice": 0,
          "shield_digg_notice": 0,
          "shield_edit_field_info": null,
          "shield_follow_notice": 0,
          "short_id": "0",
          "show_image_bubble": false,
          "signature": "Purwakarta",
          "special_account": {
            "special_account_list": null
          },
          "special_lock": 1,
          "status": 1,
          "stitch_setting": 0,
          "total_favorited": 0,
          "tw_expire_time": 0,
          "twitter_id": "",
          "twitter_name": "",
          "type_label": null,
          "uid": "6763145425420551169",
          "unique_id": "kansa_1606",
          "unique_id_modify_time": 1775931536,
          "user_canceled": false,
          "user_mode": 1,
          "user_period": 0,
          "user_profile_guide": null,
          "user_rate": 1,
          "user_spark_info": {},
          "user_tags": null,
          "verification_type": 0,
          "verify_info": "",
          "video_icon": {
            "height": 720,
            "uri": "",
            "url_list": [],
            "url_prefix": null,
            "width": 720
          },
          "white_cover_url": null,
          "with_commerce_entry": false,
          "with_shop_entry": false,
          "youtube_channel_id": "",
          "youtube_channel_title": "",
          "youtube_expire_time": 0
        },
        "user_buried": false,
        "user_digged": 0
      }
  ]
}
```

### ⚡ Performance

| Metric | Value |
|--------|-------|
| Throughput | **~1000 comments/min** (with replies) |
| RAM usage | ~70 MB (5000 comments) |
| Cost per 1,000 comments | ~$0.25 |

### 🛠️ Technical Details

- **Engine**: HTTP-only - no browser required
- **Docker image**: `apify/actor-python:3.12`
- **Proxy**: Not required (works without proxy)

# Actor input Schema

## `video_id` (type: `string`):

TikTok video ID or full video URL. Example: 7600353976667704584

## `max_results` (type: `integer`):

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

## `include_replies` (type: `boolean`):

Fetch replies for each comment and nest them in the output.

## `max_replies_per_comment` (type: `integer`):

Maximum replies to fetch per comment. Set 0 for all replies.

## Actor input object example

```json
{
  "video_id": "https://www.tiktok.com/@tiktok/video/7628619815690833183",
  "max_results": 100,
  "include_replies": true,
  "max_replies_per_comment": 0
}
```

# 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 = {
    "video_id": "https://www.tiktok.com/@tiktok/video/7628619815690833183"
};

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

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Tiktok Comments (Include Replies) Scraper",
        "description": "Fetch TikTok comments include nested replies for sentiment analysis, research, and monitoring with parallel processing. No browser, no login, no proxy - just fast and efficient data extraction.",
        "version": "1.0",
        "x-build-id": "9elXBmL1IkelywqLD"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/xtracto~tiktok-comments-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-xtracto-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/xtracto~tiktok-comments-scraper/runs": {
            "post": {
                "operationId": "runs-sync-xtracto-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/xtracto~tiktok-comments-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-xtracto-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": [
                    "video_id"
                ],
                "properties": {
                    "video_id": {
                        "title": "Video ID",
                        "type": "string",
                        "description": "TikTok video ID or full video URL. Example: 7600353976667704584"
                    },
                    "max_results": {
                        "title": "Max Comments",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum number of comments to scrape. Set 0 for all comments.",
                        "default": 100
                    },
                    "include_replies": {
                        "title": "Include Replies",
                        "type": "boolean",
                        "description": "Fetch replies for each comment and nest them in the output.",
                        "default": true
                    },
                    "max_replies_per_comment": {
                        "title": "Max Replies per Comment",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum replies to fetch per comment. Set 0 for all replies.",
                        "default": 0
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
