{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Downloader Pro - Video, Audio & Subtitles",
    "description": "Download a YouTube video as MP4, its audio on its own, or its captions as SRT. The file lands in the run's storage with a direct link and a checksum. Only ask for videos you have the right to download. $0.005 per MB on the Free plan, less on paid plans.",
    "version": "0.1",
    "x-build-id": "Bbvotg2e1F5GyZjWo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dami_studio~youtube-video-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dami_studio-youtube-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/dami_studio~youtube-video-downloader/runs": {
      "post": {
        "operationId": "runs-sync-dami_studio-youtube-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/dami_studio~youtube-video-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-dami_studio-youtube-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",
        "properties": {
          "urls": {
            "title": "YouTube URLs",
            "type": "array",
            "description": "One or more YouTube links: videos (watch, Shorts, youtu.be, live, embed or mobile links, or bare video ids), playlists, or channels (@handle or channel links). A playlist or channel gives its first videos, up to 'Max videos per playlist or channel'. Clip links are skipped and add nothing to the bill; a video link copied from inside a playlist gives you that one video.",
            "items": {
              "type": "string"
            }
          },
          "videoUrl": {
            "title": "Single URL",
            "type": "string",
            "description": "A single YouTube URL (alternative to the array)."
          },
          "maxVideos": {
            "title": "Max videos per playlist or channel",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many videos to download from each playlist or channel link, from the top of the list (a channel's newest first). Each one is billed per megabyte like a single video, and the run also stops at your spending limit.",
            "default": 10
          },
          "quality": {
            "title": "Max quality",
            "enum": [
              "audio",
              "144",
              "240",
              "360",
              "480",
              "720",
              "1080",
              "1440",
              "2160",
              "4320"
            ],
            "type": "string",
            "description": "Video quality to download, measured on the short side of the picture - 720 means 1280x720 for landscape video and 720x1280 for a vertical Short. Choose 'audio' for the audio only (MP3 unless you pick another audio format). 1440p, 4K and 8K are delivered when the source provides them, otherwise the next best quality is used. You are billed per megabyte delivered, so higher qualities cost proportionally more - raise maxMegabytes for 4K/8K.",
            "default": "720"
          },
          "audioOnly": {
            "title": "Audio only",
            "type": "boolean",
            "description": "Download the audio instead of the video, as MP3 unless you pick another audio format.",
            "default": false
          },
          "audioFormat": {
            "title": "Audio format",
            "enum": [
              "mp3",
              "m4a",
              "opus"
            ],
            "type": "string",
            "description": "Used for audio downloads. MP3 is converted from YouTube's audio track. M4A and Opus are the tracks YouTube already serves, saved as they are, with no conversion. If a video has no track in the format you pick, you get MP3 and the row says so.",
            "default": "mp3"
          },
          "audioLanguage": {
            "title": "Audio language",
            "type": "string",
            "description": "Optional. For videos that carry more than one audio track (dubbed videos): a language code such as es, de or pt-BR picks that track, for video and audio downloads alike. If the video has no track in that language you get its default track, and the row says so. Leave empty for the default track."
          },
          "subtitles": {
            "title": "Download subtitles",
            "type": "boolean",
            "description": "Also fetch subtitles/auto-captions as SRT.",
            "default": false
          },
          "subLangs": {
            "title": "Subtitle languages",
            "type": "string",
            "description": "Comma-separated subtitle language codes (e.g. en,es). Used when subtitles are on.",
            "default": "en"
          },
          "includeMetadata": {
            "title": "Include metadata",
            "type": "boolean",
            "description": "Return title, channel, duration, views, etc.",
            "default": true
          },
          "fileNameFromTitle": {
            "title": "Name files from the video title",
            "type": "boolean",
            "description": "Name each stored file from the video's title, followed by the video id so names never clash (for example Me-at-the-zoo_jNQXAC9IVRw.mp4). Letters and digits only, up to 80 characters of title. Off: files are named by the video id.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Leave this alone unless you need the run to go out through a particular network. Your own proxy servers are used exactly as given.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxMegabytes": {
            "title": "Max megabytes per video",
            "type": "integer",
            "description": "Safety limit per video. A video estimated above this size is skipped before anything downloads and adds nothing to the bill. 4K and 8K files are large - raise this (e.g. 5000) to allow them. One file can be at most 20,000 MB (about 20 GB), whatever you set here.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}