{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper & API: Shorts, Videos, Channels & Comments",
    "description": "YouTube video, channel, Shorts, playlist and search results scraper with full comment threads: views, likes, subscriber counts, publish dates, durations, chapters, hashtags and description links. Paste links, @handles or keywords. Optional engagement rates and creator vetting. No API key or quota.",
    "version": "0.1",
    "x-build-id": "iXN2h6gTDNIUOiH9g"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automatic~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automatic-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/automatic~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automatic-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/automatic~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automatic-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": "Any YouTube links",
            "maxItems": 5000,
            "type": "array",
            "description": "Paste any YouTube link: videos, Shorts, live streams, channels (including their /videos, /shorts and /streams tabs), public playlists, search-result pages (their filters are kept) and hashtag pages. Each link is collected as what it is. Example: [{\"url\": \"https://www.youtube.com/@mkbhd/videos\"}]. Empty adds no sources of this kind; when every source list is empty, runs the one-video sample.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "videoUrls": {
            "title": "Video links or IDs",
            "maxItems": 5000,
            "type": "array",
            "description": "Watch, youtu.be, Shorts or live links, or 11-character video IDs. Each becomes a full video row; add comments below. A channel, playlist or search link pasted here is collected as that kind. Example: [\"https://www.youtube.com/watch?v=dQw4w9WgXcQ\"]. Empty adds no sources of this kind; when every source list is empty, runs the one-video sample.",
            "items": {
              "type": "string"
            }
          },
          "channelUrls": {
            "title": "Channels",
            "maxItems": 1000,
            "type": "array",
            "description": "Channel links, @handles or UC… IDs, for example @mkbhd. Each adds a profile row plus its latest uploads. A video, playlist or search link pasted here is collected as that kind. Example: [\"https://www.youtube.com/@mkbhd\"]. Empty adds no sources of this kind; when every source list is empty, runs the one-video sample.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search terms",
            "maxItems": 1000,
            "type": "array",
            "description": "Search YouTube as a visitor would and collect the results in order. Example: [\"python tutorial\"]. Empty adds no sources of this kind; when every source list is empty, runs the one-video sample.",
            "items": {
              "type": "string"
            }
          },
          "playlistUrls": {
            "title": "Public playlists",
            "maxItems": 1000,
            "type": "array",
            "description": "Public PL… playlist IDs or youtube.com/playlist?list=PL… links. Watch links with list= collect the playlist from its first entry. No account lists, mixes, private or collaborative playlists. Up to the per-source limit of unique videos per playlist.",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Search terms (older name)",
            "maxItems": 1000,
            "type": "array",
            "description": "Same as Search terms; both lists are combined with duplicates removed. Example: [\"python tutorial\"]. Empty adds no sources of this kind; when every source list is empty, runs the one-video sample.",
            "items": {
              "type": "string"
            }
          },
          "searchSort": {
            "title": "Sort search results",
            "enum": [
              "relevance",
              "popularity"
            ],
            "type": "string",
            "description": "Relevance (YouTube's default order) or popularity. Empty keeps YouTube's default order."
          },
          "uploadDate": {
            "title": "Upload date",
            "enum": [
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Only videos uploaded within this period. Empty applies no date filter."
          },
          "duration": {
            "title": "Length",
            "enum": [
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "Only videos of this length. Empty applies no length filter."
          },
          "searchType": {
            "title": "Result type",
            "enum": [
              "video",
              "shorts",
              "channel"
            ],
            "type": "string",
            "description": "Videos only, Shorts only, or channels (one channel row per result, with the details the result card shows). Empty keeps YouTube's normal mixed results."
          },
          "searchFeatures": {
            "title": "Features",
            "type": "array",
            "description": "Only videos with all the selected features. Empty applies no feature filter.",
            "items": {
              "type": "string",
              "enum": [
                "live",
                "4k",
                "360",
                "vr180",
                "creative_commons"
              ],
              "enumTitles": [
                "Live now",
                "4K",
                "360°",
                "VR180",
                "Creative Commons"
              ]
            }
          },
          "includeShorts": {
            "title": "Keep Shorts in results",
            "type": "boolean",
            "description": "Keep Shorts that appear in search results, channel uploads and playlists. Example: true. If left unset, uses true.",
            "default": true
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country code for the search market, for example GB or DE: the results YouTube shows in that country. Empty uses US. It does not change the connection settings below."
          },
          "language": {
            "title": "Interface language",
            "type": "string",
            "description": "Only search uses the requested language, for example en, es or de. Empty uses English. Every other page is read in English, including video details, channel and playlist pages, and comments. Titles, descriptions and labels from those pages reflect what YouTube shows English-language viewers, including translations where available. On localized search cards, subscriber counts may be missing and localized live badges may leave isLive false. Listing counts can be rounded in any language."
          },
          "includeChannelInfo": {
            "title": "Channel profile rows",
            "type": "boolean",
            "description": "One profile row per channel with subscribers, total views, video count, join date, country, description and links. Defaults to true for regular runs. Scheduled watches skip profile rows.",
            "default": true
          },
          "channelSort": {
            "title": "Channel video order",
            "enum": [
              "latest",
              "popular",
              "oldest"
            ],
            "type": "string",
            "description": "Which channel videos come first, as on the channel's own page. Empty uses latest."
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Only channel and playlist videos published on or after this date: 2026-10-01, or a relative value such as 30 days or 6 months. Exact with full details on; otherwise based on the upload age YouTube shows, so a video posted just before the cutoff can be kept. For searches, use Upload date."
          },
          "onlyNewSinceLastRun": {
            "title": "Only new channel uploads",
            "type": "boolean",
            "description": "Return the latest uploads on the first run and skip previously delivered video IDs on later runs that reuse the same watch name. Works with the Videos, Shorts and Live tabs in latest order.",
            "default": false
          },
          "watchName": {
            "title": "Watch name",
            "type": "string",
            "description": "Required for Only new channel uploads. Reuse the same name on your schedule. Use up to 64 letters, digits, hyphens or underscores, starting with a letter or digit. Give each independent watch its own name."
          },
          "includeChannelShorts": {
            "title": "Also collect channel Shorts",
            "type": "boolean",
            "description": "Also collect each channel's Shorts tab, up to the per-source limit, in addition to the uploads. Example: false. If left unset, uses false.",
            "default": false
          },
          "includeChannelStreams": {
            "title": "Also collect channel live streams",
            "type": "boolean",
            "description": "Also collect each channel's Live tab: past streams and any stream that is live now, marked isLive. Example: false. If left unset, uses false.",
            "default": false
          },
          "maxStreamsPerChannel": {
            "title": "Live streams per channel",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "How many live streams to collect per channel when live streams are on. Empty uses the per-source limit."
          },
          "maxComments": {
            "title": "Comments per video link",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Comments to collect for each video in Video links (0 = none). Replies count toward this limit. Example: 0. If left unset, uses 0.",
            "default": 0
          },
          "commentsSort": {
            "title": "Comment order",
            "enum": [
              "top",
              "newest"
            ],
            "type": "string",
            "description": "Top comments (YouTube's ranking) or newest first. Example: \"top\". If left unset, uses \"top\".",
            "default": "top"
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Also collect replies under each comment, marked with the parent comment ID. Example: false. If left unset, uses false.",
            "default": false
          },
          "commentsForAllVideos": {
            "title": "Comments for every collected video",
            "type": "boolean",
            "description": "Also collect comments (up to Comments per video) for every video found by searches, channels, playlists and hashtags, not only for Video links. Comment rows then also show whether the creator hearted them. Example: false. If left unset, uses false.",
            "default": false
          },
          "maxResults": {
            "title": "Videos per source",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "How many videos to collect for each search term, channel and playlist. 0 on a channel collects only its profile row, plus any Shorts or live streams asked for with their own limits. Example: 10. If left unset, uses 20.",
            "default": 20
          },
          "maxItems": {
            "title": "Maximum rows for the run",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard stop across all sources and row types, so you control the cost. Example: 1000. If left unset, uses 1000.",
            "default": 1000
          },
          "videoDetails": {
            "title": "Full details for listed videos",
            "type": "boolean",
            "description": "With this off, search, channel, Shorts and playlist videos carry the result-card fields. Card view counts can be rounded. Turn this on for likes, comment count, exact view count and publish date when available, subscribers, the full description, chapters, description links and the verified badge. Full details take longer to collect. Defaults to false.",
            "default": false
          },
          "includeEngagement": {
            "title": "Engagement and creator stats",
            "type": "boolean",
            "description": "Adds engagement rate, like rate, comment rate, views per day and the format (video, Short or live) to every video row, and a recent-uploads summary (median and average views, views per subscriber, upload pace) to each channel profile row. Rates need full details: use Video links or turn on Full details for listed videos. Example: false. If left unset, uses false.",
            "default": false
          },
          "includeTranscriptInfo": {
            "title": "Flag videos with a transcript",
            "type": "boolean",
            "description": "Adds hasTranscript to video rows: true when the video's page offers a transcript (uploaded or automatic captions). Shown on rows with full details. Pair it with YouTube Transcripts Scraper to fetch the text for those videos only. Example: false. If left unset, uses false.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Connection",
            "type": "object",
            "description": "The default works for most runs. Change it only for a specific connection country or your own proxies: a direct connection, Apify datacenter proxy or your own proxy URLs. Residential is not used; a request for it runs on the standard connection. Example: {\"useApifyProxy\": true, \"apifyProxyCountry\": \"US\"}. If left unset, uses {\"useApifyProxy\": true, \"apifyProxyCountry\": \"US\"}.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}