{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper — Subtitles, Timestamps & LLM Text",
    "description": "Bulk YouTube transcript extractor and API. Paste videos, Shorts, playlists or channels, or search YouTube. Get text with timestamps, SRT, VTT and LLM-ready chunks, plus chapters, likes and metadata. Any caption language. No API key, no IP blocks. Videos without captions are free.",
    "version": "1.0",
    "x-build-id": "om4tpGT9YN7Sxwt9t"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/valev-lab~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-valev-lab-youtube-transcript-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/valev-lab~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-valev-lab-youtube-transcript-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/valev-lab~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-valev-lab-youtube-transcript-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": "Videos, Shorts, playlists, or channels",
            "type": "array",
            "description": "One per line: a video or Short URL, a plain 11-character video ID, a playlist URL (youtube.com/playlist?list=…), or a channel URL (youtube.com/@handle, /channel/UC…, or its /videos tab). Playlists and channels give their newest videos first, up to the limit below.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search YouTube",
            "type": "array",
            "description": "Search terms. The top videos of each search are scraped, up to the limit below.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerSource": {
            "title": "Max videos per playlist, channel, or search",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many videos to take from each playlist, channel, and search. Single videos always count as one.",
            "default": 20
          },
          "dateFrom": {
            "title": "Channel videos published from",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Channels only: skip videos published before this date (YYYY-MM-DD, UTC). Skipped videos are not charged."
          },
          "dateTo": {
            "title": "Channel videos published until",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Channels only: skip videos published after this date (YYYY-MM-DD, UTC, inclusive)."
          },
          "languages": {
            "title": "Preferred languages",
            "type": "array",
            "description": "Caption languages in order of preference, as codes such as en, de, pt-BR, or bg. en also matches en-US and en-GB.",
            "items": {
              "type": "string"
            },
            "default": [
              "en"
            ]
          },
          "useAnyAvailableLanguage": {
            "title": "Fall back to any available language",
            "type": "boolean",
            "description": "When none of your languages exists for a video, take its captions in the language it has (the original language first). Off: such videos come back with errorCode NO_CAPTIONS and are not charged.",
            "default": true
          },
          "captionType": {
            "title": "Caption type",
            "enum": [
              "both",
              "manual",
              "auto"
            ],
            "type": "string",
            "description": "Manual captions are uploaded by the creator; auto-generated ones come from YouTube's speech recognition. Both: manual is used when it exists in the chosen language.",
            "default": "both"
          },
          "translateTo": {
            "title": "Translate to",
            "type": "string",
            "description": "Optional language code. A video that has captions in this language uses them. Otherwise YouTube's own auto-translate is requested; when YouTube refuses it, you get the original language with a warning, and that row is not charged."
          },
          "outputFormats": {
            "title": "Output formats",
            "uniqueItems": true,
            "type": "array",
            "description": "What each row includes. text: the whole transcript as plain text. segments: lines with start time and duration in seconds. srt and vtt: subtitle files as text. llm: plain-text chunks with start and end times, sized for AI and RAG.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "segments",
                "srt",
                "vtt",
                "llm"
              ],
              "enumTitles": [
                "Plain text",
                "Timestamped segments",
                "SRT subtitles",
                "WebVTT subtitles",
                "LLM-ready chunks"
              ]
            },
            "default": [
              "text",
              "segments"
            ]
          },
          "chunkSize": {
            "title": "LLM chunk size (characters)",
            "minimum": 200,
            "maximum": 20000,
            "type": "integer",
            "description": "Longest chunk for the llm format, in characters. Chunks end between caption lines. 2,000 characters is about 400–500 tokens of English.",
            "default": 2000
          },
          "includeMetadata": {
            "title": "Include video details",
            "type": "boolean",
            "description": "Publish date, views, likes, description, tags, and thumbnail. Off: only the title, channel, and duration come with the transcript.",
            "default": true
          },
          "includeChapters": {
            "title": "Include chapters",
            "type": "boolean",
            "description": "The video's chapters with their start times, from the description or YouTube's automatic chapters.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify datacenter proxy is used first. A request YouTube blocks is repeated through residential proxy, at no extra cost to you.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}