{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Video Downloader",
    "description": "[💰 From $0.01 / video-minute] Download YouTube videos as MP4 or extract MP3 audio. Paste video URLs, pick a quality, and get ready-to-use files plus metadata. Pay only for successful downloads.",
    "version": "1.0",
    "x-build-id": "Dxt88d6cQ5ZjlErma"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/solidcode~youtube-video-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-solidcode-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/solidcode~youtube-video-downloader/runs": {
      "post": {
        "operationId": "runs-sync-solidcode-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/solidcode~youtube-video-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-solidcode-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",
        "properties": {
          "urls": {
            "title": "YouTube Video URLs",
            "type": "array",
            "description": "Paste one or more YouTube video or Shorts URLs to download. Accepts full watch URLs (https://www.youtube.com/watch?v=...), short URLs (https://youtu.be/...), and Shorts URLs (https://www.youtube.com/shorts/...). One file and one metadata row are produced per URL. Playlists are not supported — paste individual video URLs.",
            "items": {
              "type": "string"
            }
          },
          "quality": {
            "title": "Video Quality",
            "enum": [
              "1080",
              "720",
              "480",
              "360"
            ],
            "type": "string",
            "description": "Maximum video resolution to download. The actor picks the best available stream up to this resolution — if a video is only published in a lower quality, you get the highest it offers. Ignored when the format is MP3 audio. Higher resolutions produce larger files and cost more per minute. Very large or long videos (often 4K or multi-hour 1080p) may exceed Apify's ~230 MB per-file limit — if a download is skipped for size, pick a lower quality here or switch to MP3 audio.",
            "default": "1080"
          },
          "format": {
            "title": "Format",
            "enum": [
              "video",
              "audio"
            ],
            "type": "string",
            "description": "Choose 'MP4 video' to download the full video file, or 'MP3 audio' to extract just the soundtrack as an audio file. MP3 ignores the video quality setting.",
            "default": "video"
          },
          "residentialProxyMode": {
            "title": "Residential Fallback",
            "enum": [
              "fallback",
              "disabled"
            ],
            "type": "string",
            "description": "YouTube throttles or blocks some videos on standard connections. When this is on (the default), the actor automatically retries only those videos over a residential connection so they still download — fast videos on the standard connection are untouched. It's a paid add-on ($0.015 per megabyte) and you are charged only when a residential retry actually delivers a video; everything that succeeds on the standard connection costs nothing extra. Turn it off to use the standard connection only (blocked videos will be reported as failed instead).",
            "default": "fallback"
          },
          "proxyCountry": {
            "title": "Country",
            "enum": [
              "auto",
              "US",
              "GB",
              "DE",
              "FR",
              "CA",
              "AU",
              "JP",
              "BR",
              "IN",
              "NL",
              "ES",
              "IT",
              "MX",
              "PL",
              "KR"
            ],
            "type": "string",
            "description": "Download videos as if connecting from a specific country. Useful for videos that are only available in certain regions. Leave on 'Automatic' unless a video is region-restricted. Ignored when a Custom Proxy URL is provided (your proxy decides the country).",
            "default": "auto"
          },
          "customProxyUrl": {
            "title": "Custom Proxy URL",
            "type": "string",
            "description": "Optional. Bring your own proxy instead of the built-in connection. Use the format http://username:password@host:port. Leave empty to use the built-in connection. When set, this replaces the built-in proxy entirely — the Country option above is ignored and the residential fallback is not used."
          },
          "youtubeCookies": {
            "title": "YouTube Cookies",
            "type": "string",
            "description": "Optional. Paste your exported YouTube cookies (Netscape cookies.txt format) to download videos that require sign-in, such as age-restricted or members-only content. You can export these with a browser extension like 'Get cookies.txt'. Leave empty for normal public videos."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}