{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper with Transcripts & Comments",
    "description": "YouTube crawler and video scraper. Alternative YouTube API with no limits or API key. Scrape search results, channels, and playlists. Extract views, likes, subscriber counts, and comments, and download transcripts and subtitles as text, SRT, or WebVTT.",
    "version": "0.1",
    "x-build-id": "jxhuaypUL3wRixR1H"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/misterzaid.py~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-misterzaid.py-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/misterzaid.py~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-misterzaid.py-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/misterzaid.py~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-misterzaid.py-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": {
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Search terms, exactly as you would type them into the YouTube search bar. Each query returns up to <b>Max results</b> videos.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Direct links to YouTube <b>videos</b>, <b>channels</b> (URL, @handle, or ID), or <b>playlists</b>. Can be combined with search queries.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of videos to scrape per search query, channel, or playlist.",
            "default": 20
          },
          "sortBy": {
            "title": "Sort search results by",
            "enum": [
              "relevance",
              "upload_date",
              "view_count",
              "rating"
            ],
            "type": "string",
            "description": "Sorting order for search results. Applies to search queries only.",
            "default": "relevance"
          },
          "uploadDate": {
            "title": "Upload date",
            "enum": [
              "any",
              "last_hour",
              "today",
              "this_week",
              "this_month",
              "this_year"
            ],
            "type": "string",
            "description": "Only return videos uploaded within this period. Applies to search queries only.",
            "default": "any"
          },
          "duration": {
            "title": "Video duration",
            "enum": [
              "any",
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "Filter search results by video length. Short is under 4 minutes, long is over 20 minutes.",
            "default": "any"
          },
          "resultType": {
            "title": "Result type",
            "enum": [
              "video",
              "channel",
              "playlist",
              "movie"
            ],
            "type": "string",
            "description": "What kind of results the search should return.",
            "default": "video"
          },
          "features": {
            "title": "Video features",
            "type": "array",
            "description": "Only return search results with these features (HD, subtitles, live, and so on).",
            "items": {
              "type": "string",
              "enum": [
                "hd",
                "subtitles",
                "cc",
                "live",
                "4k",
                "360",
                "vr180",
                "3d",
                "hdr",
                "creative_commons"
              ],
              "enumTitles": [
                "HD",
                "Subtitles/CC",
                "Closed captions",
                "Live",
                "4K",
                "360 degrees",
                "VR180",
                "3D",
                "HDR",
                "Creative Commons"
              ]
            }
          },
          "includeVideoDetails": {
            "title": "Include full video details",
            "type": "boolean",
            "description": "Fetch full metadata for every video found (description, like count, comment count, subscriber count, chapters). Adds one or two extra requests per video, so runs take longer.",
            "default": false
          },
          "downloadTranscripts": {
            "title": "Download transcripts",
            "type": "boolean",
            "description": "Fetch the transcript (subtitles) of every video and attach it to the dataset item.",
            "default": false
          },
          "transcriptLanguage": {
            "title": "Transcript language",
            "type": "string",
            "description": "Preferred transcript language code, for example <code>en</code>, <code>es</code>, or <code>de</code>. Falls back to whatever is available.",
            "default": "en"
          },
          "translateTranscriptTo": {
            "title": "Translate transcript to",
            "type": "string",
            "description": "Optional target language code. If set, the transcript is machine-translated by YouTube where available."
          },
          "transcriptFormat": {
            "title": "Transcript format",
            "enum": [
              "text",
              "srt",
              "webvtt",
              "json"
            ],
            "type": "string",
            "description": "Output format of the transcript text.",
            "default": "text"
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Fetch top comments for every video and attach them to the dataset item.",
            "default": false
          },
          "maxComments": {
            "title": "Max comments per video",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of top-level comments per video. Only used when comments are enabled.",
            "default": 20
          },
          "includeCommentReplies": {
            "title": "Include comment replies",
            "type": "boolean",
            "description": "Also fetch replies for each comment. One extra request per comment thread, so this is slow on videos with many comments.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxies used for scraping. Apify datacenter proxies work for search, channels, and playlists. For transcripts at scale, residential proxies are more reliable.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}