{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Transcript Scraper: Captions, Profiles & Batches",
    "description": "Turn any TikTok video, @username or profile link into a clean transcript. Scrape a whole account in one run (up to 200 targets), choose native captions or AI speech-to-text, skip old videos by date, monitor new uploads, and export SRT/VTT with views, likes and creator stats.",
    "version": "0.0",
    "x-build-id": "oV5PZXro9UQcGC7xi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apple_yang~tiktok-transcripts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apple_yang-tiktok-transcripts-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/apple_yang~tiktok-transcripts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-apple_yang-tiktok-transcripts-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/apple_yang~tiktok-transcripts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-apple_yang-tiktok-transcripts-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": {
          "videoUrl": {
            "title": "TikTok video URL, profile URL or @username",
            "type": "string",
            "description": "One single target. Accepts a TikTok video URL, a short URL (vm.tiktok.com / vt.tiktok.com / tiktok.com/t/...), a profile URL (https://www.tiktok.com/@user) or a username (@user). The parameter name and type are unchanged, existing video URL inputs keep working exactly as before."
          },
          "batchTargets": {
            "title": "Batch targets (optional, overrides videoUrl)",
            "maxItems": 200,
            "type": "array",
            "description": "Process up to 200 targets in one run. Mixed targets are allowed: video URLs, short URLs, profile URLs and @usernames. When this array is not empty the Actor runs in Batch mode and ignores videoUrl completely (a prefilled example video is never added to the batch). More than 200 targets is rejected with BATCH_LIMIT_EXCEEDED.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerProfile": {
            "title": "Max videos per profile",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of videos that will actually be transcribed per profile target (not the number of videos inspected).",
            "default": 20
          },
          "postedAfter": {
            "title": "Only videos posted after this date",
            "type": "string",
            "description": "Optional date filter for profile targets, e.g. 2026-10-01. Old pinned posts are ignored when determining the pagination date boundary."
          },
          "onlyNewVideos": {
            "title": "Only new videos (profile targets)",
            "type": "boolean",
            "description": "Profile monitoring mode. First run takes the newest maxVideosPerProfile videos as the baseline. Later runs only take videos published after the last successful run (plus videos that failed last time), so old history is never backfilled. A video is only counted as done after its transcript was written to the Dataset.",
            "default": false
          },
          "transcriptMode": {
            "title": "Transcript mode",
            "enum": [
              "auto",
              "captions_only",
              "ai"
            ],
            "type": "string",
            "description": "auto: TikTok native caption first, existing Speech-to-Text when there is none (same as before). captions_only: native caption only, never calls Speech-to-Text and never charges it. ai: always use the existing Speech-to-Text, even when a native caption exists.",
            "default": "auto"
          },
          "captionLanguage": {
            "title": "Caption language (optional)",
            "enum": [
              "auto",
              "en",
              "es",
              "pt",
              "fr",
              "de",
              "it",
              "id",
              "ja",
              "ko",
              "zh-Hans",
              "zh-Hant",
              "ar",
              "tr",
              "vi",
              "th",
              "ru",
              "hi",
              "pl",
              "nl"
            ],
            "type": "string",
            "description": "auto (default) returns the video's own language. Pick a language to prefer that TikTok caption track instead — useful when the source video is in another language but you need, say, the English version. If the video has no such track, the original language is returned instead (never an error) and captionLanguageRequested vs captionLanguage shows what happened. Ignored when transcriptMode=ai, because Speech-to-Text always follows the spoken audio.",
            "default": "auto"
          },
          "includeSrt": {
            "title": "Include SRT text",
            "type": "boolean",
            "description": "Include SRT-formatted subtitle text in each result. Built locally from the transcript segments, no extra API call.",
            "default": false
          },
          "includeVtt": {
            "title": "Include WebVTT text",
            "type": "boolean",
            "description": "Include WebVTT-formatted subtitle text in each result. Built locally from the transcript segments, no extra API call.",
            "default": false
          },
          "includeHook": {
            "title": "Include hook text",
            "type": "boolean",
            "description": "Add the real spoken text of the first 5 seconds of the transcript. This is a local slice of the transcript, not an AI analysis.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}