{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Video Scraper",
    "description": "Tired of copying TikTok stats by hand? Paste any video URL and get captions, hashtags, views, likes, comments, shares, author and music data, plus watermark-free video downloads and transcripts. Export JSON, CSV or Excel. No login or cookies.",
    "version": "1.0",
    "x-build-id": "PzN3v6b08O1xAJmhX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawl_craft~tiktok-video-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawl_craft-tiktok-video-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/crawl_craft~tiktok-video-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawl_craft-tiktok-video-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/crawl_craft~tiktok-video-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawl_craft-tiktok-video-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",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "🎬 TikTok video URLs",
            "minItems": 1,
            "type": "array",
            "description": "One or more TikTok posts to scrape, one per line. Accepted: full video or photo URLs (https://www.tiktok.com/@user/video/123...), embed URLs, vm.tiktok.com / vt.tiktok.com short links, bare post IDs, or a link to a .txt file with one URL per line. Bulk input is supported: paste as many as you like. Free plan users get up to 10 results per run; paid plans have no limit.",
            "items": {
              "type": "string"
            }
          },
          "scrapeRelatedVideos": {
            "title": "🧲 Scrape related videos",
            "type": "boolean",
            "description": "Also collect the videos TikTok recommends next to each post. How many is set by the number of related videos per post below. Each related video is a separate result.",
            "default": false
          },
          "resultsPerPage": {
            "title": "💯 Number of related videos per post",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "How many related videos to collect for each post URL. Used only when Scrape related videos is on. Free plan users get up to 10 results per run in total (your posts plus their related videos); paid plans have no limit.",
            "default": 1
          },
          "enrichRelatedVideos": {
            "title": "✨ Full details for related videos",
            "type": "boolean",
            "description": "On: every related video gets the same full details as your own posts (location, subtitles, complete stats). Off: related videos are saved faster with shorter details (full details are always loaded when downloads or subtitles are switched on).",
            "default": true
          },
          "shouldDownloadVideos": {
            "title": "📹 Download videos",
            "type": "boolean",
            "description": "Save each video file to your Apify storage. The dataset field mediaUrls (and videoMeta.downloadAddr) then links to the stored copy, which does not expire like TikTok's own links. Increases run time and storage use.",
            "default": false
          },
          "videoDownloadQuality": {
            "title": "💎 Video download quality",
            "enum": [
              "best",
              "lowest",
              "original"
            ],
            "type": "string",
            "description": "Which version of the video to download. Best: highest quality without the TikTok watermark. Lowest: the smallest file (fastest). Original: TikTok's own Save video file with watermark when TikTok offers it; for videos where TikTok does not (or the creator turned downloads off), the Best quality file is saved instead.",
            "default": "best"
          },
          "shouldDownloadCovers": {
            "title": "🌄 Download cover images",
            "type": "boolean",
            "description": "Save each post's cover image (thumbnail) to your Apify storage. Increases run time and storage use.",
            "default": false
          },
          "shouldDownloadSlideshowImages": {
            "title": "📸 Download slideshow images",
            "type": "boolean",
            "description": "Save every image of photo slideshow posts to your Apify storage. Increases run time and storage use.",
            "default": false
          },
          "shouldDownloadMusic": {
            "title": "🎧 Download music",
            "type": "boolean",
            "description": "Save the sound used in each post (audio file) to your Apify storage.",
            "default": false
          },
          "videoKvStoreIdOrName": {
            "title": "📦 Storage name for media files",
            "pattern": "^[a-zA-Z0-9-]+$",
            "type": "string",
            "description": "Name (or ID) of the key-value store where downloaded files go. Leave empty to use the run's default storage. A named store keeps your files until you delete it, so they are not removed by data retention. Letters, digits and hyphens only, no spaces."
          },
          "downloadSubtitlesOptions": {
            "title": "💬 Subtitles & transcription mode",
            "enum": [
              "NEVER_DOWNLOAD_SUBTITLES",
              "DOWNLOAD_SUBTITLES",
              "DOWNLOAD_AND_TRANSCRIBE_VIDEOS_WITHOUT_SUBTITLES",
              "TRANSCRIBE_ALL_VIDEOS"
            ],
            "type": "string",
            "description": "Choose how to handle subtitles. TikTok provides subtitles for some videos. Transcription turns the spoken audio of a video into text with a speech-to-text model; it takes extra time per video.",
            "default": "NEVER_DOWNLOAD_SUBTITLES"
          },
          "subtitleLanguages": {
            "title": "🌍 Subtitle languages",
            "type": "array",
            "description": "Only keep subtitles in these languages, for example en or es (one per line). Leave empty to keep every language TikTok offers.",
            "items": {
              "type": "string"
            }
          },
          "transcriptionModel": {
            "title": "🧠 Speech-to-text model",
            "enum": [
              "tiny",
              "base",
              "small",
              "medium",
              "large-v3",
              "distil-large-v3"
            ],
            "type": "string",
            "description": "Model used when a video is transcribed. Bigger models are more accurate but slower. Medium and larger models need more memory: raise the run memory to 4 GB or more before using them.",
            "default": "base"
          },
          "transcriptionLanguage": {
            "title": "🔤 Transcription language",
            "enum": [
              "auto",
              "en",
              "es",
              "pt",
              "fr",
              "de",
              "it",
              "nl",
              "ru",
              "uk",
              "pl",
              "cs",
              "ro",
              "hu",
              "el",
              "tr",
              "ar",
              "fa",
              "he",
              "hi",
              "bn",
              "ur",
              "ta",
              "te",
              "id",
              "ms",
              "tl",
              "vi",
              "th",
              "ja",
              "ko",
              "zh",
              "sv",
              "da",
              "no",
              "fi"
            ],
            "type": "string",
            "description": "Language spoken in the videos. Auto-detect works for most videos; pick a language when detection gets it wrong (for example very short or noisy clips).",
            "default": "auto"
          },
          "shouldGetTranscript": {
            "title": "📜 Get transcript",
            "type": "boolean",
            "description": "Shortcut kept for compatibility: when on and the subtitles mode is 'Don't download subtitles', TikTok's subtitles are downloaded.",
            "default": false
          },
          "scrapeAuthorProfile": {
            "title": "👤 Full author profile details",
            "type": "boolean",
            "description": "Add the author's profile details to every result: bio link, shop status, region, language and exact follower and like counts.",
            "default": true
          },
          "resolvePinnedStatus": {
            "title": "📌 Detect pinned videos",
            "type": "boolean",
            "description": "Find out whether each video is pinned on its author's profile (field isPinned). When off, isPinned stays empty.",
            "default": true
          },
          "customMapFunction": {
            "title": "🧩 Custom map function",
            "type": "string",
            "description": "Optional Python lambda or function that reshapes each result before it is saved, for example: lambda r: {'id': r['id'], 'plays': r['playCount']}. Return None to drop a result. Keys that also exist in the standard output must keep their type (for example author stays an object, playCount stays a number); use new key names for anything else. Leave empty to save results unchanged."
          },
          "maxConcurrency": {
            "title": "🚀 Videos in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many post URLs (and related videos) are processed at the same time. Higher is faster.",
            "default": 4
          },
          "maxRetries": {
            "title": "🔁 Retries per request",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many times a failed request is tried again before the video is reported as failed.",
            "default": 3
          },
          "requestDelaySecs": {
            "title": "⏳ Delay between requests",
            "minimum": 0,
            "maximum": 30,
            "type": "number",
            "description": "Pause in seconds before each video lookup. Raise it for a slower, gentler pace.",
            "default": 0
          },
          "requestTimeoutSecs": {
            "title": "⌛ Request timeout",
            "minimum": 10,
            "maximum": 180,
            "type": "integer",
            "description": "How long to wait for TikTok to answer one request.",
            "default": 40
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy configuration",
            "type": "object",
            "description": "Optional. Choose the proxy settings for your run. Leave the default if you are unsure.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}