{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Comments Scraper & Full Reply Threads",
    "description": "Collect TikTok comments automatically for analysis and reporting. This scraper fetches comment content, engagement stats, reply chains, and timestamps. Useful for sentiment analysis, influencer research, and audience behavior insights.",
    "version": "0.1",
    "x-build-id": "TgmJvfdVd4ATS01Kk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/simpleapi~tiktok-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-simpleapi-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/simpleapi~tiktok-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-simpleapi-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/simpleapi~tiktok-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-simpleapi-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",
        "properties": {
          "videoUrls": {
            "title": "🔗 TikTok video links",
            "type": "array",
            "description": "Paste one or more TikTok video links. Short links (vm.tiktok.com / vt.tiktok.com) are followed automatically. Example: https://www.tiktok.com/@mrbeast/video/7578547467189374239",
            "items": {
              "type": "string"
            }
          },
          "maxComments": {
            "title": "💬 Top-level comments per video",
            "minimum": 1,
            "type": "integer",
            "description": "How many TOP-LEVEL comments to keep per video. Replies do NOT count against this number — they are extra rows. Example: 20 comments × up to 100 replies each = 20 parent rows plus up to 2000 reply rows. Default is 10.",
            "default": 10
          },
          "repliesPerComment": {
            "title": "↩️ Replies to collect per comment",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum replies to pull from EACH comment. Values above 20 are honoured by paging the thread — verified live to 120+ replies on a single comment. Set 0 to skip replies entirely and scrape comments only. Default is 20.",
            "default": 20
          },
          "fetchAllReplies": {
            "title": "🧵 Follow every thread to the end",
            "type": "boolean",
            "description": "Ignore the per-comment limit above and keep paging each thread until TikTok reports has_more = false. Threads can run to hundreds of replies, so this multiplies both runtime and row count. A safety stop halts any single thread at 200 pages. Default is off.",
            "default": false
          },
          "replyDestination": {
            "title": "📤 Where reply rows go",
            "enum": [
              "childDataset",
              "mainDataset",
              "both"
            ],
            "type": "string",
            "description": "Replies are written to a separate child dataset by default, so the main table stays one row per comment and the replies stay readable as their own table. Choose Main dataset to get comments and replies interleaved in a single table instead.",
            "default": "childDataset"
          },
          "keepNestedRepliesField": {
            "title": "🗂️ Also nest replies inside each comment row",
            "type": "boolean",
            "description": "Keeps the legacy replies[] array populated on every comment row for backward compatibility with the original scraper's output shape. Turn it off for a smaller, flatter export. Default is on.",
            "default": true
          },
          "answerStatus": {
            "title": "🎙️ Creator answer status",
            "enum": [
              "any",
              "answeredByCreator",
              "awaitingCreatorAnswer"
            ],
            "type": "string",
            "description": "Answered = at least one reply carries TikTok's \"Creator\" label (or comes from the video's own author). Awaiting an answer = the full thread was read and no creator reply was found; comments whose thread could not be read to the end are left out rather than guessed at. Needs replies enabled.",
            "default": "any"
          },
          "onlyCommentsWithReplies": {
            "title": "💭 Skip comments that have no replies",
            "type": "boolean",
            "description": "Drop every comment whose reply count is zero, so the export is only real conversation threads. Default is off.",
            "default": false
          },
          "creatorUsernames": {
            "title": "👤 TikTok usernames",
            "type": "array",
            "description": "Usernames without the @, one per line or pasted in bulk. Each username's videos are resolved first, then their comments are scraped. Example: mrbeast",
            "items": {
              "type": "string"
            }
          },
          "videosPerProfile": {
            "title": "📺 Videos per username",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "How many videos to take from each username before scraping comments. Example: 3 usernames × 5 videos = 15 videos scraped. Default is 10.",
            "default": 10
          },
          "profileTabs": {
            "title": "🗃️ Which profile tab to read",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "Videos reads the profile's own uploads. Reposts reads the Reposts tab, which only exists when the account has reposted something.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "reposts"
              ],
              "enumTitles": [
                "Videos — the account's own uploads",
                "Reposts — the Reposts tab"
              ]
            },
            "default": [
              "videos"
            ]
          },
          "videoSortOrder": {
            "title": "🔀 Pick which videos",
            "enum": [
              "latest",
              "oldest",
              "popular"
            ],
            "type": "string",
            "description": "Newest first, oldest first, or most-liked. Oldest and Most liked are computed locally from a wider candidate window, so they cost extra scrolling. Date filters apply to Newest and Oldest.",
            "default": "latest"
          },
          "videosPostedAfter": {
            "title": "📅 Only videos posted after",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "Optional. Absolute date (2026-01-31) or relative (5 days, 2 weeks, 3 months). Applies to username discovery, not to individual comment timestamps."
          },
          "videosPostedBefore": {
            "title": "📅 Only videos posted before",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "Optional. Absolute date (2026-01-31) or relative (5 days, 2 weeks, 3 months). Applies to username discovery, not to individual comment timestamps."
          },
          "skipPinnedVideos": {
            "title": "📌 Ignore pinned videos",
            "type": "boolean",
            "description": "Pinned videos sit at the top of a profile and are often months old. Tick to leave them out of username discovery.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy configuration",
            "type": "object",
            "description": "Optional. Leave off unless you are running at scale or seeing blocks."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}