{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Comments Scraper - Replies, Likes & Authors",
    "description": "Export comments and full reply threads from any TikTok video: text, likes, dates, pinned and creator-liked flags, commenter handle and profile, plus video stats on every row. Paste video URLs, share links or usernames. No login. $0.30 per 1,000 comments.",
    "version": "0.0",
    "x-build-id": "qua20NPBaI7wjVIQd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/epicscrapers~tiktok-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-epicscrapers-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/epicscrapers~tiktok-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-epicscrapers-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/epicscrapers~tiktok-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-epicscrapers-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": {
          "postURLs": {
            "title": "TikTok video URLs",
            "type": "array",
            "description": "Videos to scrape comments from. Each entry can be a video URL (https://www.tiktok.com/@user/video/7697307919943060767), a photo post URL, a share link (vm.tiktok.com/..., tiktok.com/t/...) or a bare video ID.",
            "items": {
              "type": "string"
            }
          },
          "commentsPerPost": {
            "title": "Max comments per video (replies included)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum rows saved per video, top-level comments and replies together. Set to 0 for every comment TikTok shows.",
            "default": 100
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 0,
            "type": "integer",
            "description": "How many replies to save under each comment. 0 saves no replies. Replies are saved right after their comment and count toward Max comments per video.",
            "default": 0
          },
          "topLevelCommentsPerPost": {
            "title": "Max top-level comments per video",
            "minimum": 0,
            "type": "integer",
            "description": "Optional separate limit for top-level comments, so replies don't use up the per-video limit. 0 means no separate limit.",
            "default": 0
          },
          "maxItems": {
            "title": "Max comments in total",
            "minimum": 0,
            "type": "integer",
            "description": "Stop the whole run after this many rows (comments and replies). 0 means no total limit. You can also set a maximum cost per run in the run options.",
            "default": 0
          },
          "oldestCommentDate": {
            "title": "Only comments posted after",
            "type": "string",
            "description": "Save only comments and replies posted on or after this date: an absolute date (2026-10-01) or a relative one (7 days, 2 weeks). Use a relative date in a scheduled run to collect only new comments. TikTok doesn't sort comments by date, so every page of the video is still read (within Max top-level comments per video)."
          },
          "includeCommenterProfiles": {
            "title": "Add commenter profiles",
            "type": "boolean",
            "description": "Adds each commenter's follower, following, like and video counts, bio, bio link, verified badge, private flag and account creation date to their rows. One extra request per unique commenter, charged as a separate event once per commenter per run.",
            "default": false
          },
          "profiles": {
            "title": "Usernames",
            "type": "array",
            "description": "Creators whose latest videos you want comments from. Each entry can be a username (khaby.lame), @username or profile URL.",
            "items": {
              "type": "string"
            }
          },
          "videosPerProfile": {
            "title": "Videos per profile",
            "minimum": 1,
            "type": "integer",
            "description": "How many videos to scrape from each selected section of a profile. Posts are the creator's latest 10 at most (newest first, pinned videos not included); reposts can go further.",
            "default": 3
          },
          "profileScrapeSections": {
            "title": "Profile sections",
            "type": "array",
            "description": "Which videos of each profile to scrape comments from: the creator's own posts, the videos they reposted, or both. Rows from profiles name the profile and section in sourceProfile and sourceSection.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "reposts"
              ],
              "enumTitles": [
                "Posts",
                "Reposts"
              ]
            },
            "default": [
              "videos"
            ]
          },
          "oldestPostDate": {
            "title": "Videos published after",
            "type": "string",
            "description": "Only scrape a creator's videos published on or after this date (absolute or relative, e.g. 30 days)."
          },
          "newestPostDate": {
            "title": "Videos published before",
            "type": "string",
            "description": "Only scrape a creator's videos published on or before this date."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}