{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Profile Scraper & Video Comments",
    "description": "Extract detailed TikTok profile data with the TikTok Profile Scraper. Retrieve usernames, display names, follower counts, following counts, total likes, bio info, and profile stats. Ideal for influencer research, audience analysis, and social media insights. Fast, accurate, and scalable.",
    "version": "0.1",
    "x-build-id": "0kGrc6XBTLUwsZS2t"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapier~tiktok-profile-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapier-tiktok-profile-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/scrapier~tiktok-profile-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapier-tiktok-profile-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/scrapier~tiktok-profile-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapier-tiktok-profile-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": {
          "creatorProfiles": {
            "title": "👤 Creator profiles to open",
            "type": "array",
            "description": "TikTok usernames (or full profile URLs), one per line. Every video found for each creator becomes a parent row, and its comment thread is attached beneath it. Example: mrbeast",
            "items": {
              "type": "string"
            }
          },
          "videosPerCreator": {
            "title": "🎬 Videos per creator",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many videos to open per creator. Each one becomes a parent row that its comments hang off. TikTok's creator feed returns 10 videos per request, so a large number means many sequential requests. Default is 5.",
            "default": 5
          },
          "maxItems": {
            "title": "🧮 Maximum VIDEO rows for the whole run",
            "minimum": 0,
            "type": "integer",
            "description": "Hard stop on parent VIDEO rows across all creators. Comments and replies are NOT counted against this — they are additional child rows. 0 means no limit. Example: maxItems=3 + maxCommentsPerVideo=20 → 3 videos and up to 60 comments. Default is 0.",
            "default": 0
          },
          "videoOrder": {
            "title": "🔀 Order of the fetched video window",
            "enum": [
              "latest",
              "popular",
              "oldest"
            ],
            "type": "string",
            "description": "Client-side ordering of the videos that were fetched. TikTok's creator feed always serves newest-first and ignores its own sort parameter, so this reorders the fetched window rather than changing which videos you get.",
            "default": "latest"
          },
          "includeVideoComments": {
            "title": "💬 Fetch video comments",
            "type": "boolean",
            "description": "Turn off to run the actor as a plain profile/video scraper with no comment child rows. Default is true.",
            "default": true
          },
          "maxCommentsPerVideo": {
            "title": "🔢 Maximum comments per video",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Top-level comments to collect for each video. Comments are fetched 50 per request. 0 disables comment capture. Example: 3 videos × 20 = up to 60 comment rows. Default is 20.",
            "default": 20
          },
          "includeCommentReplies": {
            "title": "↩️ Expand comment replies",
            "type": "boolean",
            "description": "Also open the reply thread under every comment that reports replies. Each reply row is labelled type=reply, carries repliesToCid pointing at its parent comment, and is placed immediately after that parent. Default is true.",
            "default": true
          },
          "maxRepliesPerComment": {
            "title": "🧵 Maximum replies per comment",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Replies to pull under each parent comment. Only comments that actually report replies trigger a request. Example: maxCommentsPerVideo=20 + maxRepliesPerComment=5 → up to 20 comments and up to 100 replies. Default is 5.",
            "default": 5
          },
          "commentKeywords": {
            "title": "🔍 Keep only comments containing…",
            "type": "array",
            "description": "Case-insensitive substrings. A comment is kept only if its text contains at least one of them. Leave empty to keep every comment. Image/sticker comments have no text and are filtered out when this is set.",
            "items": {
              "type": "string"
            }
          },
          "minCommentDiggs": {
            "title": "👍 Minimum comment likes",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only comments with at least this many likes. 0 keeps everything. Default is 0.",
            "default": 0
          },
          "oldestPostDateUnified": {
            "title": "📅 Only videos published after",
            "type": "string",
            "description": "Earliest publish date for a video to qualify. Absolute (YYYY-MM-DD) or relative (7 = seven days ago)."
          },
          "newestPostDate": {
            "title": "📅 Only videos published before",
            "type": "string",
            "description": "Latest publish date for a video to qualify. Absolute (YYYY-MM-DD) or relative (0 = today)."
          },
          "leastDiggs": {
            "title": "❤️ Minimum video hearts",
            "minimum": 1,
            "type": "integer",
            "description": "Keep only videos with at least this many hearts — useful for reading comments on a creator's strongest posts only."
          },
          "mostDiggs": {
            "title": "❤️ Maximum video hearts",
            "minimum": 1,
            "type": "integer",
            "description": "Keep only videos with fewer than this many hearts."
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "TikTok soft-blocks with an HTTP 200 challenge page rather than an error status. When that happens the actor escalates through datacenter and residential proxies automatically, always before the first row of a creator is pushed."
          },
          "profiles": {
            "title": "👤 profiles (legacy key)",
            "type": "array",
            "description": "Backward-compatible alias for '👤 Creator profiles to open'. If both are supplied this one wins. Leave empty unless you are re-running an older input JSON.",
            "items": {
              "type": "string"
            }
          },
          "resultsPerPage": {
            "title": "📊 resultsPerPage (legacy key)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Backward-compatible alias for '🎬 Videos per creator'. If both are supplied this one wins."
          },
          "profileSorting": {
            "title": "🔀 profileSorting (legacy key)",
            "enum": [
              "latest",
              "popular",
              "oldest"
            ],
            "type": "string",
            "description": "Backward-compatible alias for '🔀 Order of the fetched video window'. If both are supplied this one wins."
          },
          "profileScrapeSections": {
            "title": "📂 profileScrapeSections (legacy key)",
            "type": "array",
            "description": "Accepted for backward compatibility. Only original videos are collected; the reposts feed is not read by this actor, so every video row reports fromProfileSection = videos.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "reposts"
              ]
            }
          },
          "excludePinnedPosts": {
            "title": "📌 excludePinnedPosts (legacy key)",
            "type": "boolean",
            "description": "Accepted for backward compatibility. TikTok's creator feed does not mark pinned posts, so this filter almost never removes anything.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}