{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper | Videos, Channels, Shorts & Comments",
    "description": "Get YouTube videos with exact views, likes, publish date, description and chapters, channels with subscribers, country, joined date and links, playlists and top comments. Search terms by country and filters, or channel, playlist and video URLs. No login or API key.",
    "version": "0.0",
    "x-build-id": "dOBOPGJkHdFPYAuzw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/genial_candlestand~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-genial_candlestand-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/genial_candlestand~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-genial_candlestand-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/genial_candlestand~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-genial_candlestand-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": {
          "queries": {
            "title": "Search terms",
            "type": "array",
            "description": "YouTube search terms, one per line. Each term returns up to 'Max results per input' rows of the type chosen in 'Search result type'. Give search terms, YouTube URLs or both.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "YouTube URLs",
            "type": "array",
            "description": "Channel URLs (@handle, /channel/UC…, /c/…, /user/…, also with a /videos, /shorts or /streams suffix), playlist URLs (/playlist?list=…), video URLs (watch?v=, youtu.be/, /shorts/, /live/) or search URLs (/results?search_query=…). A bare @handle, 11-character video id or UC… channel id works too. Hashtag URLs run as a search for #tag.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchType": {
            "title": "Search result type",
            "enum": [
              "video",
              "shorts",
              "channel",
              "playlist",
              "all"
            ],
            "type": "string",
            "description": "What 'Search terms' return: videos, Shorts, channels, playlists or YouTube's mixed list. Shorts search takes no sort or filters; channel and playlist search take only 'Sort search by'.",
            "default": "video"
          },
          "sortBy": {
            "title": "Sort search by",
            "enum": [
              "relevance",
              "viewCount"
            ],
            "type": "string",
            "description": "Order of search results. 'Most viewed' works for videos, channels, playlists and everything, not for Shorts. Sorting by upload date is not offered: YouTube ignores it.",
            "default": "relevance"
          },
          "uploadDate": {
            "title": "Upload date",
            "enum": [
              "any",
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Only search results uploaded in this period. Works only when 'Search result type' is Videos or Everything.",
            "default": "any"
          },
          "duration": {
            "title": "Video length",
            "enum": [
              "any",
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "Only search results of this length: under 4 minutes, 4–20 minutes or over 20 minutes. Works only when 'Search result type' is Videos or Everything.",
            "default": "any"
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter code (e.g. US, DE, JP) or English country name YouTube ranks search results for. It must be a country YouTube supports; others (e.g. CU, KP) stop the run with an input error. Texts stay in English.",
            "default": "US"
          },
          "channelTabs": {
            "title": "Channel tabs",
            "type": "array",
            "description": "Which tabs of each channel URL to list: Videos, Shorts, Live (past and current streams). Leave empty to get only the channel row. A URL with its own tab suffix (/@x/shorts) uses that tab.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "shorts",
                "streams"
              ],
              "enumTitles": [
                "Videos",
                "Shorts",
                "Live"
              ]
            },
            "default": [
              "videos"
            ]
          },
          "maxResultsPerInput": {
            "title": "Max results per input",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Max video, channel or playlist rows per search term, per channel tab and per playlist (1–10,000). YouTube ends a search after about 450 results. The channel row and comments are not counted.",
            "default": 20
          },
          "videoDetails": {
            "title": "Video details",
            "enum": [
              "full",
              "stats",
              "basic"
            ],
            "type": "string",
            "description": "How much to fetch per listed video. Full: description, exact views and likes, date, subscribers, comment count, hashtags, chapters. Stats: exact views, likes and date. Basic: the list as shown (rounded views, '3 days ago'), fastest. Video URLs always get Full.",
            "default": "full"
          },
          "maxCommentsPerVideo": {
            "title": "Max comments per video",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Top comments to save per video, each as its own row, for video URLs and every listed video (0–10,000; 0 = no comments). Replies are not saved, only their count.",
            "default": 0
          },
          "includeChannelAbout": {
            "title": "Channel About details",
            "type": "boolean",
            "description": "Add the channel's About panel to channel rows: country, joined date, exact total views and video count, external links and whether a business email exists (the address itself needs a login and is never collected).",
            "default": true
          },
          "includePlayerData": {
            "title": "Tags, category and exact publish time",
            "type": "boolean",
            "description": "Add tags, category, exact publish time, length in seconds, family-safe and unlisted flags to every video row (one extra request per video). Needs the RESIDENTIAL proxy group: on datacenter IPs YouTube withholds these fields for about 40% of videos.",
            "default": false
          },
          "maxItems": {
            "title": "Max rows in total",
            "minimum": 1,
            "type": "integer",
            "description": "Stop the whole run after this many rows of every type: videos, channels, playlists and comments. Empty = no total limit."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify datacenter proxy works for everything except 'Tags, category and exact publish time', which needs the RESIDENTIAL group.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}