{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper - Videos, Channels, Comments & Subtitles",
    "description": "YouTube API alternative with no quota or key: channels, videos, Shorts, live streams, playlists, search, hashtags, community posts, comments and replies, subtitles (SRT/VTT/text), chapters and exact upload dates. Drop-in input for popular YouTube scrapers. From $0.80 per 1,000.",
    "version": "0.1",
    "x-build-id": "bAb2yqPI7rAvR6IH3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alom~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alom-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/alom~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alom-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/alom~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alom-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": "Any mix of <b>channel</b> (<code>/@handle</code>, <code>/channel/UC…</code>, <code>/c/…</code>, <code>/user/…</code>, also a single tab: <code>/@handle/shorts</code>, <code>/streams</code>, <code>/posts</code> (community), <code>/playlists</code>), <b>video</b> or <b>Shorts</b> URLs, <b>playlists</b>, <b>hashtag pages</b> (<code>/hashtag/…</code>) and <b>search result pages</b> (<code>/results?search_query=…</code>). A URL that is not YouTube is skipped and reported; it does not stop the run.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchQueries": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords, exactly as you would type them into YouTube's search bar. Each keyword returns up to <b>Max videos</b> results.",
            "items": {
              "type": "string"
            }
          },
          "channels": {
            "title": "Channel names",
            "type": "array",
            "description": "Optional: channel handles without the @ (e.g. <code>nasa</code>) or channel URLs. Same as putting the channel URL in <b>YouTube URLs</b>.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Optional: hashtags with or without <code>#</code> (e.g. <code>cats</code>). YouTube shows logged-out visitors only ~20-30 videos on a hashtag page; the rest up to <b>Max videos</b> comes from a search for the hashtag (those rows have a search URL in <code>fromYTUrl</code>). Shorts: set <b>Max Shorts</b>.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max videos per channel / search / playlist",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Regular videos per channel, per search term and per playlist. Set to 0 (and the two fields below to 0) to get one <b>channel info</b> row per channel.",
            "default": 20
          },
          "maxResultsShorts": {
            "title": "Max Shorts per channel",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Shorts from each channel's Shorts tab.",
            "default": 0
          },
          "maxResultStreams": {
            "title": "Max live streams per channel",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Past, live and upcoming streams from each channel's Live tab.",
            "default": 0
          },
          "maxPosts": {
            "title": "Max community posts per channel",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Posts from each channel's <b>Posts</b> (community) tab: text, images, polls, exact like count, comment count. Respects <b>Only videos published after</b>.",
            "default": 0
          },
          "maxPlaylists": {
            "title": "Max playlists per channel",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "One row per playlist on each channel's <b>Playlists</b> tab (title, URL, number of videos). To get a playlist's videos, add its URL to <b>YouTube URLs</b>.",
            "default": 0
          },
          "includeVideoDetails": {
            "title": "Add full video details",
            "type": "boolean",
            "description": "Opens every video from a channel, search or playlist to add <b>exact</b> views, <b>likes</b>, comment count, exact upload time, duration, full description, tags and category. About 2 extra requests per video, so runs take longer - the price per result stays the same. Video URLs you enter always get full details.",
            "default": false
          },
          "includeRelatedVideos": {
            "title": "Add related videos",
            "type": "boolean",
            "description": "Adds the ~20 videos YouTube suggests next to each video (<code>relatedVideos</code>: id, title, channel, views, duration). Needs one extra request per video from channels, searches and playlists; free for video URLs.",
            "default": false
          },
          "downloadSubtitles": {
            "title": "Download subtitles",
            "type": "boolean",
            "description": "Adds the video's subtitles (uploaded or YouTube's automatic ones) in the language and format below, plus the list of languages available (<code>subtitleLanguages</code>). No AI transcription: videos without subtitles get <code>subtitles: []</code>. Costs no extra per row; about 2 extra requests per video.",
            "default": false
          },
          "subtitlesLanguage": {
            "title": "Subtitles language",
            "type": "string",
            "description": "Language code (<code>en</code>, <code>de</code>, <code>pt-BR</code>, …) or <code>any</code> for the video's first track. <code>en</code> also matches <code>en-GB</code> etc.",
            "default": "en"
          },
          "subtitlesFormat": {
            "title": "Subtitles format",
            "enum": [
              "srt",
              "vtt",
              "xml",
              "plaintext"
            ],
            "type": "string",
            "description": "The text is in the field named after the format (<code>srt</code>, <code>vtt</code>, …).",
            "default": "srt"
          },
          "preferAutoGeneratedSubtitles": {
            "title": "Prefer automatic subtitles",
            "type": "boolean",
            "description": "Use YouTube's automatic (speech-recognition) subtitles even when the uploader provided some.",
            "default": false
          },
          "saveSubsToKVS": {
            "title": "Also save subtitles as files",
            "type": "boolean",
            "description": "Saves each subtitle file to the run's key-value store; its link is in <code>srtUrl</code> (or <code>vttUrl</code>, …).",
            "default": false
          },
          "sortingOrder": {
            "title": "Sort search results by",
            "enum": [
              "relevance",
              "rating",
              "date",
              "views",
              "popularity"
            ],
            "type": "string",
            "description": "YouTube currently honours only <b>Relevance</b> and <b>View count</b> / <b>Popularity</b> (the same sort); for recent videos use <b>Upload date</b> below."
          },
          "dateFilter": {
            "title": "Upload date",
            "enum": [
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Search only."
          },
          "videoType": {
            "title": "Type",
            "enum": [
              "video",
              "shorts",
              "movie",
              "channel",
              "playlist"
            ],
            "type": "string",
            "description": "Search only. <b>Channels</b> returns one channel row per result (name, handle, subscribers); <b>Playlists</b> one playlist row per result."
          },
          "lengthFilter": {
            "title": "Duration",
            "enum": [
              "under3",
              "between320",
              "plus20",
              "under4",
              "between420"
            ],
            "type": "string",
            "description": "Search only."
          },
          "isHD": {
            "title": "HD",
            "type": "boolean",
            "description": "Search only: HD videos."
          },
          "hasSubtitles": {
            "title": "Subtitles/CC",
            "type": "boolean",
            "description": "Search only: Subtitles/CC videos."
          },
          "hasCC": {
            "title": "Creative Commons",
            "type": "boolean",
            "description": "Search only: Creative Commons videos."
          },
          "is3D": {
            "title": "3D",
            "type": "boolean",
            "description": "Search only: 3D videos."
          },
          "isLive": {
            "title": "Live",
            "type": "boolean",
            "description": "Search only: Live videos."
          },
          "isBought": {
            "title": "Purchased",
            "type": "boolean",
            "description": "Search only: Purchased videos."
          },
          "is4K": {
            "title": "4K",
            "type": "boolean",
            "description": "Search only: 4K videos."
          },
          "is360": {
            "title": "360°",
            "type": "boolean",
            "description": "Search only: 360° videos."
          },
          "hasLocation": {
            "title": "Location",
            "type": "boolean",
            "description": "Search only: Location videos."
          },
          "isHDR": {
            "title": "HDR",
            "type": "boolean",
            "description": "Search only: HDR videos."
          },
          "isVR180": {
            "title": "VR180",
            "type": "boolean",
            "description": "Search only: VR180 videos."
          },
          "oldestPostDate": {
            "title": "Only videos published after",
            "type": "string",
            "description": "A date (<code>2026-01-31</code>) or an age (<code>30 days</code>, <code>2 weeks</code>, <code>6 months</code>). <code>1 day</code> = today only. Applies to channel Videos, Shorts and Live tabs and forces <b>Newest</b> order."
          },
          "sortVideosBy": {
            "title": "Channel videos order",
            "enum": [
              "NEWEST",
              "POPULAR",
              "OLDEST"
            ],
            "type": "string",
            "description": "The sort buttons on a channel's Videos, Shorts and Live tabs.",
            "default": "NEWEST"
          },
          "maxComments": {
            "title": "Max comments per video",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Comments for every video in the run (video URLs, and videos found in channels, searches and playlists). Replies count toward this limit. 0 = no comments.",
            "default": 0
          },
          "sortCommentsBy": {
            "title": "Comments order",
            "enum": [
              "TOP_COMMENTS",
              "NEWEST_FIRST"
            ],
            "type": "string",
            "description": "Same as the sort menu above YouTube's comments.",
            "default": "NEWEST_FIRST"
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Also scrape the replies of each comment (they count toward <b>Max comments per video</b>).",
            "default": false
          },
          "oldestCommentDate": {
            "title": "Only comments posted after",
            "type": "string",
            "description": "A date (<code>2026-01-31</code>) or an age (<code>7 days</code>). YouTube shows comment dates as \"3 days ago\", so this is day/week/month precise. Forces <b>Newest first</b>."
          },
          "commentsOnly": {
            "title": "Comments only (no video rows)",
            "type": "boolean",
            "description": "Output only comment rows. Use this when switching from a comments-only scraper.",
            "default": false
          },
          "deltaMode": {
            "title": "Only new videos/comments since my last run",
            "type": "boolean",
            "description": "Each run skips videos and comments that an earlier run with the same <b>Monitoring name</b> already returned. Schedule the run for daily/weekly monitoring.",
            "default": false
          },
          "monitorName": {
            "title": "Monitoring name",
            "type": "string",
            "description": "Any name, e.g. <code>competitors-weekly</code>. Runs with the same name share their memory."
          },
          "maxItems": {
            "title": "Max results in total",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Stops the run after this many rows in total (all inputs together). 0 = no limit (your spending limit still applies).",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Parallel inputs",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many channels / searches / videos are processed at the same time.",
            "default": 5
          },
          "gl": {
            "title": "Country",
            "type": "string",
            "description": "2-letter country code (<code>US</code>, <code>DE</code>, <code>IN</code>, …) YouTube tailors search and hashtag results to. Default <code>US</code>. Texts stay English."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "The default (Apify datacenter proxy) works for YouTube. If YouTube starts blocking it, the run switches to residential proxies on its own and says so in the log.",
            "default": {
              "useApifyProxy": true
            }
          },
          "youtubeCookies": {
            "title": "Your YouTube cookies (optional, advanced)",
            "type": "string",
            "description": "Only for <b>age-restricted videos and their comments</b>, which YouTube hides from logged-out visitors. Paste the cookies of a logged-in youtube.com tab (a cookie-extension JSON export, a cookies.txt file, or a <code>name=value; …</code> Cookie header). ⚠️ Requests are then made as that Google account: use a secondary account, not your main one - YouTube may ask it to verify itself or restrict it for automated use. Stored encrypted, never logged or saved to the dataset. Not needed for anything else."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}