{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Transcript Scraper",
    "description": "Public TikTok videos as text: platform captions, in-container speech recognition when there are none.",
    "version": "0.2",
    "x-build-id": "oKUDYgj261iYzfnxM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lanternlab318~tiktok-transcript/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lanternlab318-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/lanternlab318~tiktok-transcript/runs": {
      "post": {
        "operationId": "runs-sync-lanternlab318-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/lanternlab318~tiktok-transcript/run-sync": {
      "post": {
        "operationId": "run-sync-lanternlab318-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",
        "required": [
          "videoUrls"
        ],
        "properties": {
          "videoUrls": {
            "title": "TikTok videos",
            "type": "array",
            "description": "Public TikTok videos, one per line: a video link (https://www.tiktok.com/@user/video/...), a short link (https://vm.tiktok.com/...) or a numeric video ID. An @handle is accepted too, but TikTok only shows a profile's video grid to signed-in visitors, so a handle is reported as not collected rather than silently empty - bring video links.",
            "items": {
              "type": "string"
            }
          },
          "language": {
            "title": "Preferred language",
            "type": "string",
            "description": "Language code to prefer, for example en, es, zh. Used to pick a caption track when the video has several, and as the language hint for speech recognition. Leave empty to take the language actually spoken and let recognition detect it.",
            "default": ""
          },
          "preferPlatformCaptions": {
            "title": "Use TikTok's own captions first",
            "type": "boolean",
            "description": "Read the video's caption track when TikTok has one. This is the cheapest and most accurate source. Turn it off to transcribe the audio even for videos that have captions.",
            "default": true
          },
          "allowAsr": {
            "title": "Transcribe videos without captions",
            "type": "boolean",
            "description": "Run speech recognition on videos TikTok has no caption track for. Open-source Whisper runs inside this Actor; no audio leaves it and no speech service is called. Charged as a separate, higher-priced event than a caption transcript.",
            "default": true
          },
          "includeSegments": {
            "title": "Include timed segments",
            "type": "boolean",
            "description": "Include the segments array (start, end, text) next to the plain-text transcript.",
            "default": true
          },
          "maxDurationSec": {
            "title": "Max video length for speech recognition (seconds)",
            "minimum": 5,
            "maximum": 3600,
            "type": "integer",
            "description": "Videos longer than this are skipped by speech recognition and reported as partial instead. Caption tracks are read whatever the length.",
            "default": 600
          },
          "maxItems": {
            "title": "Max videos",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Per input: how many recent videos are taken from each @handle, and the most videos one input may stand for. A run collects at most this many videos per line of the input above.",
            "default": 50
          },
          "asrModel": {
            "title": "Speech recognition model",
            "enum": [
              "tiny"
            ],
            "type": "string",
            "description": "Whisper model used for videos without captions. Only tiny is offered: measured on Apify 2026-10-24 (one CPU core) it transcribes about 2x faster than the audio plays and tracked TikTok's own captions within a few words on 7 of 8 test videos. Larger weights ran slower than real time without reading those samples any better.",
            "default": "tiny"
          },
          "maxUpstreamRequests": {
            "title": "Max requests to TikTok",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard ceiling on requests this run may send to TikTok: page visits, caption files and audio downloads. Leave empty to derive it from the input. Reaching it stops collection and is reported on the videos that were not collected."
          },
          "settleSecs": {
            "title": "Settle time for the first page (seconds)",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "How long the first page is left running before anything else is requested.",
            "default": 8
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. TikTok serves these public pages to the platform's own IP, so no proxy is needed by default. Switch Apify Proxy on if you want a particular country's exit.",
            "default": {
              "useApifyProxy": false
            }
          },
          "captureRaw": {
            "title": "Store each page's raw JSON",
            "type": "boolean",
            "description": "Diagnostics: keep the first 15 video pages' own JSON in the run's key-value store. Off by default.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}