{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube to MP3 & YouTube Video Downloader (MP4, MP3, Subtitles)",
    "description": "YouTube videos, Shorts, playlists, channels and searches: exact views, likes, comment counts, chapters, subtitles and every stream link. YouTube to MP4, WebM or MKV video (144p to 4K) or MP3, M4A, Opus, WAV or FLAC audio, with cuts and frames. Playlist scraper; no login, no cookies. Misses free.",
    "version": "0.1",
    "x-build-id": "oIJQYKGOaK5Zdk7cj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hyperbach~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hyperbach-youtube-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/hyperbach~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hyperbach-youtube-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/hyperbach~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hyperbach-youtube-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",
        "properties": {
          "startUrls": {
            "title": "YouTube URLs",
            "type": "array",
            "description": "Videos, Shorts, playlists, channels and search results: a watch, youtu.be, /shorts/, /live/ or embed link, a bare 11-character video id, /channel/UC…, /@handle (or /@handle/shorts for one tab), /c/ and /user/ links, /playlist?list=PL…, a /results?search_query=… link (its own filters apply). A value that names none of these is a free row that says why.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "youtubeHandles": {
            "title": "Channel handles",
            "type": "array",
            "description": "Channels by handle (@MrBeast) or UC… id: each one's Videos tab (and its Shorts tab with includeShorts), newest first.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Words to search on YouTube, one search each; the search filters below apply.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max videos (whole run)",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "The most charged video rows of the whole run; 0 = no cap beyond your charge limit. Free rows (a live stream, a missing video, a list's summary) do not count.",
            "default": 0
          },
          "maxItemsPerInput": {
            "title": "Max videos per list input",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "The most charged video rows from one playlist, channel tab or search; 0 = to the list's end.",
            "default": 0
          },
          "includeShorts": {
            "title": "Include Shorts",
            "type": "boolean",
            "description": "A channel: read its Shorts tab after its Videos tab. A search: keep the Shorts YouTube mixes into the results.",
            "default": false
          },
          "uploadDate": {
            "title": "Upload date (search)",
            "enum": [
              "all",
              "l",
              "t",
              "w",
              "m",
              "y"
            ],
            "type": "string",
            "description": "YouTube's own upload-date filter for keyword searches.",
            "default": "all"
          },
          "duration": {
            "title": "Duration (search)",
            "enum": [
              "all",
              "s",
              "m",
              "l"
            ],
            "type": "string",
            "description": "YouTube's own duration filter for keyword searches.",
            "default": "all"
          },
          "features": {
            "title": "Feature (search)",
            "enum": [
              "all",
              "h",
              "hd",
              "s",
              "c",
              "3d",
              "3",
              "li",
              "lo",
              "4"
            ],
            "type": "string",
            "description": "YouTube's own feature filter for keyword searches.",
            "default": "all"
          },
          "sort": {
            "title": "Sort (search)",
            "enum": [
              "r",
              "v",
              "u",
              "ra"
            ],
            "type": "string",
            "description": "Relevance is YouTube's order. View count and upload date read the results and order them here by the results' own view counts or ages (YouTube's own order for these is not strict); a view-count sort reads videos only (YouTube sorts no Shorts by views). Rating is read by relevance.",
            "default": "r"
          },
          "gl": {
            "title": "Search country",
            "type": "string",
            "description": "The country YouTube ranks a keyword search for, as a two-letter code (us, gb, de). YouTube ranks by the caller's country, so a search with another country than us is read on residential exits in that country; the search's summary row names the country it was read from. The videos' records and links are read from US exits.",
            "default": "us"
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Only videos published on or after this date (2026-01-31) or within this age (30 days, 6 months). A channel walk stops at its first older video; other videos past it are left out and not charged.",
            "default": ""
          },
          "minViews": {
            "title": "Minimum views",
            "minimum": 0,
            "type": "integer",
            "description": "Leave out videos with fewer views (the exact count); a video left out is not charged.",
            "default": 0
          },
          "download": {
            "title": "Download a file",
            "enum": [
              "none",
              "video",
              "audio"
            ],
            "type": "string",
            "description": "None: metadata and the stream links (they expire in about 6 hours). Video: a stored video file (video + audio merged). Audio: a stored audio file. Files are kept in the run's storage with a lasting link on the row.",
            "default": "none"
          },
          "videoQuality": {
            "title": "Video quality",
            "enum": [
              "144p",
              "240p",
              "360p",
              "480p",
              "720p",
              "1080p",
              "1440p",
              "2160p",
              "best"
            ],
            "type": "string",
            "description": "The video's height. Best = the highest the video has in the chosen format.",
            "default": "360p"
          },
          "videoFormat": {
            "title": "Video format",
            "enum": [
              "mp4",
              "webm",
              "mkv"
            ],
            "type": "string",
            "description": "MP4 = H.264 + AAC (at 1440p and 2160p, where YouTube has no H.264, AV1 + AAC). WebM = VP9 + Opus. MKV = the best codec at the height + Opus.",
            "default": "mp4"
          },
          "allowLowerQuality": {
            "title": "Take the nearest lower quality",
            "type": "boolean",
            "description": "When the video does not have the asked height, store the nearest lower one (the row says which). Off: the video gets a free quality_unavailable row.",
            "default": true
          },
          "audioFormat": {
            "title": "Audio format",
            "enum": [
              "mp3",
              "m4a",
              "opus",
              "wav",
              "flac"
            ],
            "type": "string",
            "description": "M4A (AAC) and Opus are YouTube's own audio; MP3, WAV and FLAC are made by ffmpeg from the original track. An MP3 carries the title, the channel and the thumbnail as its cover.",
            "default": "mp3"
          },
          "audioBitrate": {
            "title": "MP3 bitrate (kbps)",
            "minimum": 32,
            "maximum": 320,
            "type": "integer",
            "description": "The MP3's bitrate; M4A and Opus keep YouTube's own.",
            "default": 192
          },
          "audioLanguage": {
            "title": "Audio language",
            "type": "string",
            "description": "A dubbed audio track by language code (de, es, pt-BR). Empty: the original track.",
            "default": ""
          },
          "startTime": {
            "title": "Cut: start",
            "type": "string",
            "description": "Store only the part from here: seconds (90) or a time (1:30). The whole video is read; the file is cut.",
            "default": ""
          },
          "endTime": {
            "title": "Cut: end",
            "type": "string",
            "description": "Store only the part up to here: seconds (150) or a time (2:30).",
            "default": ""
          },
          "frameTimes": {
            "title": "Frames at (seconds)",
            "type": "array",
            "description": "JPEG stills cut from the stored video at these times (seconds, or 1:30); needs Download: Video. At most 20.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "downloadThumbnail": {
            "title": "Store the thumbnail",
            "type": "boolean",
            "description": "Store the largest thumbnail as a file beside the video or audio file.",
            "default": false
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "A file row whose streams are larger gets a free too_large row before any byte is read (a links-only run stores no file: no effect there). Files over 300 MB need the run memory raised to 2 GB or more.",
            "default": 300
          },
          "maxDurationMinutes": {
            "title": "Max video length (minutes)",
            "minimum": 0,
            "type": "integer",
            "description": "A longer video gets a free too_large row, on a links-only run too, before any byte is read; 0 = no limit.",
            "default": 0
          },
          "fileStoreName": {
            "title": "File store name",
            "type": "string",
            "description": "A named key-value store for the files instead of the run's own (kept after the run's storage expires). Letters, digits and '-'.",
            "default": ""
          },
          "subtitles": {
            "title": "Subtitles in the row",
            "type": "boolean",
            "description": "Put each subtitle track's text in the row (the creator's tracks and YouTube's auto-generated one).",
            "default": false
          },
          "subtitleLanguages": {
            "title": "Subtitle languages",
            "type": "array",
            "description": "Only these languages (en, de, pt-BR); empty = every track the video has.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "subtitleFormat": {
            "title": "Subtitle format",
            "enum": [
              "vtt",
              "srt",
              "json3",
              "srv3",
              "txt"
            ],
            "type": "string",
            "description": "The subtitles' text format.",
            "default": "vtt"
          },
          "maxConcurrency": {
            "title": "Videos at once",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Videos read at the same time.",
            "default": 4
          },
          "feedback": {
            "title": "Feedback to the maintainers",
            "maxLength": 2000,
            "type": "string",
            "description": "A note to the people who maintain this Actor: what you needed and did not get. For example a missing field, a wrong or empty result, or the Actor you switch from or to, and why. The run does not read it: the rows and the charges stay the same. A person reads every note."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}