{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Transcript Scraper",
    "description": "Get TikTok video transcripts (text, timed segments, SRT) in the original spoken language, from video links or creator handles, plus views, likes and author data. Optional Whisper fallback.",
    "version": "0.1",
    "x-build-id": "uix9i6wKo1VTP7NUe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/latentlark~tiktok-transcript/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-latentlark-tiktok-transcript",
        "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/latentlark~tiktok-transcript/runs": {
      "post": {
        "operationId": "runs-sync-latentlark-tiktok-transcript",
        "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/latentlark~tiktok-transcript/run-sync": {
      "post": {
        "operationId": "run-sync-latentlark-tiktok-transcript",
        "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": {
          "videoUrls": {
            "title": "TikTok video URLs",
            "type": "array",
            "description": "One link per line: https://www.tiktok.com/@user/video/123…, vm.tiktok.com / vt.tiktok.com short links, or bare video IDs. Duplicates are removed.",
            "items": {
              "type": "string"
            }
          },
          "profiles": {
            "title": "Creators (handles or profile URLs)",
            "type": "array",
            "description": "e.g. @penniestopounds or https://www.tiktok.com/@penniestopounds. Gets each creator's most recent videos (TikTok's public embed shows about the latest 10).",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerProfile": {
            "title": "Max videos per creator",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many recent videos to transcribe per creator. TikTok's public embed exposes roughly the latest 10, so values above ~10 rarely add more.",
            "default": 10
          },
          "captionLanguage": {
            "title": "Caption language",
            "type": "string",
            "description": "Leave empty (recommended) to get the original spoken-language transcript. Enter a language code such as 'en' or 'eng-US' to prefer TikTok's machine-translated caption track when it exists; otherwise the original is returned."
          },
          "includeSegments": {
            "title": "Include timed segments",
            "type": "boolean",
            "description": "Add a segments array: [{start, end, text}] in seconds.",
            "default": true
          },
          "includeSrt": {
            "title": "Include SRT",
            "type": "boolean",
            "description": "Add an SRT subtitle string (ready for video editors and YouTube).",
            "default": true
          },
          "includeVtt": {
            "title": "Include WebVTT",
            "type": "boolean",
            "description": "Add a WebVTT subtitle string.",
            "default": false
          },
          "whisperFallback": {
            "title": "Whisper fallback for videos without captions",
            "type": "boolean",
            "description": "Off by default. When on, videos with no TikTok captions are downloaded and transcribed with Whisper (base model is built in). Charged as the higher-priced whisper-transcript event only when it returns speech. Slower than native captions; default 512 MB is fine for base, use 1 GB for small.",
            "default": false
          },
          "whisperModel": {
            "title": "Whisper model",
            "enum": [
              "tiny",
              "base",
              "small"
            ],
            "type": "string",
            "description": "base (default, built in, fast) is good for clear speech. small is more accurate but slower and downloads at run start. tiny is fastest. Use 1 GB memory for small.",
            "default": "base"
          },
          "maxWhisperVideos": {
            "title": "Max videos to Whisper",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Safety cap: at most this many Whisper transcriptions per run.",
            "default": 20
          },
          "whisperMaxDurationSecs": {
            "title": "Max video length for Whisper (s)",
            "minimum": 10,
            "maximum": 1800,
            "type": "integer",
            "description": "Skip Whisper for videos longer than this (seconds).",
            "default": 300
          },
          "proxyMode": {
            "title": "Network mode",
            "enum": [
              "auto",
              "none",
              "datacenter"
            ],
            "type": "string",
            "description": "Auto (recommended): direct request first, then retries via Apify Proxy with a fresh session if TikTok challenges or rate-limits. Residential proxy is not needed.",
            "default": "auto"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy used for retries. Apify datacenter proxy (default) is enough.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Videos processed in parallel (1–16).",
            "default": 8
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}