{
  "openapi": "3.0.1",
  "info": {
    "title": "Youtube Video Downloader",
    "description": "Download YouTube videos, playlists, and entire channels in your preferred quality from 360p all the way up to the best available resolution. Each downloaded video is automatically stored with a shareable public link and comes with rich metadata including title, description, view counts, thumbnails.",
    "version": "1.4",
    "x-build-id": "JCKdhxscbnACgWb30"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~youtube-video-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-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/crawlerbros~youtube-video-downloader/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-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/crawlerbros~youtube-video-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-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": {
          "videoUrls": {
            "title": "Video URLs",
            "type": "array",
            "description": "YouTube video URLs to download.",
            "items": {
              "type": "string"
            }
          },
          "videoQuality": {
            "title": "Video Quality",
            "enum": [
              "best",
              "1080p",
              "720p",
              "480p",
              "360p",
              "audio_only",
              "worst"
            ],
            "type": "string",
            "description": "Preferred quality. Automatically falls back to the best available quality if the chosen resolution is unavailable. We highly recommend choosing 1080p or less for resolution for keeping the cost low. Higher the quality, higher the cost.",
            "default": "720p"
          },
          "downloadSubtitles": {
            "title": "Download Subtitles",
            "type": "boolean",
            "description": "Download subtitle / caption files (English) alongside the video.",
            "default": false
          },
          "playlistUrls": {
            "title": "Playlist URLs",
            "type": "array",
            "description": "YouTube playlist URLs - all videos in each playlist will be downloaded.",
            "items": {
              "type": "string"
            }
          },
          "channelUrls": {
            "title": "Channel URLs",
            "type": "array",
            "description": "YouTube channel URLs (e.g. https://www.youtube.com/@ChannelName).",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerInput": {
            "title": "Max Videos Per Playlist / Channel",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of videos to download per playlist, channel, or search query. Does not affect direct video URLs.",
            "default": 10
          },
          "proxyCountry": {
            "title": "Proxy Country",
            "enum": [
              "US",
              "GB",
              "CA",
              "AU",
              "DE",
              "FR",
              "JP",
              "KR",
              "BR",
              "IN",
              "MX",
              "IT",
              "ES",
              "NL",
              "PL",
              "SE",
              "NO",
              "DK",
              "FI",
              "ZA",
              "SG",
              "HK",
              "TW",
              "ID",
              "MY",
              "TH",
              "PH",
              "AR",
              "CO",
              "CL"
            ],
            "type": "string",
            "description": "Country for the residential proxy IP. Change this if a video is geo-blocked in the default country.",
            "default": "US"
          },
          "extractMetadataOnly": {
            "title": "Metadata Only (No Download)",
            "type": "boolean",
            "description": "When enabled, extracts video metadata (title, description, view count, etc.) without downloading the actual video file. Much faster and uses no storage.",
            "default": false
          },
          "subtitleLanguages": {
            "title": "Subtitle Languages",
            "type": "array",
            "description": "Language codes for subtitles to download when 'Download Subtitles' is enabled (e.g. 'en', 'es', 'fr'). Defaults to English.",
            "items": {
              "type": "string"
            },
            "default": [
              "en"
            ]
          },
          "cookies": {
            "title": "Cookies (Netscape format)",
            "type": "string",
            "description": "Optional Netscape-format cookies.txt content for accessing age-restricted or members-only videos. Export from your browser using a cookies extension."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}