{
  "openapi": "3.0.1",
  "info": {
    "title": "**Social Video Downloader & Transcription & Subtitle**",
    "description": "Downloads & transcription videos or audio from **YouTube**, **TikTok**, **X (Twitter)**, **Facebook**, **Instagram**, and 1000+ other sites. The Actor stores the media files in the key-value store and rich metadata (title, uploader, duration, views, direct download link) in the dataset.",
    "version": "0.0",
    "x-build-id": "n0AHzvBI9FeuWH4Md"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dtrungtin~social-video-downloader-transcription-subtitle/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dtrungtin-social-video-downloader-transcription-subtitle",
        "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/dtrungtin~social-video-downloader-transcription-subtitle/runs": {
      "post": {
        "operationId": "runs-sync-dtrungtin-social-video-downloader-transcription-subtitle",
        "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/dtrungtin~social-video-downloader-transcription-subtitle/run-sync": {
      "post": {
        "operationId": "run-sync-dtrungtin-social-video-downloader-transcription-subtitle",
        "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": [
          "videoUrls"
        ],
        "properties": {
          "videoUrls": {
            "title": "Video URLs",
            "type": "array",
            "description": "Direct URLs of the videos to download. Supports YouTube, TikTok, X (Twitter), Facebook, Instagram, Vimeo, Twitch clips, and 1000+ other sites supported by yt-dlp. One video is downloaded per URL (playlists are not expanded).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "quality": {
            "title": "Video quality",
            "enum": [
              "best",
              "1080",
              "720",
              "480",
              "360"
            ],
            "type": "string",
            "description": "Maximum video resolution to download. Lower resolutions download faster and produce smaller files.",
            "default": "720"
          },
          "audioOnly": {
            "title": "Audio only",
            "type": "boolean",
            "description": "Download only the audio track (kept in its native format, typically M4A or Opus) instead of the full video.",
            "default": false
          },
          "s3Bucket": {
            "title": "S3 bucket",
            "type": "string",
            "description": "Name of the S3 bucket to upload the downloaded files to. Leave empty to keep files only in the Apify key-value store."
          },
          "s3Region": {
            "title": "S3 region",
            "type": "string",
            "description": "AWS region of the bucket, e.g. `us-east-1` or `eu-central-1`.",
            "default": "us-east-1"
          },
          "s3AccessKeyId": {
            "title": "S3 access key ID",
            "type": "string",
            "description": "Access key ID of an IAM user (or S3-compatible credentials) allowed to write to the bucket."
          },
          "s3SecretAccessKey": {
            "title": "S3 secret access key",
            "type": "string",
            "description": "Secret access key belonging to the access key ID above."
          },
          "s3KeyPrefix": {
            "title": "S3 key prefix",
            "type": "string",
            "description": "Optional folder path inside the bucket, e.g. `videos/2026/`."
          },
          "s3Endpoint": {
            "title": "S3 endpoint URL",
            "type": "string",
            "description": "Only for S3-compatible storage: custom endpoint URL, e.g. `https://<account>.r2.cloudflarestorage.com`. Leave empty for AWS S3."
          },
          "s3Only": {
            "title": "Upload only to S3",
            "type": "boolean",
            "description": "Skip storing the media files in the Apify key-value store and keep them only in S3. Saves Apify storage costs; metadata is still pushed to the dataset.",
            "default": false
          },
          "transcribe": {
            "title": "Transcribe audio with AI",
            "type": "boolean",
            "description": "Generate a text transcript of each video using OpenAI's speech-to-text API and add it to the dataset as the `transcript` field.",
            "default": false
          },
          "targetLanguage": {
            "title": "Translate transcript to (optional)",
            "type": "string",
            "description": "Language to translate the transcript into — an ISO code (`en`, `vi`) or a language name (`Spanish`). Adds a `translatedTranscript` field to the dataset, and burned-in captions (when enabled) use the translation."
          },
          "summaryPrompt": {
            "title": "Summarize with AI (optional)",
            "type": "string",
            "description": "Instructions for an AI-generated summary of each video, e.g. `Summarize the key points in 5 bullet points` or `One-paragraph summary in English`. The summary is generated from the transcript with gpt-5.6-luna and added to the dataset as the `summary` field. Requires transcription; leave empty for no summary."
          },
          "subtitledVideo": {
            "title": "Create video with burned-in captions",
            "type": "boolean",
            "description": "Render a second MP4 with the transcript burned in as always-visible captions and link it in the dataset as `subtitledDownloadUrl`. Requires transcription; timestamps force the whisper-1 model ($0.006 per audio minute). Re-encoding makes runs noticeably slower, and the stored megabytes of the subtitled file are charged like the original video. Cannot be combined with audio-only mode.",
            "default": false
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 0,
            "type": "integer",
            "description": "Videos larger than this limit are skipped. Use 0 for no limit.",
            "default": 0
          },
          "downloadTimeoutSecs": {
            "title": "Download timeout (seconds)",
            "minimum": 60,
            "maximum": 86400,
            "type": "integer",
            "description": "Maximum time allowed for downloading a single video before it is marked as failed.",
            "default": 1800
          },
          "downloadRetries": {
            "title": "Retries per video",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "How many times a failed download is retried. Each retry uses a fresh proxy session (new IP address), which resolves most intermittent anti-bot blocks.",
            "default": 2
          },
          "extraYtDlpArgs": {
            "title": "Extra yt-dlp arguments",
            "type": "array",
            "description": "Additional command-line arguments passed to yt-dlp as-is, one per item (e.g. `--extractor-args` and its value as two items). For advanced users — invalid arguments will make all downloads fail.",
            "default": [],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}