{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube All-in-One Downloader & Scraper",
    "description": "Download YouTube videos, Shorts, playlists, and channels as MP4. Up to 10 concurrent downloads with no browser needed. Extract comments, captions, and rich metadata. Metadata-only mode for fast, cheap research. Quality selection with automatic fallback. From $0.10/video.",
    "version": "0.2",
    "x-build-id": "G5bXldYKuSXPhnDfa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jy-labs~youtube-all-in-one-downloader-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jy-labs-youtube-all-in-one-downloader-scraper",
        "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/jy-labs~youtube-all-in-one-downloader-scraper/runs": {
      "post": {
        "operationId": "runs-sync-jy-labs-youtube-all-in-one-downloader-scraper",
        "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/jy-labs~youtube-all-in-one-downloader-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-jy-labs-youtube-all-in-one-downloader-scraper",
        "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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "YouTube URLs",
            "type": "array",
            "description": "Add one or more YouTube URLs to download. You can mix different types of URLs in a single run.",
            "items": {
              "type": "string"
            }
          },
          "quality": {
            "title": "Video Quality",
            "enum": [
              "highest",
              "1080p",
              "720p",
              "480p",
              "360p",
              "audio_only"
            ],
            "type": "string",
            "description": "Choose your preferred video quality. If the selected quality is not available for a video, the actor will automatically fall back to the closest lower quality.",
            "default": "highest"
          },
          "downloadVideo": {
            "title": "Download Video File",
            "type": "boolean",
            "description": "When enabled (default), the actor downloads the video file and stores it in Key-Value Store. Disable this to extract only metadata, captions, and comments without downloading the actual video -- significantly faster and cheaper.",
            "default": true
          },
          "maxVideos": {
            "title": "Maximum Videos",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Limit the total number of videos to download. This is especially useful when downloading from playlists or channels to control costs and run time.",
            "default": 100
          },
          "extractMetadata": {
            "title": "Extract Video Metadata",
            "type": "boolean",
            "description": "When enabled (default), each result will include full video metadata: title, description, channel info, view/like counts, duration, tags, and thumbnail URL. When disabled, only the source URL and download link are returned.",
            "default": true
          },
          "extractCaptions": {
            "title": "Extract Captions / Subtitles",
            "type": "boolean",
            "description": "When enabled, the actor will extract available captions (subtitles) from each video. The full transcript text is included in the output. This also enables metadata extraction automatically.",
            "default": false
          },
          "captionLanguage": {
            "title": "Preferred Caption Language",
            "pattern": "^[a-z]{2,3}(-[A-Za-z]{2,4})?$",
            "type": "string",
            "description": "The language code for captions you want to extract (e.g., 'en' for English, 'ko' for Korean, 'ja' for Japanese, 'es' for Spanish). If the preferred language is not available, the first available language will be used instead. Only applies when 'Extract Captions' is enabled.",
            "default": "en"
          },
          "extractComments": {
            "title": "Extract Comments",
            "type": "boolean",
            "description": "When enabled, the actor will extract top comments from each video. Comment data includes author, text, like count, and timestamp. This also enables metadata extraction automatically.",
            "default": false
          },
          "maxComments": {
            "title": "Max Comments Per Video",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of comments to extract per video. Higher values increase run time and cost. Only applies when 'Extract Comments' is enabled.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Parallel Downloads",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of videos to download at the same time. Higher values finish faster but use more memory. Reduce this if you experience out-of-memory errors.",
            "default": 4
          },
          "maxRequestRetries": {
            "title": "Retry Attempts",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many times to retry downloading a video if it fails (e.g., due to network issues or rate limiting). Each retry uses exponential backoff to avoid hitting YouTube's limits.",
            "default": 3
          },
          "includeFailedVideos": {
            "title": "Include Failed Videos in Output",
            "type": "boolean",
            "description": "When enabled, videos that failed to download (after all retries) will still appear in the output dataset with an error message. Useful for debugging or tracking which videos could not be processed.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Configure a proxy to avoid YouTube rate limiting and geo-restrictions. Enabled by default with Apify Proxy. RESIDENTIAL group is recommended for best reliability. Note: Proxy usage incurs additional costs (billed per GB of data transferred). You can disable this to reduce costs, but YouTube may block or rate-limit requests.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}