{
  "openapi": "3.0.1",
  "info": {
    "title": "Youtube Downloader",
    "description": "Professional YouTube downloader for 8K videos, shorts, and high-quality MP3s. Supports full channels and playlists, features advanced proxy rotation to bypass bot detection, and automatically uploads files to Apify Key-Value Store, AWS S3, Azure, or Google Cloud Storage.",
    "version": "0.0",
    "x-build-id": "HvIKlk4ZigMXqDW4W"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kjernekode~youtube-downloader-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kjernekode-youtube-downloader-api",
        "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/kjernekode~youtube-downloader-api/runs": {
      "post": {
        "operationId": "runs-sync-kjernekode-youtube-downloader-api",
        "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/kjernekode~youtube-downloader-api/run-sync": {
      "post": {
        "operationId": "run-sync-kjernekode-youtube-downloader-api",
        "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": [
          "start_urls",
          "download_mode"
        ],
        "properties": {
          "start_urls": {
            "title": "YouTube Source URLs (Video, Channel, Playlist)",
            "type": "array",
            "description": "List of YouTube video, channel, shorts or playlist URLs.",
            "items": {
              "type": "string"
            }
          },
          "download_mode": {
            "title": "Extraction Mode (Video vs Audio)",
            "enum": [
              "video",
              "audio"
            ],
            "type": "string",
            "description": "Select whether to download video or audio only.",
            "default": "video"
          },
          "preferred_resolution": {
            "title": "Maximum Video Quality (up to 8K)",
            "enum": [
              "144",
              "240",
              "360",
              "480",
              "720",
              "1080",
              "1440",
              "2160",
              "4320"
            ],
            "type": "string",
            "description": "Select the visual quality. If selected quality is not available, the closest lower quality will be used.",
            "default": "1080"
          },
          "preferred_format": {
            "title": "Preferred Video Format",
            "enum": [
              "mp4",
              "webm",
              "mkv"
            ],
            "type": "string",
            "description": "Select the container format for video downloads.",
            "default": "mp4"
          },
          "max_results_per_url": {
            "title": "Maximum Items to Scrape per URL",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of videos to download from each channel or playlist.",
            "default": 10
          },
          "max_concurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 1,
            "type": "integer",
            "description": "Number of simultaneous downloads. Locked to 1 for maximum bot bypass reliability.",
            "default": 1
          },
          "max_retries": {
            "title": "Max Retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum number of retries per video on failure. Highly recommended for avoiding bot detection.",
            "default": 3
          },
          "storage_provider": {
            "title": "Storage Provider",
            "enum": [
              "apify",
              "s3",
              "azure",
              "gcs"
            ],
            "type": "string",
            "description": "Where to store the downloaded files.",
            "default": "apify"
          },
          "s3_bucket": {
            "title": "S3 Bucket Name",
            "type": "string",
            "description": "AWS S3 Bucket name."
          },
          "s3_access_key": {
            "title": "S3 Access Key",
            "type": "string",
            "description": "AWS Access Key ID."
          },
          "s3_secret_key": {
            "title": "S3 Secret Key",
            "type": "string",
            "description": "AWS Secret Access Key."
          },
          "s3_region": {
            "title": "S3 Region",
            "type": "string",
            "description": "AWS Region (e.g., us-east-1). Required only for Amazon S3."
          },
          "azure_connection_string": {
            "title": "Azure Connection String",
            "type": "string",
            "description": "Azure Storage connection string."
          },
          "azure_container": {
            "title": "Azure Container Name",
            "type": "string",
            "description": "Azure Blob Storage container name."
          },
          "gcs_bucket": {
            "title": "GCS Bucket Name",
            "type": "string",
            "description": "Google Cloud Storage bucket name."
          },
          "gcs_credentials": {
            "title": "GCS Service Account JSON",
            "type": "string",
            "description": "Service Account JSON content for Google Cloud Storage."
          },
          "proxy_configuration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings for reliable access and avoiding blocks."
          },
          "cookies": {
            "title": "YouTube Cookies",
            "type": "string",
            "description": "Paste your Netscape formatted cookies here to bypass bot detection. See yt-dlp documentation for how to export cookies."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}