{
  "description": "Download TikTok videos (clean or watermarked), audio, covers, slideshow frames, and post metadata. Clean MP4 files are downloaded inside a browser session and re-hosted in Apify Key-Value Store; watermarked/direct assets can be re-hosted or returned as expiring CDN URLs.",
  "properties": {
    "assetTypes": {
      "default": [
        "video"
      ],
      "description": "Assets to produce for each post. 'video' = MP4; 'audio' = TikTok sound; 'cover' = cover image; 'slideshow' = ordered photo frames; 'metadata' = post/author/stats/music row.",
      "editor": "select",
      "items": {
        "enum": [
          "video",
          "audio",
          "cover",
          "slideshow",
          "metadata"
        ],
        "enumTitles": [
          "Video (MP4)",
          "Audio",
          "Cover image",
          "Slideshow frames",
          "Metadata"
        ],
        "type": "string"
      },
      "prefill": [
        "video"
      ],
      "title": "Asset Types",
      "type": "array"
    },
    "downloadToKv": {
      "default": true,
      "description": "Store watermarked video, audio, cover, and slideshow files in the run's Key-Value Store and return stable kvsUrl links. Clean video is always stored because its source URL is session-bound. Set false to return expiring CDN URLs only.",
      "prefill": true,
      "title": "Download Files to Apify Key-Value Store",
      "type": "boolean"
    },
    "maxConcurrency": {
      "default": 3,
      "description": "Number of posts processed in parallel (1-3). Embed requests are retried with backoff when TikTok rate-limits them.",
      "maximum": 3,
      "minimum": 1,
      "prefill": 1,
      "title": "Max Concurrency",
      "type": "integer"
    },
    "maxFileSizeMb": {
      "default": 100,
      "description": "Per-file size cap. Files above the cap produce a 'too_large' status row instead of a partial download.",
      "maximum": 100,
      "minimum": 1,
      "prefill": 100,
      "title": "Max File Size (MB)",
      "type": "integer"
    },
    "maxItems": {
      "default": 1000,
      "description": "Maximum number of unique posts to process. Inputs beyond the cap receive a 'limit_reached' status row.",
      "maximum": 1000,
      "minimum": 1,
      "prefill": 1,
      "title": "Max Posts",
      "type": "integer"
    },
    "postUrls": {
      "description": "TikTok post URLs or IDs. Accepts /@user/video/ID, /@user/photo/ID, /video/ID, /photo/ID, embed URLs (/embed/v2/ID), vm.tiktok.com / vt.tiktok.com / /t/ short links, m.tiktok.com/v/ID.html, and bare numeric post IDs. Duplicates are processed once.",
      "editor": "stringList",
      "items": {
        "type": "string"
      },
      "prefill": [
        "https://www.tiktok.com/@nba/video/7693329153680035102"
      ],
      "title": "Post URLs",
      "type": "array"
    },
    "proxyConfiguration": {
      "description": "Optional. The actor uses a direct connection by default and does not require a proxy. Use this only if you want to route requests through Apify Proxy.",
      "editor": "proxy",
      "title": "Proxy Configuration",
      "type": "object"
    },
    "quality": {
      "default": "best",
      "description": "Target clean-video quality. 'best' sorts by resolution first, then bitrate. Watermarked copies are single-resolution.",
      "editor": "select",
      "enum": [
        "best",
        "1080p",
        "720p",
        "540p",
        "360p",
        "smallest"
      ],
      "enumTitles": [
        "Best (highest resolution)",
        "1080p",
        "720p",
        "540p",
        "360p",
        "Smallest file"
      ],
      "prefill": "540p",
      "title": "Video Quality",
      "type": "string"
    },
    "videoVariant": {
      "default": "clean",
      "description": "'clean' = no-watermark MP4 (requires a same-page browser session and is always re-hosted). 'watermarked' = logo copy, usable as an expiring CDN URL. 'both' = one row per variant.",
      "editor": "select",
      "enum": [
        "clean",
        "watermarked",
        "both"
      ],
      "enumTitles": [
        "Clean (no watermark)",
        "Watermarked",
        "Both variants"
      ],
      "prefill": "clean",
      "title": "Video Variant",
      "type": "string"
    }
  },
  "required": [
    "postUrls"
  ],
  "schemaVersion": 1,
  "title": "TikTok Downloader API Input",
  "type": "object"
}
