{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Video Downloader",
    "description": "Download TikTok videos as MP4 from post URLs or short links. Get permanent re-hosted download links in Apify storage, AWS S3, Google Cloud, DigitalOcean Spaces or Azure, plus title and cover.",
    "version": "1.1",
    "x-build-id": "QlVyljSwqd2p6G79h"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parsebird~tiktok-video-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parsebird-tiktok-video-downloader",
        "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/parsebird~tiktok-video-downloader/runs": {
      "post": {
        "operationId": "runs-sync-parsebird-tiktok-video-downloader",
        "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/parsebird~tiktok-video-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-parsebird-tiktok-video-downloader",
        "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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "TikTok video URLs",
            "type": "array",
            "description": "Add TikTok post URLs, one per line. Canonical video/photo URLs and short links (vt.tiktok.com, vm.tiktok.com, tiktok.com/t/…) are supported; short links are resolved automatically.",
            "items": {
              "type": "string"
            }
          },
          "region": {
            "title": "Region",
            "pattern": "^([A-Za-z]{2})?$",
            "type": "string",
            "description": "Optional two-letter country code (e.g. US, DE). Fetches the video through an Apify Proxy IP in that country, so TikTok serves it from its CDN for that location. Leave empty for automatic."
          },
          "maxItems": {
            "title": "Max videos",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of videos to download (and be charged for) in this run. Leave empty for no limit."
          },
          "storageType": {
            "title": "Storage",
            "enum": [
              "apify",
              "aws",
              "gcp",
              "digitalocean",
              "azure"
            ],
            "type": "string",
            "description": "Where downloaded videos are delivered. Apify storage needs no setup. For your own cloud, fill in the matching section below.",
            "default": "apify"
          },
          "s3AccessKeyId": {
            "title": "S3 access key ID",
            "type": "string",
            "description": "Access key ID of an IAM user allowed to call s3:PutObject on the bucket."
          },
          "s3SecretAccessKey": {
            "title": "S3 secret access key",
            "type": "string",
            "description": "Secret access key for the access key ID above."
          },
          "s3Region": {
            "title": "S3 region",
            "type": "string",
            "description": "Bucket region, e.g. us-east-1."
          },
          "s3Bucket": {
            "title": "S3 bucket",
            "type": "string",
            "description": "Bucket name."
          },
          "s3Path": {
            "title": "S3 path (optional)",
            "type": "string",
            "description": "Folder prefix inside the bucket, e.g. tiktok/videos."
          },
          "googleCloudProjectId": {
            "title": "Google Cloud project ID",
            "type": "string",
            "description": "ID of the project that owns the bucket."
          },
          "googleCloudServiceKeyJson": {
            "title": "Service account key (JSON)",
            "type": "string",
            "description": "Paste the full JSON key file of a service account with permission to create objects in the bucket (e.g. Storage Object Creator)."
          },
          "googleCloudBucketName": {
            "title": "Bucket name",
            "type": "string",
            "description": "Google Cloud Storage bucket name."
          },
          "googleCloudPath": {
            "title": "Path (optional)",
            "type": "string",
            "description": "Folder prefix inside the bucket."
          },
          "digitalOceanAccessKeyId": {
            "title": "Spaces access key",
            "type": "string",
            "description": "DigitalOcean Spaces access key."
          },
          "digitalOceanSecretAccessKey": {
            "title": "Spaces secret key",
            "type": "string",
            "description": "Secret key for the Spaces access key above."
          },
          "digitalOceanRegion": {
            "title": "Spaces region",
            "type": "string",
            "description": "Region slug of the Space, e.g. nyc3, fra1, sgp1."
          },
          "digitalOceanBucketName": {
            "title": "Space name",
            "type": "string",
            "description": "Name of the Space (bucket)."
          },
          "digitalOceanEndpoint": {
            "title": "Endpoint (optional)",
            "type": "string",
            "description": "Custom endpoint. Defaults to https://{region}.digitaloceanspaces.com."
          },
          "digitalOceanAcl": {
            "title": "File access (optional)",
            "enum": [
              "private",
              "public-read"
            ],
            "type": "string",
            "description": "Access level for uploaded files. Public read makes the download link open in any browser."
          },
          "digitalOceanPath": {
            "title": "Path (optional)",
            "type": "string",
            "description": "Folder prefix inside the Space."
          },
          "azureAccountName": {
            "title": "Storage account name",
            "type": "string",
            "description": "Azure storage account name."
          },
          "azureAccountKey": {
            "title": "Account key",
            "type": "string",
            "description": "Access key of the storage account."
          },
          "azureContainerName": {
            "title": "Container name",
            "type": "string",
            "description": "Blob container to upload into."
          },
          "azurePath": {
            "title": "Path (optional)",
            "type": "string",
            "description": "Folder prefix inside the container."
          },
          "customMapFunction": {
            "title": "Custom map function",
            "type": "string",
            "description": "Optional JavaScript function applied to each output item before it is saved, e.g. <code>(object) => { return { url: object.downloadUrl, status: object.status } }</code>."
          },
          "outputConnector": {
            "title": "Send results to Notion, Todoist, …",
            "type": "string",
            "description": "Optional MCP connector to deliver the results to. Authorize it first in Apify Console → Settings → API & Integrations → MCP connectors."
          },
          "deliverTarget": {
            "title": "Destination target",
            "type": "string",
            "description": "URL or ID of where the connector writes. Notion: a page URL (a typed database is created for you) or an existing database URL. Todoist: a project URL or ID. Some services need none."
          },
          "deliverMode": {
            "title": "Write mode",
            "enum": [
              "perPost",
              "summary"
            ],
            "type": "string",
            "description": "perPost writes one record per video; summary writes a single roll-up for the run.",
            "default": "perPost"
          },
          "deliverMaxItems": {
            "title": "Max records to deliver",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap on how many records perPost delivers (ignored in summary mode)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}