{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Comments Scraper",
    "description": "TikTok Comments Scraper — Extract TikTok comments with usernames, comment text, likes, timestamps, and related video data. Useful for audience research, sentiment analysis, content insights, competitor analysis, and social media monitoring.",
    "version": "0.1",
    "x-build-id": "04Lx2zzGh4g4cw5Ei"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/socialdataapi~tiktok-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-socialdataapi-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/socialdataapi~tiktok-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-socialdataapi-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/socialdataapi~tiktok-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-socialdataapi-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": "The video URLs to extract comments from. Supported: tiktok.com/@user/video/ID links and vm.tiktok.com / vt.tiktok.com short links. Add them one by one or paste a list in Bulk edit. Tracking parameters such as ?is_from_webapp=1 are fine; they are stripped from videoWebUrl.",
            "items": {
              "type": "string"
            }
          },
          "commentsPerPost": {
            "title": "Maximum comments per post",
            "minimum": 1,
            "type": "integer",
            "description": "How many top-level comments to collect per video (each comment row carries its replies). Free plan users get up to 20 comments per input (one video URL, or one profile across all of its videos) per run and 200 comments per month in total; paid plans have no limit.",
            "default": 10
          },
          "maxRepliesPerComment": {
            "title": "Maximum replies per comment",
            "minimum": 0,
            "type": "integer",
            "description": "How many replies to collect from each comment that has any. Values above 20 are honoured. Set to 0 to skip replies entirely and run faster.",
            "default": 3
          },
          "profiles": {
            "title": "Usernames",
            "type": "array",
            "description": "One or more TikTok usernames, with or without the leading @. Use Bulk edit to paste a prepared list.",
            "items": {
              "type": "string"
            }
          },
          "resultsPerPage": {
            "title": "Number of videos per profile",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "How many videos to take from each profile. Values above 1000 are lowered to 1000 at runtime and this is logged. Profile runs currently return about the 10 most recent videos per creator, plus any pinned ones.",
            "default": 10
          },
          "profileScrapeSections": {
            "title": "Profile sections to scrape",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "Which profile sections to collect videos from. Each section returns only its own videos. Reposts take noticeably longer to collect.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "reposts"
              ]
            },
            "default": [
              "videos"
            ]
          },
          "profileSorting": {
            "title": "Profile video sorting",
            "enum": [
              "latest",
              "popular",
              "oldest"
            ],
            "type": "string",
            "description": "Latest keeps the profile's order. Popular and Oldest sort the creator's recent videos found in the run (Popular by play count), so they approximate rather than search a creator's whole history.",
            "default": "latest"
          },
          "oldestPostDateUnified": {
            "title": "Scrape profile videos published after [date]",
            "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. Only videos uploaded on or after this date are used. Absolute (YYYY-MM-DD) or relative (for example: 5 days, 2 weeks). Filters videos, not comments. Upload times for profile videos are accurate to about half a minute."
          },
          "newestPostDate": {
            "title": "Scrape profile videos published before [date]",
            "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. Only videos uploaded on or before this date are used. Absolute (YYYY-MM-DD) or relative (for example: 5 days, 2 weeks). Filters videos, not comments. Upload times for profile videos are accurate to about half a minute."
          },
          "excludePinnedPosts": {
            "title": "Exclude pinned posts",
            "type": "boolean",
            "description": "Skip videos pinned on the profile, in both the videos and the reposts sections.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Used only for comment and reply requests. The run starts with no proxy. If TikTok blocks a request, the run switches to a datacenter proxy (this Apify Proxy setting when Apify Proxy is enabled here, otherwise the Apify default proxy), then to residential proxies with 3 retries, and stays on that tier for the rest of the run. Custom proxy URLs are not used. Finding a profile's videos does not use a proxy."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}