{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Video, Shorts, Audio & Transcript Downloader",
    "description": "Download YouTube videos, Shorts, playlists, and channels in any quality (144p–4K) and format. Extract audio as MP3, M4A, or Opus. Download subtitles and transcripts in any language. Transcript-only mode at $0.001/video. Geo-restrictions handled automatically. No monthly fee.",
    "version": "1.0",
    "x-build-id": "eNRWyV1DOaDqor0Eg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datapipe~youtube-video-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datapipe-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/datapipe~youtube-video-downloader/runs": {
      "post": {
        "operationId": "runs-sync-datapipe-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/datapipe~youtube-video-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-datapipe-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": {
          "videoUrls": {
            "title": "Video URLs",
            "type": "array",
            "description": "Individual YouTube video or Shorts URLs to download.",
            "items": {
              "type": "string"
            }
          },
          "playlistUrls": {
            "title": "Playlist / Channel URLs",
            "type": "array",
            "description": "YouTube playlist or channel URLs. All videos will be downloaded.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerPlaylist": {
            "title": "Max Videos Per Playlist",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of videos to download per playlist or channel. Leave empty to download all."
          },
          "subtitlesOnly": {
            "title": "Subtitles Only (No Video)",
            "type": "boolean",
            "description": "Skip the video download entirely and return only subtitles/transcript text. Ideal for transcript extraction pipelines.",
            "default": false
          },
          "includeSubtitles": {
            "title": "Include Subtitles",
            "type": "boolean",
            "description": "Download subtitle files alongside the video. Subtitle URLs and transcript text are added to the output.",
            "default": false
          },
          "subtitleLanguages": {
            "title": "Subtitle Language",
            "enum": [
              "auto",
              "af",
              "sq",
              "am",
              "ar",
              "hy",
              "az",
              "eu",
              "be",
              "bn",
              "bs",
              "bg",
              "ca",
              "ceb",
              "zh-Hans",
              "zh-Hant",
              "co",
              "hr",
              "cs",
              "da",
              "nl",
              "en",
              "eo",
              "et",
              "fi",
              "fr",
              "fy",
              "gl",
              "ka",
              "de",
              "el",
              "gu",
              "ht",
              "ha",
              "haw",
              "iw",
              "hi",
              "hmn",
              "hu",
              "is",
              "ig",
              "id",
              "ga",
              "it",
              "ja",
              "jv",
              "kn",
              "kk",
              "km",
              "rw",
              "ko",
              "ku",
              "ky",
              "lo",
              "lv",
              "lt",
              "lb",
              "mk",
              "mg",
              "ms",
              "ml",
              "mt",
              "mi",
              "mr",
              "mn",
              "my",
              "ne",
              "no",
              "ny",
              "or",
              "ps",
              "fa",
              "pl",
              "pt",
              "pa",
              "ro",
              "ru",
              "sm",
              "gd",
              "sr",
              "st",
              "sn",
              "sd",
              "si",
              "sk",
              "sl",
              "so",
              "es",
              "su",
              "sw",
              "sv",
              "tl",
              "tg",
              "ta",
              "tt",
              "te",
              "th",
              "tr",
              "tk",
              "uk",
              "ur",
              "ug",
              "uz",
              "vi",
              "cy",
              "xh",
              "yi",
              "yo",
              "zu"
            ],
            "type": "string",
            "description": "Language to download captions for. 'Auto-detect' detects the video's language and downloads whatever captions exist (manual preferred, auto-generated as fallback). A specific language code downloads captions in that exact language — if unavailable the record will include an error and the list of available languages.",
            "default": "auto"
          },
          "subtitleFormat": {
            "title": "Subtitle Format",
            "enum": [
              "srt",
              "vtt",
              "ass"
            ],
            "type": "string",
            "description": "Output format for subtitle files.",
            "default": "srt"
          },
          "captionOutput": {
            "title": "Caption Output",
            "enum": [
              "both",
              "subtitleFile",
              "transcript"
            ],
            "type": "string",
            "description": "What to include in the output when captions are enabled.",
            "default": "both"
          },
          "quality": {
            "title": "Video Quality",
            "enum": [
              "best",
              "2160p",
              "1440p",
              "1080p",
              "720p",
              "480p",
              "360p",
              "240p",
              "144p"
            ],
            "type": "string",
            "description": "Maximum video quality to download.",
            "default": "1080p"
          },
          "format": {
            "title": "Output Format",
            "enum": [
              "mp4",
              "webm",
              "mkv",
              "mp3",
              "m4a",
              "opus"
            ],
            "type": "string",
            "description": "Output format. Use mp3, m4a, or opus for audio-only extraction.",
            "default": "mp4"
          },
          "maxConcurrency": {
            "title": "Max Concurrent Downloads",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of videos to download simultaneously. Higher values are faster but use more memory.",
            "default": 5
          },
          "includeThumbnail": {
            "title": "Include Thumbnail",
            "type": "boolean",
            "description": "Add the video thumbnail URL to the output.",
            "default": false
          },
          "includeStats": {
            "title": "Include Stats",
            "type": "boolean",
            "description": "Add view count, like count, and comment count to the output.",
            "default": false
          },
          "includeDescription": {
            "title": "Include Description",
            "type": "boolean",
            "description": "Add the full video description to the output.",
            "default": false
          },
          "includeChannelInfo": {
            "title": "Include Channel Info",
            "type": "boolean",
            "description": "Add channel name, channel URL, and upload date to the output.",
            "default": false
          },
          "includeTechnicalInfo": {
            "title": "Include Technical Info",
            "type": "boolean",
            "description": "Add codec, fps, and bitrate details to the output.",
            "default": false
          },
          "includeTags": {
            "title": "Include Tags & Categories",
            "type": "boolean",
            "description": "Add tags and categories to the output.",
            "default": false
          },
          "cookiesText": {
            "title": "Cookies (Netscape format)",
            "type": "string",
            "description": "YouTube cookies in Netscape format for downloading age-restricted videos. Export using a browser extension like 'Get cookies.txt LOCALLY'."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}