{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Video & Shorts Downloader",
    "description": "Download YouTube videos and Shorts in MP4, WebM, MKV and more. Choose quality up to 4K, secure hosted download links with retention, structured JSON metadata, optional tags, chapters and transcripts. Preview costs in Estimate mode.",
    "version": "0.0",
    "x-build-id": "wWlKY1v9W1d97KFZ6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/calm_builder~youtube-video-shorts-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-calm_builder-youtube-video-shorts-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/calm_builder~youtube-video-shorts-downloader/runs": {
      "post": {
        "operationId": "runs-sync-calm_builder-youtube-video-shorts-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/calm_builder~youtube-video-shorts-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-calm_builder-youtube-video-shorts-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": [
          "videoUrls"
        ],
        "properties": {
          "runMode": {
            "title": "Run mode",
            "enum": [
              "process",
              "estimate"
            ],
            "type": "string",
            "description": "**Process** downloads videos and bills only for successful deliveries. **Estimate** analyzes videos and returns projected charges without downloading or billing. Estimated costs are calculated from metadata (size, retention, options) and the actual run may differ slightly.",
            "default": "process"
          },
          "videoUrls": {
            "title": "YouTube links",
            "type": "array",
            "description": "One link per row. You can mix regular videos and Shorts in the same run.",
            "items": {
              "type": "string"
            }
          },
          "videoQuality": {
            "title": "Video quality",
            "enum": [
              "best",
              "2160p",
              "1440p",
              "1080p",
              "720p",
              "480p",
              "360p",
              "240p",
              "144p"
            ],
            "type": "string",
            "description": "Maximum resolution to download (priority). Choose **Best available** for the highest resolution offered. For a specific resolution, that height is preferred; if unavailable, the next best lower resolution is used.",
            "default": "480p"
          },
          "videoBitrate": {
            "title": "Video bitrate",
            "enum": [
              "best",
              "balanced",
              "smallest"
            ],
            "type": "string",
            "description": "Within the selected resolution, choose stream size and quality.\n\n- **Best quality** — highest bitrate available at that resolution\n- **Balanced** — good quality with a more efficient file size\n- **Smallest file** — smallest file at that resolution (lowest cost)\n\nResolution is always applied first. If your selected resolution is unavailable, the next best lower resolution is used.",
            "default": "balanced"
          },
          "videoCountry": {
            "title": "Video country",
            "enum": [
              "AF",
              "AL",
              "DZ",
              "AS",
              "AD",
              "AO",
              "AI",
              "AG",
              "AR",
              "AM",
              "AW",
              "AU",
              "AT",
              "AZ",
              "BS",
              "BH",
              "BD",
              "BB",
              "BY",
              "BE",
              "BZ",
              "BJ",
              "BM",
              "BT",
              "BO",
              "BQ",
              "BA",
              "BW",
              "BR",
              "BN",
              "BG",
              "BF",
              "BI",
              "KH",
              "CM",
              "CA",
              "CV",
              "KY",
              "CF",
              "TD",
              "CL",
              "CN",
              "CO",
              "KM",
              "CG",
              "CR",
              "HR",
              "CU",
              "CW",
              "CY",
              "CZ",
              "CD",
              "DK",
              "DJ",
              "DM",
              "DO",
              "EC",
              "EG",
              "SV",
              "GQ",
              "ER",
              "EE",
              "ET",
              "FK",
              "FJ",
              "FI",
              "FR",
              "GF",
              "PF",
              "GA",
              "GM",
              "GE",
              "DE",
              "GH",
              "GI",
              "GR",
              "GL",
              "GD",
              "GP",
              "GU",
              "GT",
              "GG",
              "GN",
              "GW",
              "GY",
              "HT",
              "HN",
              "HK",
              "HU",
              "IS",
              "IN",
              "ID",
              "IR",
              "IQ",
              "IE",
              "IM",
              "IL",
              "IT",
              "CI",
              "JM",
              "JP",
              "JE",
              "JO",
              "KZ",
              "KE",
              "XK",
              "KW",
              "KG",
              "LA",
              "LV",
              "LB",
              "LS",
              "LR",
              "LY",
              "LI",
              "LT",
              "LU",
              "MO",
              "MK",
              "MG",
              "MW",
              "MY",
              "MV",
              "ML",
              "MT",
              "MQ",
              "MR",
              "MU",
              "YT",
              "MX",
              "MD",
              "MC",
              "MN",
              "ME",
              "MS",
              "MA",
              "MZ",
              "MM",
              "NA",
              "NP",
              "NL",
              "NC",
              "NZ",
              "NI",
              "NE",
              "NG",
              "MP",
              "NO",
              "OM",
              "PK",
              "PS",
              "PA",
              "PG",
              "PY",
              "PE",
              "PH",
              "PL",
              "PT",
              "PR",
              "QA",
              "RO",
              "RU",
              "RW",
              "RE",
              "SH",
              "KN",
              "LC",
              "MF",
              "VC",
              "WS",
              "SM",
              "ST",
              "SA",
              "SN",
              "RS",
              "SC",
              "SL",
              "SG",
              "SX",
              "SK",
              "SI",
              "SO",
              "ZA",
              "KR",
              "SS",
              "ES",
              "LK",
              "SD",
              "SR",
              "SZ",
              "SE",
              "CH",
              "SY",
              "TW",
              "TJ",
              "TZ",
              "TH",
              "TL",
              "TG",
              "TO",
              "TT",
              "TN",
              "TR",
              "TM",
              "TC",
              "UG",
              "UA",
              "AE",
              "GB",
              "US",
              "UY",
              "UZ",
              "VU",
              "VE",
              "VN",
              "VG",
              "VI",
              "WF",
              "YE",
              "ZM",
              "ZW"
            ],
            "type": "string",
            "description": "Country used to access the video. Choose the country where the video is available if it is blocked in some regions.",
            "default": "US"
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "mp4",
              "webm",
              "mkv",
              "mov",
              "avi",
              "flv"
            ],
            "type": "string",
            "description": "File format for the downloaded video. Each file includes both video and audio.\n\n- **MP4** — works on most phones, browsers, and editors\n- **WebM** — common for web playback, often smaller files\n- **MKV** — flexible format, good for archiving\n- **MOV** — suited for Apple devices and video editing\n- **AVI** — older format for legacy software\n- **FLV** — older streaming format, rarely needed today",
            "default": "mp4"
          },
          "storageRetention": {
            "title": "File storage duration",
            "enum": [
              "1d",
              "3d",
              "1w",
              "2w",
              "1m",
              "3m",
              "6m"
            ],
            "type": "string",
            "description": "How long your video download links stay active, from **1 day** to **6 months**.",
            "default": "1w"
          },
          "includeDetailedInfo": {
            "title": "Include detailed video information",
            "type": "boolean",
            "description": "Adds extra watch-page details when available, such as **chapters**, **tags**, **keywords**, **category**, **caption availability**, and **other metadata rows**. Best suited for regular videos; Shorts may return fewer fields.",
            "default": false
          },
          "includeTranscript": {
            "title": "Include transcript",
            "type": "boolean",
            "description": "Download captions or transcripts alongside the video. Transcript files are saved with your run; video files are delivered via download links in the dataset.",
            "default": false
          },
          "transcriptLanguage": {
            "title": "Transcript language",
            "enum": [
              "auto",
              "ar",
              "bn",
              "de",
              "en",
              "es",
              "fa",
              "fr",
              "hi",
              "id",
              "it",
              "ja",
              "ko",
              "nl",
              "pl",
              "pt",
              "ru",
              "th",
              "tr",
              "uk",
              "ur",
              "vi",
              "zh-Hans",
              "zh-Hant"
            ],
            "type": "string",
            "description": "Preferred transcript language. If unavailable, the video's original language is tried first, then English, then any available language.",
            "default": "auto"
          },
          "transcriptFormat": {
            "title": "Transcript format",
            "enum": [
              "json",
              "txt",
              "srt",
              "vtt"
            ],
            "type": "string",
            "description": "Format for the saved transcript file.\n\n- **JSON** — structured with timestamps\n- **TXT** — plain text\n- **SRT** — subtitles with timestamps\n- **VTT** — web subtitles with timestamps",
            "default": "json"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}