{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Video Downloader: MP4, MP3, Subtitles, Whole Channels",
    "description": "Save YouTube videos, Shorts, playlists and whole channels as MP4 (360p to 1080p), MP3 or M4A, with subtitles as VTT and plain text. Pay per minute of the quality delivered; failed videos are free. Clip only the part you need, or save only new videos each day with Slack or webhook alerts.",
    "version": "0.1",
    "x-build-id": "cTGQD9Rm8VxkTiUp0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/first-penguin~youtube-video-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-first-penguin-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/first-penguin~youtube-video-downloader/runs": {
      "post": {
        "operationId": "runs-sync-first-penguin-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/first-penguin~youtube-video-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-first-penguin-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",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "YouTube links or IDs",
            "type": "array",
            "description": "Video URLs or 11-character IDs, Shorts, youtu.be links, YouTube Music links, playlists and channels (@handle, /channel/UC…). Duplicates are removed.",
            "default": [
              "https://www.youtube.com/watch?v=jNQXAC9IVRw"
            ],
            "items": {
              "type": "string"
            }
          },
          "outputFormat": {
            "title": "What to get",
            "enum": [
              "mp4",
              "mp3",
              "m4a",
              "info",
              "subtitles"
            ],
            "type": "string",
            "description": "MP4, MP3 and M4A are charged per minute of what was delivered. Details only and subtitles only are charged per video.",
            "default": "mp4"
          },
          "maxQuality": {
            "title": "Maximum video quality",
            "enum": [
              "360",
              "480",
              "720",
              "1080"
            ],
            "type": "string",
            "description": "The best quality up to this limit is downloaded. You are charged for the quality actually delivered (360p and 480p share the lower price).",
            "default": "720"
          },
          "videoCodec": {
            "title": "Video format",
            "enum": [
              "smallest",
              "h264"
            ],
            "type": "string",
            "description": "Same price either way. AV1/VP9 files are often half the size and play in browsers, VLC, Android and recent Windows, Mac and iPhone. Choose H.264 for older Apple devices and editing software.",
            "default": "smallest"
          },
          "maxVideosPerSource": {
            "title": "Videos per playlist or channel",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Newest videos taken from each playlist or channel link.",
            "default": 20
          },
          "sectionStartSeconds": {
            "title": "Clip start (seconds)",
            "minimum": 0,
            "type": "integer",
            "description": "Download only part of each video, starting here. You pay only for the length of the clip."
          },
          "sectionEndSeconds": {
            "title": "Clip end (seconds)",
            "minimum": 1,
            "type": "integer",
            "description": "End of the clip. Leave empty to go to the end of the video."
          },
          "includeSubtitles": {
            "title": "Add subtitles to downloads",
            "type": "boolean",
            "description": "Also save subtitles as VTT and put the plain text in the row. Free with MP4, MP3 and M4A downloads.",
            "default": false
          },
          "subtitleLanguages": {
            "title": "Subtitle languages",
            "type": "array",
            "description": "Language codes such as en, es, ja. \"original\" means the language of the video. Uploaded subtitles are used first, then automatic captions.",
            "default": [
              "original"
            ],
            "items": {
              "type": "string"
            }
          },
          "onlyNewVideos": {
            "title": "Only new videos (monitoring)",
            "type": "boolean",
            "description": "Remember what was saved and, on the next run, save only videos that are new since then. Run it on a schedule to archive a channel every day.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Separate memory for separate monitors (for example one per client).",
            "default": "default"
          },
          "skipExistingOnFirstRun": {
            "title": "First run: remember existing videos without saving them",
            "type": "boolean",
            "description": "Turn on to start from today: the first run only remembers the current videos (free), later runs save what is new.",
            "default": false
          },
          "slackWebhookUrl": {
            "title": "Slack webhook URL",
            "type": "string",
            "description": "One Slack message per run listing the saved videos with their file links."
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "POST with JSON {event, count, videos[]} once per run when videos were saved."
          },
          "s3Bucket": {
            "title": "S3 bucket",
            "type": "string",
            "description": "Leave empty to keep files in Apify storage with a download link. Works with AWS S3, Cloudflare R2, Backblaze B2, Wasabi, MinIO and others."
          },
          "s3Endpoint": {
            "title": "S3 endpoint URL",
            "type": "string",
            "description": "Leave empty for AWS. For R2: https://<account>.r2.cloudflarestorage.com"
          },
          "s3Region": {
            "title": "S3 region",
            "type": "string",
            "description": "For example us-east-1. \"auto\" for R2."
          },
          "s3Prefix": {
            "title": "Folder (key prefix)",
            "type": "string",
            "description": "Optional folder inside the bucket."
          },
          "s3AccessKeyId": {
            "title": "Access key ID",
            "type": "string",
            "description": "Stored encrypted."
          },
          "s3SecretAccessKey": {
            "title": "Secret access key",
            "type": "string",
            "description": "Stored encrypted."
          },
          "cookies": {
            "title": "Your YouTube cookies (optional)",
            "type": "string",
            "description": "Netscape cookies.txt from your own browser, only needed for age-restricted videos. Stored encrypted."
          },
          "maxVideoMinutes": {
            "title": "Skip videos longer than (minutes)",
            "minimum": 0,
            "type": "integer",
            "description": "Checked before downloading: longer videos are not started and not charged. 0 = no limit.",
            "default": 180
          },
          "perVideoTimeoutSecs": {
            "title": "Time limit per video (seconds)",
            "minimum": 0,
            "maximum": 3600,
            "type": "integer",
            "description": "0 = automatic, based on length and quality. A video that runs over is stopped and returned as a free error row.",
            "default": 0
          },
          "botRetries": {
            "title": "Retries on a new connection",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "When YouTube asks to confirm you are not a bot, try again from a different residential IP.",
            "default": 2
          },
          "maxConcurrency": {
            "title": "Videos at the same time",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many videos are processed in parallel.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}