{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Comments Scraper — Comments & Replies, No Cookies",
    "description": "TikTok comments scraper/API for video URLs and profiles. Export public comments and replies without login or cookies. From $0.20/1,000 delivered rows; Free $0.24/1,000.",
    "version": "1.0",
    "x-build-id": "BtCUeswVSiUodpx2g"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/meka.im~tiktok-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-meka.im-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/meka.im~tiktok-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-meka.im-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/meka.im~tiktok-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-meka.im-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": "Up to 100 full public TikTok video URLs. Use Profile usernames below for profiles; invalid video URLs are skipped independently.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "commentsPerPost": {
            "title": "Total comments and replies per video",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum total delivered comments and replies for each video.",
            "default": 100
          },
          "topLevelCommentsPerPost": {
            "title": "Top-level comments per video",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum top-level comments collected for each video.",
            "default": 100
          },
          "maxRepliesPerComment": {
            "title": "Replies per top-level comment",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Per-parent reply upper bound, default 0. Delivers main comments first; explicitly set this to collect replies.",
            "default": 0
          },
          "profiles": {
            "title": "Profile usernames",
            "type": "array",
            "description": "Up to 100 usernames, optional @. Videos and public reposts supported.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "resultsPerPage": {
            "title": "Videos per profile",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Default 1. Upper bound on discovered posts per profile, not comment rows.",
            "default": 1
          },
          "profileSorting": {
            "title": "Profile video order",
            "enum": [
              "latest",
              "popular",
              "oldest"
            ],
            "type": "string",
            "description": "Default latest. Native video discovery order: latest, popular or oldest. Reposts retain upstream repost order.",
            "default": "latest"
          },
          "profileScrapeSections": {
            "title": "Profile sections",
            "minItems": 1,
            "maxItems": 2,
            "uniqueItems": true,
            "type": "array",
            "description": "Default [videos]. Select videos, reposts or both. Each section uses native upstream pagination; profileSorting applies to videos. resultsPerPage caps unique posts across selected sections.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "reposts"
              ],
              "enumTitles": [
                "Videos",
                "Public reposts"
              ]
            },
            "default": [
              "videos"
            ]
          },
          "oldestPostDateUnified": {
            "title": "Oldest video publication date or days back",
            "pattern": "^((\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])|[1-9][0-9]{0,3}|[12][0-9]{4}|3[0-5][0-9]{3}|36[0-4][0-9]{2}|36500)$",
            "type": "string",
            "description": "Inclusive UTC publication lower bound: valid YYYY-MM-DD or integer string 1..36500 (1=today, 2=yesterday). Relative days freeze at each profile unit first request, before discovery."
          },
          "newestPostDate": {
            "title": "Newest video publication date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "YYYY-MM-DD UTC video publication date; inclusive calendar day. Applies to profile discovery before comment collection."
          },
          "excludePinnedPosts": {
            "title": "Exclude pinned profile posts",
            "type": "boolean",
            "description": "Default false. Profile discovery only.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Concurrent video or profile targets",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Process 1–16 video or profile targets at once. Each profile processes its videos sequentially. Output can arrive in completion order; this is not a requests-per-second setting.",
            "default": 16
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}