{
  "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": "1.0",
    "x-build-id": "OjiDA7GrRCDsMeNUH"
  },
  "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": {
          "targets": {
            "title": "📥 Paste what you have",
            "type": "array",
            "description": "One item per line: video URLs, Shorts URLs, @handles, channel IDs, playlist IDs, video IDs, search result URLs, hashtags, or plain keywords.",
            "items": {
              "type": "string"
            }
          },
          "scenario": {
            "title": "🎯 Choose result package",
            "enum": [
              "complete",
              "quick_metadata",
              "research_insights",
              "comments_monitoring",
              "creator_leads",
              "transcripts_for_ai",
              "media_audit"
            ],
            "type": "string",
            "description": "Inputs are auto-detected. Leave Complete selected to collect everything from videos, channels, playlists, search URLs, IDs, handles, hashtags, and keywords.",
            "default": "complete"
          },
          "runSize": {
            "title": "📦 Choose size",
            "enum": [
              "test",
              "small",
              "medium",
              "large",
              "unlimited"
            ],
            "type": "string",
            "description": "One size controls breadth and depth: items per source, comments per video, replies, related videos, live chat, and lead-enrichment depth.",
            "default": "small"
          },
          "extraData": {
            "title": "🧩 API add-ons",
            "type": "array",
            "description": "Hidden API compatibility field. Console users should choose a result package instead.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxResults": {
            "title": "🎚️ Items per source (optional)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Exact override for run size. Leave empty unless you need a precise per-channel, per-playlist, or per-keyword cap."
          },
          "maxItems": {
            "title": "🛑 Total items cap (optional)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Exact override for run size. 0 means no global cap. Leave empty to use the selected run size."
          },
          "downloadSubtitles": {
            "title": "📝 Transcripts / subtitles",
            "type": "boolean",
            "description": "Fetch public captions/transcripts for each video. AI transcript workflows enable this automatically.",
            "default": false
          },
          "downloadComments": {
            "title": "💬 Comments",
            "type": "boolean",
            "description": "Fetch comments for each video.",
            "default": false
          },
          "includeCommentReplies": {
            "title": "↪️ Comment replies",
            "type": "boolean",
            "description": "Open reply threads under comments. Useful for analysis, but it adds extra requests.",
            "default": false
          },
          "extractContacts": {
            "title": "📧 Emails / websites / socials",
            "type": "boolean",
            "description": "Extract public emails, websites, social links, and contact links from videos and channels.",
            "default": false
          },
          "enableContentInsights": {
            "title": "🧠 Keywords / sentiment / topics",
            "type": "boolean",
            "description": "Add lightweight insights: keywords, topics, sentiment, and detected language.",
            "default": false
          },
          "includeShorts": {
            "title": "🎬 Include Shorts",
            "type": "boolean",
            "description": "Also collect Shorts when scraping channels. If Shorts per channel is 0, the main Items per source limit will be used.",
            "default": false
          },
          "downloadCommunityPosts": {
            "title": "📣 Community posts",
            "type": "boolean",
            "description": "Also collect public community posts when scraping channels.",
            "default": false
          },
          "downloadRecommendations": {
            "title": "🧭 Related videos",
            "type": "boolean",
            "description": "Extract recommended/related videos from each public watch page.",
            "default": false
          },
          "downloadSponsorSegments": {
            "title": "⏱️ SponsorBlock segments",
            "type": "boolean",
            "description": "Fetch sponsor, intro, outro, self-promo, and other segments from SponsorBlock when available.",
            "default": false
          },
          "includeDownloadFormats": {
            "title": "🎞️ Media formats",
            "type": "boolean",
            "description": "Add compact video/audio format metadata: quality, codec, bitrate, best audio, and best video.",
            "default": false
          },
          "downloadLiveChat": {
            "title": "🔴 Live chat / replay",
            "type": "boolean",
            "description": "Best-effort live chat or replay chat scraping when YouTube exposes a public continuation token.",
            "default": false
          },
          "maxComments": {
            "title": "💬 Override comments per video",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Exact override for the selected size. Leave empty so Test/Small/Medium/Large/Maximum controls this automatically."
          },
          "commentsSortBy": {
            "title": "🏆 Sort comments",
            "type": "string",
            "description": "How comments should be sorted before scraping.",
            "default": "top"
          },
          "maxRepliesPerComment": {
            "title": "↪️ Override replies per comment",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Exact override for the selected size. Leave empty so Test/Small/Medium/Large/Maximum controls this automatically."
          },
          "commentsOutput": {
            "title": "🧾 Comments output",
            "type": "string",
            "description": "Flat means one row per comment. Nested means comments stay inside the video row. Both returns both shapes.",
            "default": "auto"
          },
          "dedupeAcrossRuns": {
            "title": "🆕 Only new comments/videos",
            "type": "boolean",
            "description": "For monitoring: store seen IDs and return only new items in later runs.",
            "default": false
          },
          "stateKey": {
            "title": "🔑 Monitoring key",
            "type": "string",
            "description": "Optional. Use the same key for repeated monitoring runs. If empty, the key is derived from sources and settings.",
            "default": ""
          },
          "subtitlesLanguage": {
            "title": "🌐 Transcript language",
            "type": "string",
            "description": "Caption language to try first. Use any to accept the first available public caption track.",
            "default": "en"
          },
          "subtitlesLanguages": {
            "title": "🔁 Language fallback",
            "type": "array",
            "description": "Fallback language order, for example: en, es, any.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "subtitlesFormat": {
            "title": "📄 Transcript format",
            "type": "string",
            "description": "Transcript format in the dataset or key-value store.",
            "default": "srt"
          },
          "includeTranscriptSegments": {
            "title": "⏱️ Timestamped segments",
            "type": "boolean",
            "description": "Return transcript segments with start, end, duration, and text. Useful for RAG, quotes, and clip analysis.",
            "default": true
          },
          "saveSubsToKVS": {
            "title": "🗄️ Save large transcripts to KVS",
            "type": "boolean",
            "description": "Keep the dataset compact by writing large transcript payloads to the key-value store and returning a key.",
            "default": false
          },
          "translateSubtitlesTo": {
            "title": "🌍 Translate transcript to",
            "type": "string",
            "description": "Optional YouTube timedtext translation target language. Empty means no translation.",
            "default": ""
          },
          "preferAutoGeneratedSubtitles": {
            "title": "🤖 Prefer auto-generated captions",
            "type": "boolean",
            "description": "Choose YouTube ASR captions before manual captions when both are available.",
            "default": false
          },
          "transcriptSearchMode": {
            "title": "🎚️ Transcript match",
            "type": "string",
            "description": "Match any term or require all terms.",
            "default": "any"
          },
          "onlyMatchedTranscripts": {
            "title": "🎯 Only videos with matches",
            "type": "boolean",
            "description": "Skip videos whose transcript does not contain the requested terms.",
            "default": false
          },
          "sortingOrder": {
            "title": "🔎 Search sort",
            "type": "string",
            "description": "Applies only to search keywords and YouTube /results URLs."
          },
          "searchResultTypes": {
            "title": "🧩 Search result types",
            "type": "array",
            "description": "Run each keyword as separate searches for the selected types. For Search intelligence, videos + channels + playlists is usually best.",
            "items": {
              "type": "string"
            }
          },
          "dateFilter": {
            "title": "📅 Upload date",
            "type": "string",
            "description": "Restrict search results by upload date."
          },
          "lengthFilter": {
            "title": "⏳ Duration",
            "type": "string",
            "description": "Restrict search results by video duration."
          },
          "videoType": {
            "title": "🎥 Single search type",
            "type": "string",
            "description": "Hidden legacy search type. Use Search result types instead."
          },
          "isHD": {
            "title": "HD",
            "type": "boolean",
            "description": "Search filter: only HD videos.",
            "default": false
          },
          "is4K": {
            "title": "4K",
            "type": "boolean",
            "description": "Search filter: only 4K videos.",
            "default": false
          },
          "isHDR": {
            "title": "HDR",
            "type": "boolean",
            "description": "Search filter: only HDR videos.",
            "default": false
          },
          "isLive": {
            "title": "🔴 Live",
            "type": "boolean",
            "description": "Search filter: live videos or streams.",
            "default": false
          },
          "hasSubtitles": {
            "title": "CC",
            "type": "boolean",
            "description": "Search filter: videos with subtitles or captions.",
            "default": false
          },
          "maxResultsShorts": {
            "title": "🎬 Shorts per channel",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum Shorts to collect from each channel. 0 means skip Shorts unless a preset enables them.",
            "default": 0
          },
          "maxResultStreams": {
            "title": "📡 Streams per channel",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum streams or live replays to collect from each channel.",
            "default": 0
          },
          "maxCommunityPosts": {
            "title": "📣 Posts per channel",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum community posts to collect from each channel.",
            "default": 0
          },
          "sortVideosBy": {
            "title": "↕️ Channel sort",
            "type": "string",
            "description": "Sorting for channel tabs: Videos, Shorts, and Streams.",
            "default": "NEWEST"
          },
          "maxRecommendations": {
            "title": "🧭 Override related videos per video",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Exact override for the selected size. Leave empty so Test/Small/Medium/Large/Maximum controls this automatically."
          },
          "maxInsightKeywords": {
            "title": "🧠 Insight keywords",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum keyword terms to return in contentInsights.keywords.",
            "default": 20
          },
          "crawlExternalLinks": {
            "title": "🌐 Crawl linked websites",
            "type": "boolean",
            "description": "Visit external websites found in descriptions or about links to discover more emails, socials, and contact links.",
            "default": false
          },
          "maxExternalPagesPerChannel": {
            "title": "🔗 Override external pages per item",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Exact override for the selected size when creator lead enrichment crawls linked public websites."
          },
          "emailValidation": {
            "title": "✅ Email validation",
            "type": "string",
            "description": "Validate extracted emails. Domain DNS checks are slower but more useful for lead lists.",
            "default": "none"
          },
          "sponsorBlockCategories": {
            "title": "⏱️ SponsorBlock categories",
            "type": "array",
            "description": "SponsorBlock categories to request.",
            "items": {
              "type": "string"
            }
          },
          "getTrending": {
            "title": "🔥 Try YouTube Trending",
            "type": "boolean",
            "description": "Best effort. YouTube often hides /feed/trending without login. For reliable trend research, use Search intelligence with sort by views and upload date today.",
            "default": false
          },
          "publishedAfter": {
            "title": "📅 Published after",
            "type": "string",
            "description": "Exact date filter for watch records, format YYYY-MM-DD. Forces per-video fetch on listings."
          },
          "publishedBefore": {
            "title": "📅 Published before",
            "type": "string",
            "description": "Exact date filter for watch records, format YYYY-MM-DD. Forces per-video fetch on listings."
          },
          "gl": {
            "title": "🌎 Country",
            "type": "string",
            "description": "Two-letter country code such as us, gb, de, or jp. Affects YouTube results and residential proxy country.",
            "default": "us"
          },
          "hl": {
            "title": "🗣️ Language",
            "type": "string",
            "description": "Two-letter interface language such as en, es, de, ja, or ru.",
            "default": "en"
          },
          "concurrency": {
            "title": "⚡ Speed",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "How many HTTP requests run in parallel. Higher is faster, but may produce more proxy or YouTube retries.",
            "default": 5
          },
          "maxLiveChatMessages": {
            "title": "🔴 Override live chat messages",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Exact override for the selected size. Leave empty so Test/Small/Medium/Large/Maximum controls this automatically."
          },
          "includeStreamingData": {
            "title": "🧩 Raw streamingData",
            "type": "boolean",
            "description": "Attach raw playerResponse.streamingData. Usually not needed because it can make dataset rows much larger.",
            "default": false
          },
          "includeFormatUrls": {
            "title": "🔗 Media format URLs",
            "type": "boolean",
            "description": "Include direct format URLs when YouTube exposes them. Some formats still require signature deciphering.",
            "default": false
          },
          "includeContinuationTokens": {
            "title": "🔁 Return comment continuation token",
            "type": "boolean",
            "description": "Return commentsNextContinuation so a client can continue comment paging later.",
            "default": false
          },
          "commentsContinuationToken": {
            "title": "🔁 Start from comment token",
            "type": "string",
            "description": "Advanced: continue comments from a token returned by a previous run.",
            "default": ""
          },
          "stateStoreName": {
            "title": "🗄️ State store",
            "type": "string",
            "description": "Named key-value store used for dedupe state across runs.",
            "default": "youtube-scraper-state"
          },
          "scrapeMode": {
            "title": "⚙️ Legacy scrape mode",
            "type": "string",
            "description": "Hidden compatibility field for API callers. Console users should choose a result package.",
            "default": "metadata"
          },
          "includeRunMetadata": {
            "title": "🧾 Include run metadata",
            "type": "boolean",
            "description": "Hidden default: attach scrapedAt, runId, sourceType, sourceUrl, and source indexes.",
            "default": true
          },
          "includeRawFields": {
            "title": "🧰 Include raw legacy fields",
            "type": "boolean",
            "description": "Hidden compatibility option for API users. Leave disabled for a clean Output tab without duplicate aliases.",
            "default": false
          },
          "pushErrorItems": {
            "title": "🧯 Push diagnostic errors",
            "type": "boolean",
            "description": "Hidden default: failed direct inputs create diagnostic dataset rows.",
            "default": true
          },
          "maxStateItems": {
            "title": "🗄️ Stored seen IDs",
            "minimum": 1000,
            "maximum": 1000000,
            "type": "integer",
            "description": "Hidden default: maximum seen IDs retained for monitoring dedupe state.",
            "default": 200000
          },
          "is3D": {
            "title": "3D",
            "type": "boolean",
            "description": "Hidden rare YouTube search filter: stereoscopic 3D videos.",
            "default": false
          },
          "is360": {
            "title": "360",
            "type": "boolean",
            "description": "Hidden rare YouTube search filter: 360-degree videos.",
            "default": false
          },
          "isVR180": {
            "title": "VR180",
            "type": "boolean",
            "description": "Hidden rare YouTube search filter: VR180 videos.",
            "default": false
          },
          "hasCC": {
            "title": "Creative Commons",
            "type": "boolean",
            "description": "Hidden rare YouTube search filter: Creative Commons videos.",
            "default": false
          },
          "hasLocation": {
            "title": "Location tag",
            "type": "boolean",
            "description": "Hidden rare YouTube search filter: videos with a public location tag.",
            "default": false
          },
          "isBought": {
            "title": "Purchased",
            "type": "boolean",
            "description": "Hidden compatibility search filter for purchased videos.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}