{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Video Downloader & Metadata Extractor",
    "description": "Downloads YouTube videos using yt-dlp with support for multiple quality levels (144p-4K), various formats (MP4, WebM, MP3, etc.), and cloud storage uploads (AWS S3, Azure Blob, Google Cloud). Extracts comprehensive video metadata including title, description, channel info, vie.",
    "version": "1.1",
    "x-build-id": "7EDjIDY2gGAPIJKVE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/codingfrontend~youtube-video-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-codingfrontend-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/codingfrontend~youtube-video-downloader/runs": {
      "post": {
        "operationId": "runs-sync-codingfrontend-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/codingfrontend~youtube-video-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-codingfrontend-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": [
          "videos"
        ],
        "properties": {
          "videos": {
            "title": "Videos",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "One to 100 YouTube watch, Shorts, embed, youtu.be, or related YouTube URLs. Each item may be a URL string or an object with a url property.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL",
                  "description": "YouTube video URL"
                }
              },
              "required": [
                "url"
              ],
              "additionalProperties": true
            },
            "default": [
              {
                "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
              }
            ]
          },
          "preferredQuality": {
            "title": "Preferred quality",
            "enum": [
              "144p",
              "240p",
              "360p",
              "480p",
              "720p",
              "1080p",
              "1440p",
              "2160p"
            ],
            "type": "string",
            "description": "Maximum requested video height. Audio-only formats ignore this setting.",
            "default": "720p"
          },
          "preferredFormat": {
            "title": "Preferred format",
            "enum": [
              "avi",
              "flv",
              "mkv",
              "mov",
              "mp4",
              "webm",
              "aac",
              "aiff",
              "alac",
              "flac",
              "m4a",
              "mka",
              "mp3",
              "ogg",
              "opus",
              "vorbis",
              "wav"
            ],
            "type": "string",
            "description": "Output container or audio codec requested from yt-dlp and ffmpeg when available.",
            "default": "mp4"
          },
          "filenameTemplateParts": {
            "title": "Filename components",
            "minItems": 1,
            "maxItems": 3,
            "uniqueItems": true,
            "type": "array",
            "description": "Additional components appended after the video ID. Filenames are sanitized and limited to the Apify key length.",
            "items": {
              "type": "string",
              "enum": [
                "title",
                "uploader",
                "timestamp"
              ]
            },
            "default": [
              "title"
            ]
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify proxy configuration used by yt-dlp.",
            "default": {
              "useApifyProxy": false
            },
            "additionalProperties": true
          },
          "maxFileSizeMbytes": {
            "title": "Maximum output file size (MB)",
            "minimum": 1,
            "maximum": 512,
            "type": "integer",
            "description": "Reject media estimated or downloaded above this size before it is stored or uploaded.",
            "default": 128
          },
          "maxDurationSeconds": {
            "title": "Maximum video duration (seconds)",
            "minimum": 1,
            "maximum": 7200,
            "type": "integer",
            "description": "Reject videos with a known duration above this limit before download.",
            "default": 900
          },
          "s3AccessKeyId": {
            "title": "S3 access key ID",
            "type": "string",
            "description": "AWS access key used when all S3 fields are supplied."
          },
          "s3SecretAccessKey": {
            "title": "S3 secret access key",
            "type": "string",
            "description": "Optional S3 secret key used for public output upload configuration."
          },
          "s3Bucket": {
            "title": "S3 bucket",
            "type": "string",
            "description": "Existing S3 bucket. The uploader uses private object ACLs."
          },
          "s3Region": {
            "title": "S3 region",
            "pattern": "^[a-z0-9-]+$",
            "type": "string",
            "description": "Optional S3 region used for output upload configuration.",
            "default": "us-east-1"
          },
          "azureConnectionString": {
            "title": "Azure connection string",
            "type": "string",
            "description": "Azure Storage connection string used with azureContainerName."
          },
          "azureContainerName": {
            "title": "Azure container name",
            "type": "string",
            "description": "Optional Azure container name used for output upload configuration."
          },
          "googleCloudServiceKey": {
            "title": "Google Cloud service account JSON",
            "type": "string",
            "description": "Service-account JSON accepted by google-cloud-storage."
          },
          "googleCloudBucketName": {
            "title": "Google Cloud bucket",
            "type": "string",
            "description": "Optional Google Cloud Storage bucket used for output upload configuration."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}