{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Comments Scraper: Comments & Replies Export",
    "description": "Export TikTok comments and replies from videos, photo posts and profiles to CSV, Excel or JSON: text, author, likes, replies, date, language, comment photos, liked or pinned by creator. Keyword and date filters. Only-new mode returns just the new comments on each scheduled run.",
    "version": "0.1",
    "x-build-id": "339dd6ZpxC8HvMwq0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s_actors~tiktok-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s_actors-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/s_actors~tiktok-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-s_actors-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/s_actors~tiktok-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-s_actors-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": [
          "videos"
        ],
        "properties": {
          "videos": {
            "title": "🎬 TikTok videos or profiles",
            "type": "array",
            "description": "One per line: video or photo post links (tiktok.com/@user/video/..., /photo/...), short links (vm.tiktok.com/..., tiktok.com/t/...), video IDs, or profiles (tiktok.com/@user or @user). A profile gives the comments of its latest videos (see Videos per profile).",
            "items": {
              "type": "string"
            }
          },
          "maxComments": {
            "title": "💬 Max comments per video (replies not counted)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Top-level comments to return per video. Replies come on top of this number (with Include replies, up to Max replies per comment each): 500 comments with 10 replies each can give up to 5,500 rows. 0 = all comments TikTok shows for the video. In only-new mode: the maximum number of new comments per video.",
            "default": 100
          },
          "includeReplies": {
            "title": "↩️ Include replies",
            "type": "boolean",
            "description": "Also return the replies to each comment, right after it (isReply = true, parentCommentId = the comment). With keyword or date filters: the replies of the matching comments that match the filters too.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "🔢 Max replies per comment",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "With Include replies: how many replies to return per comment. 0 = all replies. A cap keeps one viral thread from taking the whole run.",
            "default": 20
          },
          "maxVideosPerProfile": {
            "title": "👤 Videos per profile (only for profile links)",
            "minimum": 0,
            "type": "integer",
            "description": "Used only when you add a profile (tiktok.com/@user or @user): how many of its latest videos to scrape comments from, newest first. 0 = all videos of the profile. Video links are not affected.",
            "default": 5
          },
          "newerThan": {
            "title": "📅 Newer than",
            "type": "string",
            "description": "Only comments posted in this period, e.g. 24 hours, 7 days, 2 weeks, 1 month, or a date like 2026-09-01. Dates are exact (TikTok gives the posting time). TikTok lists comments by popularity, not by date, so with a limit the Actor reads up to 20 times Max comments per video (at least 2,000) to find them."
          },
          "keywords": {
            "title": "🔍 Only comments containing",
            "type": "array",
            "description": "Keep only comments (and replies) that contain at least one of these words or phrases, not case-sensitive: your brand, a product, a question, a giveaway code. You pay only for the comments returned. With a filter the Actor reads up to 20 times Max comments per video (at least 2,000).",
            "items": {
              "type": "string"
            }
          },
          "onlyNew": {
            "title": "🔔 Only new comments",
            "type": "boolean",
            "description": "For scheduled runs (save the input as a task and add a schedule). The first run returns comments as usual and remembers the time; every later run returns only comments and replies posted since the previous run (up to 5,000 comments read per video). An empty result means no new comments.",
            "default": false
          },
          "monitorName": {
            "title": "🏷️ Monitor name",
            "type": "string",
            "description": "Name of the memory used by Only new comments. Use a different name for each task, otherwise two tasks share what they have already seen.",
            "default": "default"
          },
          "findLeads": {
            "title": "📇 Creator contacts (leads)",
            "type": "boolean",
            "description": "Open the TikTok profile of each of the people who commented and the website or link-in-bio page (Linktree, Taplink, Beacons...) linked in it, and add to every row exact followers, bio, business category, email, website, Telegram, Instagram, YouTube, X, Facebook, LinkedIn, WhatsApp, Twitch. See the Leads tab of the results; one row per account: Output tab → Authors (CSV). Charged per account with contacts (more with an email, see Pricing); accounts without any contact are listed for free. Contacts are not repeated on every row.",
            "default": false
          },
          "maxLeads": {
            "title": "📇 Max accounts for contacts",
            "minimum": 0,
            "type": "integer",
            "description": "At most this many accounts get contacts, the most frequent commenters first. 0 = all accounts of the run.",
            "default": 500
          },
          "maxConcurrency": {
            "title": "⚡ Parallel requests",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many requests to TikTok run at the same time.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy",
            "type": "object",
            "description": "Requests go direct first and switch to Apify datacenter proxies (then residential) when TikTok refuses them. The default works for most runs.",
            "default": {
              "useApifyProxy": true
            }
          },
          "debugLog": {
            "title": "🐞 Debug log",
            "type": "boolean",
            "description": "Log every retried request (for troubleshooting).",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}