{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Video Scraper 🎵",
    "description": "🎵 TikTok Video Scraper extracts watermark-free & watermarked video download URLs, photo slideshow carousels, audio tracks, post text, author profiles, follower stats, engagement counts, hashtags, closed caption transcriptions, and technical media metadata with permanent Key-Value download links.",
    "version": "1.0",
    "x-build-id": "a2ArK29FXU6g0hcSD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/premiumscraper~tiktok-video-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-premiumscraper-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/premiumscraper~tiktok-video-scraper/runs": {
      "post": {
        "operationId": "runs-sync-premiumscraper-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/premiumscraper~tiktok-video-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-premiumscraper-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",
        "properties": {
          "urls": {
            "title": "TikTok Video / Photo URLs",
            "type": "array",
            "description": "Enter TikTok URLs (one per line). Supports both redirect mobile URLs and full post links.",
            "items": {
              "type": "string"
            }
          },
          "proxyCountry": {
            "title": "🌍 Proxy Exit Country",
            "enum": [
              "US",
              "GB",
              "AU",
              "CA",
              "DE",
              "FR",
              "NL",
              "IT",
              "ES",
              "SE",
              "NO",
              "DK",
              "FI",
              "BE",
              "AT",
              "CH",
              "IE",
              "PL",
              "PT",
              "CZ",
              "HU",
              "RO",
              "GR",
              "JP",
              "KR",
              "SG",
              "IN",
              "BD",
              "PK",
              "ID",
              "PH",
              "VN",
              "TH",
              "MY",
              "AE",
              "SA",
              "EG",
              "ZA",
              "NG",
              "BR",
              "MX",
              "AR",
              "CL",
              "CO",
              "PE",
              "NZ",
              "TR"
            ],
            "type": "string",
            "description": "Choose the residential proxy exit country for public requests.",
            "default": "CA"
          },
          "keyValueStorePrefix": {
            "title": "🏷️ Key-Value Store Name / Prefix",
            "type": "string",
            "description": "Enter a custom Key-Value Store Name (e.g. `Cristiano` or `my-store_1`). ⚠️ RULES: Only letters (a-z, A-Z), numbers (0-9), hyphens (-), and underscores (_) allowed (max 63 chars). Spaces and special characters (!@#$) are NOT allowed. Unsupported names log a warning and fall back to default unnamed storage."
          },
          "storeVideo": {
            "title": "💾 Store Video in Storage (Permanent Download Links)",
            "type": "boolean",
            "description": "If ON, downloads both Watermark-Free and Watermarked videos to Apify Key-Value Storage and returns permanent, non-expiring public download URLs (`kvs_video_url_no_watermark`, `kvs_video_url_watermarked`). Original expiring TikTok CDN video links are excluded. If OFF, media is not saved to storage, keeping raw expiring CDN links in output.",
            "default": true
          },
          "storeMusic": {
            "title": "🎵 Store Music in Storage (Permanent Audio Link)",
            "type": "boolean",
            "description": "If ON, downloads the background music track to Apify Key-Value Storage and returns a permanent, non-expiring public download URL (`kvs_download_url`). Original expiring audio CDN playUrl is excluded. If OFF, audio is not saved to storage.",
            "default": true
          },
          "storePhotos": {
            "title": "📸 Store Slideshow Photos in Storage (Permanent Image Links)",
            "type": "boolean",
            "description": "If ON, downloads all photo slideshow carousel images to Apify Key-Value Storage and returns permanent, non-expiring public download URLs for every photo. Original expiring image CDN links are excluded. If OFF, photos are not saved.",
            "default": true
          },
          "includeVideoMetadata": {
            "title": "📊 Include Video Technical Metadata",
            "type": "boolean",
            "description": "Extract advanced video parameters (codec name, width, height, resolution, fps, bitrate, container format) and save under `video_additional_metadata`. ⚠️ Only works when 'Store Video in Storage' is ON.",
            "default": false
          },
          "includeMusicMetadata": {
            "title": "📊 Include Music Technical Metadata",
            "type": "boolean",
            "description": "Extract advanced audio parameters (codec name, sample rate, audio channels, bitrate, duration) and save under `music_additional_metadata`. ⚠️ Only works when 'Store Music in Storage' is ON.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}