{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Transcript & Video Metadata Scraper",
    "description": "Extract existing TikTok transcripts, captions, WebVTT subtitles, timestamps, and structured metadata from public TikTok videos. Supports single URLs, bulk processing, and AI workflows.",
    "version": "1.0",
    "x-build-id": "X7Wc19EDmIfW3P3F4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lance_api~tiktok-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lance_api-tiktok-transcript-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/lance_api~tiktok-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lance_api-tiktok-transcript-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/lance_api~tiktok-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lance_api-tiktok-transcript-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": {
          "tiktokUrls": {
            "title": "TikTok URLs",
            "maxItems": 200,
            "type": "array",
            "description": "Paste as many as you need and mix the kinds freely: video links (tiktok.com/@user/video/123), short links (vm.tiktok.com, vt.tiktok.com, /t/...), profile links (tiktok.com/@user) and @usernames. Duplicates are removed automatically. Photo and slideshow posts are reported as unsupported_media, because they have no speech. Up to 200 items per run.",
            "items": {
              "type": "string"
            }
          },
          "profiles": {
            "title": "TikTok profiles or @usernames (optional)",
            "maxItems": 200,
            "type": "array",
            "description": "The dedicated place for whole profiles: paste @nasa, https://www.tiktok.com/@nasa, or several of them at once. Each entry is handled exactly like a profile in TikTok URLs; if the same profile appears in both fields it is only scanned once. Use it when you want to be explicit that you are scanning profiles rather than single videos.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerProfile": {
            "title": "Max videos per profile",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many of the newest videos to take from each profile, from either field above. Default 20. Lower it to keep a test run small.",
            "default": 20
          },
          "postedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Optional date filter for profiles. Only videos published on or after this day are taken. The date is read in UTC, so the same date means the same moment for every run. Leave empty for no date filter. API callers may also send a full ISO timestamp."
          },
          "onlyNewVideos": {
            "title": "Only new videos (profile monitoring)",
            "type": "boolean",
            "description": "For repeated profile runs, e.g. on a Schedule. The first run records a baseline; later runs skip videos that were already delivered, retry the ones that failed, and keep videos above the per-run limit pending for the next run.",
            "default": false
          },
          "transcriptMode": {
            "title": "Transcript mode",
            "enum": [
              "auto",
              "captions_only",
              "ai"
            ],
            "type": "string",
            "description": "auto is recommended: use the TikTok caption when the video has one, and AI only when it does not. captions_only never calls AI, so it costs nothing beyond the result itself. ai always transcribes the audio, even when TikTok captions exist. AI transcription is billed per started minute. A Task saved with the old 'AI transcript' switch turned off stays on captions only until a mode is chosen here."
          },
          "captionLanguage": {
            "title": "Caption language",
            "type": "string",
            "description": "auto keeps the video's own spoken language. A specific language is a preference only: when the video has no such caption, its original caption is returned instead of failing. This selects an existing caption and never translates it."
          },
          "includeSrt": {
            "title": "Include SRT file",
            "type": "boolean",
            "description": "Adds transcriptSrt for each row. Built locally from the same transcript, so there is no extra API call and no extra charge.",
            "default": false
          },
          "includeVtt": {
            "title": "Include WebVTT file",
            "type": "boolean",
            "description": "Adds transcriptVtt for each row. Built locally from the same transcript, so there is no extra API call and no extra charge.",
            "default": false
          },
          "includeHook": {
            "title": "Include spoken hook (first 5 seconds)",
            "type": "boolean",
            "description": "Adds hookText with the words spoken in the first 5 seconds, cut from the transcript that was already returned. No extra AI call and no extra charge.",
            "default": false
          },
          "translate": {
            "title": "Translate transcript",
            "type": "boolean",
            "description": "Translate the transcript in the same run. The original transcript stays untouched in its own fields.",
            "default": false
          },
          "targetLanguage": {
            "title": "Translation language",
            "type": "string",
            "description": "The language to translate into. Used only when translation is on.",
            "default": "en"
          },
          "formats": {
            "title": "Transcript formats (retired selector)",
            "type": "array",
            "description": "Retired document selector, replaced by the two 'Include ... file' checkboxes. Still honoured, so old API clients keep getting the documents they ask for. Accepted values: text, segments, vtt, srt. Text and timed segments are always returned.",
            "items": {
              "type": "string"
            },
            "default": [
              "text",
              "segments"
            ]
          },
          "profile": {
            "title": "Profile or @username (retired singular field)",
            "type": "string",
            "description": "Singular name of TikTok profiles from the previous release. Still read and combined with TikTok profiles, so a Task saved with it keeps working."
          },
          "batchTargets": {
            "title": "Batch targets (retired name)",
            "type": "array",
            "description": "Retired name for the TikTok URLs list. Still read when TikTok URLs and TikTok profiles are both empty, so old API clients keep working. Prefer TikTok URLs.",
            "items": {
              "type": "string"
            }
          },
          "videoUrl": {
            "title": "Single target (retired field)",
            "type": "string",
            "description": "Retired single-target field. Still read when TikTok URLs and TikTok profiles are both empty. Prefer putting the link in TikTok URLs."
          },
          "bulkUrls": {
            "title": "Bulk URLs (retired field)",
            "type": "array",
            "description": "Retired bulk field. Still read when TikTok URLs and TikTok profiles are both empty. Prefer TikTok URLs.",
            "items": {
              "type": "string"
            }
          },
          "aiTranscript": {
            "title": "AI transcript switch (retired)",
            "type": "boolean",
            "description": "Retired switch replaced by Transcript mode. true means auto, false means captions only. Kept so existing Tasks and API clients behave the same."
          },
          "preferredLanguage": {
            "title": "Preferred caption language (retired)",
            "type": "string",
            "description": "Retired name for Caption language. Used only when Caption language is empty. It selects an existing caption and never translates."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}