{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper - Most Comprehensive",
    "description": "🔥 ~$0.05/1K contents 🔥 Get public YouTube videos, channels, playlists, podcasts, courses, Posts, clips, comments, captions, and live chat.",
    "version": "0.1",
    "x-build-id": "iHgPZrfsihk6ogPpO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kaix~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kaix-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/kaix~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-kaix-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/kaix~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-kaix-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "auto",
              "search",
              "video",
              "channel",
              "channelVideos",
              "channelShorts",
              "channelStreams",
              "channelPlaylists",
              "channelPodcasts",
              "channelCourses",
              "channelPosts",
              "post",
              "clip",
              "related",
              "liveChat",
              "hashtag",
              "playlist",
              "playlistDetails",
              "comments",
              "transcript"
            ],
            "type": "string",
            "description": "Auto selects a source type from each target. Queries select search. Collection modes read playlists, podcasts, courses, or posts from a channel. Related and liveChat modes take video targets. Clip mode takes public clip IDs or URLs.",
            "default": "auto"
          },
          "targets": {
            "title": "Targets",
            "maxItems": 50,
            "type": "array",
            "description": "Enter up to 50 YouTube URLs, IDs, handles, or hashtags for the selected mode. Use targets or queries, not both. Each entry must be a string.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2000
            }
          },
          "queries": {
            "title": "Search queries",
            "maxItems": 50,
            "type": "array",
            "description": "Enter up to 50 search terms or YouTube results URLs. Use only in auto or search mode. Do not also supply targets.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2000
            }
          },
          "maxItems": {
            "title": "Maximum output rows",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Global dataset row limit across all sources. Replies count as rows. Attached captions do not add rows. Zero is invalid.",
            "default": 100
          },
          "limits": {
            "title": "Content limits",
            "type": "object",
            "description": "Optional limits per discovery source, capped by maxItems. Without limits, collect regular videos. If any limit is set, omitted types use zero. All zero returns channel metadata for auto channel targets. Use only in discovery or playlist modes. In playlist mode, only videos is accepted.",
            "properties": {
              "videos": {
                "title": "Videos",
                "type": "integer",
                "minimum": 0,
                "maximum": 1000,
                "description": "Regular video limit. Also limits playlist entries. With a live search, used when streams is omitted."
              },
              "shorts": {
                "title": "Shorts",
                "type": "integer",
                "minimum": 0,
                "maximum": 1000,
                "description": "Shorts limit. Zero disables Shorts. A channelShorts target uses maxItems when all limits are omitted."
              },
              "streams": {
                "title": "Streams",
                "type": "integer",
                "minimum": 0,
                "maximum": 1000,
                "description": "Stream limit. Zero disables streams. A channelStreams target uses maxItems when all limits are omitted."
              }
            },
            "additionalProperties": false
          },
          "includeDetails": {
            "title": "Include full record details",
            "type": "boolean",
            "description": "Add full metadata to video, channel, or playlist discovery rows. Default is true in auto and false in explicit list modes. Direct detail modes always request their data. Extra requests can be needed."
          },
          "fields": {
            "title": "Output fields",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Optional top-level output field names. Identity, status, and file references remain. Selecting fields does not reduce collection, detail requests, or caption work.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z][A-Za-z0-9]*$"
            }
          },
          "search": {
            "title": "Search options",
            "type": "object",
            "description": "Use in auto, search, or hashtag mode. With search filters, a hashtag uses a search for #tag. These controls do not filter channel tabs.",
            "properties": {
              "sort": {
                "title": "Order",
                "type": "string",
                "editor": "select",
                "enum": [
                  "relevance",
                  "views"
                ],
                "description": "Omitted uses the server order. Only relevance and views are accepted."
              },
              "publishedWithin": {
                "title": "Upload period",
                "type": "string",
                "editor": "select",
                "enum": [
                  "today",
                  "week",
                  "month",
                  "year"
                ],
                "description": "Use today, week, month, or year. Hour search is no longer supported. Results require a publication date within the selected period."
              },
              "duration": {
                "title": "Duration",
                "type": "string",
                "editor": "select",
                "enum": [
                  "short",
                  "medium",
                  "long"
                ],
                "description": "Short is less than 3 minutes. Medium is 3 to 20 minutes inclusive. Long is more than 20 minutes. Results need exact durations."
              },
              "type": {
                "title": "Result type",
                "type": "string",
                "editor": "select",
                "enum": [
                  "video",
                  "movie",
                  "channel",
                  "playlist"
                ],
                "description": "Channel and playlist search accept only this type control. Use maxItems; video limits, caption options, and other search filters are invalid for these result types."
              },
              "features": {
                "title": "Features",
                "type": "array",
                "editor": "select",
                "description": "Requested YouTube features. Live selects one stream collection. Its limit is streams, then videos; with no limits, maxItems. Creative Commons is a license, not a caption track.",
                "items": {
                  "type": "string",
                  "enum": [
                    "hd",
                    "subtitles",
                    "creativeCommons",
                    "3d",
                    "live",
                    "purchased",
                    "4k",
                    "360",
                    "location",
                    "hdr",
                    "vr180"
                  ]
                },
                "maxItems": 11
              }
            },
            "additionalProperties": false
          },
          "channel": {
            "title": "Channel options",
            "type": "object",
            "description": "Use in auto or channelVideos, channelShorts, or channelStreams. Applies to video tabs only.",
            "properties": {
              "sort": {
                "title": "Order",
                "type": "string",
                "editor": "select",
                "enum": [
                  "newest",
                  "popular",
                  "oldest"
                ],
                "description": "Default is newest. YouTube must expose a requested popular or oldest order."
              },
              "publishedAfter": {
                "title": "Publication boundary",
                "type": "string",
                "editor": "textfield",
                "description": "Keep videos on or after this ISO date or relative age, such as 7 days. Uses newest channel order and can require extra requests. Relative dates use the saved run start time.",
                "minLength": 1,
                "maxLength": 100
              }
            },
            "additionalProperties": false
          },
          "comments": {
            "title": "Comment options",
            "type": "object",
            "description": "Comments mode only. Replies count toward maxItems.",
            "properties": {
              "sort": {
                "title": "Order",
                "type": "string",
                "editor": "select",
                "enum": [
                  "top",
                  "newest"
                ],
                "description": "Default is top."
              },
              "includeReplies": {
                "title": "Include replies",
                "type": "boolean",
                "description": "Default is false."
              },
              "maxReplies": {
                "title": "Replies per parent",
                "type": "integer",
                "minimum": 0,
                "maximum": 100,
                "description": "Default is 10. Requires includeReplies: true. Zero collects no replies."
              }
            },
            "additionalProperties": false
          },
          "captions": {
            "title": "Caption options",
            "type": "object",
            "description": "Supplying this group enables native captions unless mode is set. Without this group, captions are off except in transcript mode. Applies to video results and transcript mode.",
            "properties": {
              "mode": {
                "title": "Caption source",
                "type": "string",
                "editor": "select",
                "enum": [
                  "off",
                  "native"
                ],
                "description": "Native gets existing YouTube captions. Off cannot be combined with other caption options or transcript mode."
              },
              "language": {
                "title": "Language",
                "type": "string",
                "editor": "textfield",
                "description": "Default is en. Select an exact language, the same language family, any for one available track, or all for one preferred native track per available language.",
                "pattern": "^(?:any|all|[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*)$"
              },
              "translateTo": {
                "title": "Output language",
                "type": "string",
                "editor": "textfield",
                "description": "Optional output language. Translation requires a translatable track and a language offered by YouTube. The values any and all are not target languages.",
                "pattern": "^(?![Aa][Nn][Yy]$|[Aa][Ll][Ll]$)[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"
              },
              "format": {
                "title": "Format",
                "type": "string",
                "editor": "select",
                "enum": [
                  "srt",
                  "vtt",
                  "xml",
                  "plaintext"
                ],
                "description": "Default is srt. Timed segments are also returned."
              },
              "saveFile": {
                "title": "Save subtitle file",
                "type": "boolean",
                "description": "Default is false. Save formatted captions in the key-value store. Large captions always save files."
              },
              "prefer": {
                "title": "Track preference",
                "type": "string",
                "editor": "select",
                "enum": [
                  "manual",
                  "automatic"
                ],
                "description": "Default is manual. Select the other type when the preferred type is absent."
              },
              "wordTimings": {
                "title": "Native word offsets",
                "type": "boolean",
                "description": "Default is false. Include source word offsets relative to each segment. Missing words or offsets remain null."
              },
              "maxTracks": {
                "title": "Maximum native tracks",
                "type": "integer",
                "minimum": 1,
                "maximum": 20,
                "description": "Default is 10. Valid only with language all. All languages requires native mode without translateTo. Each transcript row counts toward maxItems; attached tracks remain within their video row."
              }
            },
            "additionalProperties": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Proxy settings for YouTube requests. Custom proxyUrls are supported. Set useApifyProxy to false for direct access.",
            "default": {
              "useApifyProxy": true
            }
          },
          "region": {
            "title": "YouTube region",
            "pattern": "^[A-Z]{2}$",
            "type": "string",
            "description": "Two-letter uppercase country code used for the YouTube response region. Does not set a proxy location or grant access to restricted content.",
            "default": "US"
          },
          "liveChat": {
            "title": "Live chat options",
            "type": "object",
            "description": "Use only in liveChat mode. Collect a finite snapshot or available replay messages. Respect returned delays. Missing or restricted chat returns an explicit error.",
            "properties": {
              "sort": {
                "title": "Chat order",
                "type": "string",
                "editor": "select",
                "enum": [
                  "top",
                  "all"
                ],
                "description": "Default is all. The selected order must be offered by YouTube."
              },
              "maxPages": {
                "title": "Maximum chat pages",
                "type": "integer",
                "minimum": 1,
                "maximum": 25,
                "description": "Default is 5. The row limit can stop collection sooner."
              },
              "maxWaitSeconds": {
                "title": "Maximum chat wait",
                "type": "integer",
                "minimum": 0,
                "maximum": 60,
                "description": "Default is 0, which collects one current chat snapshot. Available replay pages can continue without a wait. A positive value permits waits within this time limit."
              }
            },
            "additionalProperties": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}