{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Comments Scraper: With Replies",
    "description": "TikTok comments and replies threaded to who they answer; reads past TikTok's paging gaps (~2x the rows). $0.50 per 1,000 comments. Likes, creator pins and likes, stickers, images, mentions.",
    "version": "0.1",
    "x-build-id": "2cHg4HUae6m9RNypO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/luzivanlt~tiktok-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-luzivanlt-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/luzivanlt~tiktok-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-luzivanlt-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/luzivanlt~tiktok-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-luzivanlt-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": {
          "startUrls": {
            "title": "Video links",
            "type": "array",
            "description": "Links to TikTok videos or photo posts, as in your browser's address bar (https://www.tiktok.com/@user/video/… or /photo/…; m.tiktok.com/v/… and embed links work too), short share links from the app (vm.tiktok.com/…, vt.tiktok.com/…, tiktok.com/t/…), or video ids such as 7691066504380452110. Required unless you give a dataset id or rows below. Example: https://www.tiktok.com/@nasa/video/7691066504380452110",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "datasetId": {
            "title": "Dataset id from a scraper run",
            "type": "string",
            "description": "The id of a run's dataset from TikTok Scraper (clockworks/tiktok-scraper), so you do not copy video links by hand. Every row's webVideoUrl is read as a video link; rows without one, or whose own comment count is 0, are skipped and counted in the status. Reads up to 10,000 rows. Example: your leader run's dataset id, e.g. from its Storage tab (a username~name or a dataset link works too)."
          },
          "datasetRows": {
            "title": "Rows from a scraper run",
            "type": "array",
            "description": "Rows pasted from TikTok Scraper (clockworks/tiktok-scraper) results, as a JSON list, when its dataset id is not readable by your account. Each row's webVideoUrl is read as a video link; rows without one, or whose comment count is 0, are skipped. Reads up to 10,000 rows. Example: [{\"webVideoUrl\": \"https://www.tiktok.com/@fake.creator/video/7600000000000000001\"}]"
          },
          "maxCommentsPerVideo": {
            "title": "Max comments per video",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop reading a video after this many comments, replies included. Default 100, from 1 to 100,000. It caps what you pay: each comment or reply saved costs $0.0005 ($0.50 per 1,000), so 100 per video costs at most $0.05 a video. A video may end below it: TikTok often shows fewer comments than its count.",
            "default": 100
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Also save the replies to each comment, each marked with the comment it answers and the person it replies to. On by default. Each reply is a row charged like a comment ($0.0005) and counts toward Max comments per video; turn it off to save and pay for top-level comments only.",
            "default": true
          },
          "maxTopLevelCommentsPerVideo": {
            "title": "Max top-level comments per video",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop reading a video's comment list after this many comments, not counting replies; replies are then read only for those comments. From 1 to 100,000; empty reads them all. Max comments per video still caps the total. Example: 50 for each video's first 50 comments with their replies."
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Save at most this many replies under each comment. From 0 to 100,000; 0 saves no replies, empty saves them all. Replies still count toward Max comments per video. Example: 3 for a few replies per comment."
          },
          "includeAuthorProfiles": {
            "title": "Include commenter profiles",
            "type": "boolean",
            "description": "Also read each commenter's public TikTok profile and add it to their rows: bio and bio link, followers, following, likes received, video and friend counts, whether the account is verified, private, an organization, a business account or a TikTok Shop seller, when it joined, its language and a large profile picture. One profile is read per commenter on each page of comments, so runs take longer (about 15 minutes more per 1,000 comments). A profile TikTok does not show leaves those fields empty and keeps the comment. Off by default."
          },
          "commentsPerPost": {
            "title": "Max comments per video (alias)",
            "type": "integer",
            "description": "Another name for Max comments per video (maxCommentsPerVideo), kept so inputs written for other TikTok comment scrapers run unchanged. From 1 to 100,000; Max comments per video wins when it is set to anything but its default. Example: 500."
          },
          "maxCommentsPerPost": {
            "title": "Max comments per video (alias)",
            "type": "integer",
            "description": "Another name for Max comments per video (maxCommentsPerVideo), kept so inputs written for other TikTok comment scrapers run unchanged. From 1 to 100,000; Max comments per video wins when it is set to anything but its default. Example: 500."
          },
          "topLevelCommentsPerPost": {
            "title": "Max top-level comments per video (alias)",
            "type": "integer",
            "description": "Another name for Max top-level comments per video (maxTopLevelCommentsPerVideo), kept so inputs written for other TikTok comment scrapers run unchanged. From 1 to 100,000; Max top-level comments per video wins when both are set. Example: 50."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}