{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper",
    "description": "⚡ Every YouTube field in one Actor — videos, channels, playlists, search, Shorts, comments, subtitles, hashtags — at 200+ videos/sec. Chrome TLS fingerprint, rotating residential IPs, full channel metadata on every row. Zero blocks, zero CAPTCHAs.",
    "version": "0.1",
    "x-build-id": "l5DaReHew5dctlNTy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vortex_data~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vortex_data-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/vortex_data~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-vortex_data-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/vortex_data~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-vortex_data-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": "Start URLs",
            "type": "array",
            "description": "Any YouTube URL: video, channel, playlist, search results, Shorts, hashtag. Paste many — they are scraped in parallel.",
            "default": [
              {
                "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "youtubeHandles": {
            "title": "YouTube handles",
            "type": "array",
            "description": "Channel handles like @MrBeast or @apify. Automatically resolved to channel URLs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Words to type into the YouTube search bar. Filters from the section below are applied to every query.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "getTrending": {
            "title": "Get Trending feed",
            "type": "boolean",
            "description": "⚠️ YouTube no longer exposes /feed/trending to unauthenticated visitors in most regions. As a workaround, search with sort=views and date=today.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum videos per source",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap on the number of regular videos to fetch per channel / search / playlist URL. For a single video URL this is ignored.",
            "default": 10
          },
          "maxResultsShorts": {
            "title": "Maximum Shorts per channel",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Only applies when scraping a channel URL — sets the cap on the /shorts tab.",
            "default": 0
          },
          "maxResultStreams": {
            "title": "Maximum streams per channel",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Only applies when scraping a channel URL — sets the cap on the /streams tab.",
            "default": 0
          },
          "includeShorts": {
            "title": "Include Shorts on a channel scrape",
            "type": "boolean",
            "description": "Shortcut. When ON and `Maximum Shorts per channel` is 0, we copy the regular-videos cap onto Shorts.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum total items (global cap)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Hard cross-source ceiling on the dataset size. 0 means unlimited.",
            "default": 0
          },
          "sortVideosBy": {
            "title": "Channel tab sort",
            "enum": [
              "NEWEST",
              "POPULAR",
              "OLDEST"
            ],
            "type": "string",
            "description": "Sort buttons on a channel's Videos / Shorts / Streams tabs.",
            "default": "NEWEST"
          },
          "sortingOrder": {
            "title": "Sort search results by",
            "enum": [
              "relevance",
              "rating",
              "date",
              "views"
            ],
            "type": "string",
            "description": "Only applies when scraping search keywords / a /results URL."
          },
          "dateFilter": {
            "title": "Upload date",
            "enum": [
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Restrict search results to videos uploaded within this window."
          },
          "videoType": {
            "title": "Type",
            "enum": [
              "video",
              "movie"
            ],
            "type": "string",
            "description": "Limit results to regular videos or full-length movies."
          },
          "lengthFilter": {
            "title": "Duration",
            "enum": [
              "under4",
              "between420",
              "plus20"
            ],
            "type": "string",
            "description": "Limit results to videos shorter or longer than the given bucket."
          },
          "isHD": {
            "title": "Only HD",
            "type": "boolean",
            "description": "Match only videos available in HD (720p or higher).",
            "default": false
          },
          "is4K": {
            "title": "Only 4K",
            "type": "boolean",
            "description": "Match only videos available in 4K (2160p).",
            "default": false
          },
          "isHDR": {
            "title": "Only HDR",
            "type": "boolean",
            "description": "Match only videos available in HDR.",
            "default": false
          },
          "is3D": {
            "title": "Only 3D",
            "type": "boolean",
            "description": "Match only stereoscopic 3D videos.",
            "default": false
          },
          "is360": {
            "title": "Only 360°",
            "type": "boolean",
            "description": "Match only 360° videos.",
            "default": false
          },
          "isVR180": {
            "title": "Only VR180",
            "type": "boolean",
            "description": "Match only VR180 videos.",
            "default": false
          },
          "isLive": {
            "title": "Only Live",
            "type": "boolean",
            "description": "Match only live streams.",
            "default": false
          },
          "hasSubtitles": {
            "title": "Only with subtitles",
            "type": "boolean",
            "description": "Match only videos that have subtitles / CC available.",
            "default": false
          },
          "hasCC": {
            "title": "Only Creative Commons",
            "type": "boolean",
            "description": "Match only videos uploaded under a Creative Commons licence.",
            "default": false
          },
          "hasLocation": {
            "title": "Only with location tag",
            "type": "boolean",
            "description": "Match only videos that have a geographic location tagged.",
            "default": false
          },
          "isBought": {
            "title": "Only purchased",
            "type": "boolean",
            "description": "Match only videos that have been purchased by the YouTube user.",
            "default": false
          },
          "downloadSubtitles": {
            "title": "Download subtitles",
            "type": "boolean",
            "description": "Fetch subtitles for every scraped video. ⚠️ This triggers a per-video /watch fetch even on search/channel sources.",
            "default": false
          },
          "subtitlesLanguage": {
            "title": "Preferred subtitles language",
            "type": "string",
            "description": "Two-letter language code (en, ru, de, …). Use `any` to grab whatever's available.",
            "default": "en"
          },
          "preferAutoGeneratedSubtitles": {
            "title": "Prefer auto-generated tracks",
            "type": "boolean",
            "description": "Pick the ASR (auto-generated) track over manually uploaded subtitles when both exist.",
            "default": false
          },
          "subtitlesFormat": {
            "title": "Output format",
            "enum": [
              "srt",
              "vtt",
              "xml",
              "plaintext"
            ],
            "type": "string",
            "description": "How subtitles should be encoded in the dataset.",
            "default": "srt"
          },
          "saveSubsToKVS": {
            "title": "Save subtitles to key-value store",
            "type": "boolean",
            "description": "Instead of embedding the SRT in the dataset, write it to the run's key-value store and keep a `keyValueStoreKey` reference. Useful for very long videos.",
            "default": false
          },
          "downloadComments": {
            "title": "Scrape comments",
            "type": "boolean",
            "description": "Walk the /youtubei/v1/next continuation chain. Triggers a /watch fetch even on listing-only sources.",
            "default": false
          },
          "maxComments": {
            "title": "Comments per video",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of comments to scrape per video. Only used when `Scrape comments` is enabled.",
            "default": 100
          },
          "gl": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country code (us, gb, de, ru, …). Affects which results YouTube returns AND which residential-proxy country we route through.",
            "default": "us"
          },
          "hl": {
            "title": "Interface language",
            "type": "string",
            "description": "Two-letter language code (en, ru, de, …). Drives YouTube interface texts and the `Accept-Language` header.",
            "default": "en"
          },
          "includeStreamingData": {
            "title": "Include streamingData (mp4 / adaptive formats)",
            "type": "boolean",
            "description": "Attach the raw `playerResponse.streamingData` block. ⚠️ Off by default because the payload can be 100s of KB per video, and most format URLs are signature-protected (you still need to run a JS decipher).",
            "default": false
          },
          "concurrency": {
            "title": "Concurrent requests",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "How many HTTP requests run in parallel. The actor scales well up to ~16; defaults to 5 for proxy-friendliness.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}