{
  "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.0",
    "x-build-id": "W3DS24nK1zmbA4A55"
  },
  "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,
            "type": "array",
            "description": "A list of video urls",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "preferredQuality": {
            "title": "Preferred quality",
            "enum": [
              "144p",
              "240p",
              "360p",
              "480p",
              "720p",
              "1080p",
              "1440p",
              "2160p"
            ],
            "type": "string",
            "description": "Optional quality, may require more time to process if > 720p",
            "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": "Optional format, may require more time to process. For now only video formats are supported, but audio-only formats will be added in the future"
          },
          "filenameTemplateParts": {
            "title": "Name your file with",
            "maxItems": 3,
            "type": "array",
            "description": "Specifies what video info to include in the filename. Each part will be separated by an underscore. Video ID is always included at the start, and if the title of the video is too long, the whole filename will be truncated to 252 characters. When downloading to Apify's Key-Value Store, will transliterate the filename to ASCII characters, if needed.",
            "items": {
              "type": "string",
              "enum": [
                "title",
                "uploader",
                "timestamp"
              ],
              "enumTitles": [
                "Title",
                "Uploader's name",
                "Publishing UNIX timestamp"
              ]
            },
            "default": [
              "title"
            ]
          },
          "s3AccessKeyId": {
            "title": "S3 Access Key ID",
            "type": "string",
            "description": "Access key ID for the S3 bucket"
          },
          "s3SecretAccessKey": {
            "title": "S3 Secret Access Key",
            "type": "string",
            "description": "Secret access key for the S3 bucket"
          },
          "s3Bucket": {
            "title": "S3 Bucket",
            "type": "string",
            "description": "Name of the S3 bucket. Must be created by you."
          },
          "s3Region": {
            "title": "S3 Region",
            "type": "string",
            "description": "Region of the S3 bucket. E.g. 'us-west-1'"
          },
          "azureConnectionString": {
            "title": "Azure Connection String",
            "type": "string",
            "description": "Connection string for the Azure Blob Storage"
          },
          "azureContainerName": {
            "title": "Azure Container Name",
            "type": "string",
            "description": "Name of the Azure container. Will be auto-created if doesn't exist"
          },
          "googleCloudServiceKey": {
            "title": "Google Cloud Service Key JSON",
            "type": "string",
            "description": "Service account's key JSON object for the Google Cloud Storage"
          },
          "googleCloudBucketName": {
            "title": "Google Cloud Bucket Name",
            "type": "string",
            "description": "Name of the Google Cloud bucket. Must be created by you"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}