{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper - Captions, SRT, VTT & RAG",
    "description": "Unofficial and not affiliated with YouTube or Google. Extract clean, timestamped transcripts from public videos and Shorts with language selection, translation, subtitles, Markdown, and RAG-ready chunks.",
    "version": "1.0",
    "x-build-id": "WbaQttJNwEDJ8qTCv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sebastian-actors~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sebastian-actors-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/sebastian-actors~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sebastian-actors-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/sebastian-actors~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sebastian-actors-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",
        "required": [
          "videoUrls"
        ],
        "properties": {
          "videoUrls": {
            "title": "YouTube video URLs or IDs",
            "minItems": 1,
            "maxItems": 1000,
            "type": "array",
            "description": "Individual YouTube video URLs or raw 11-character video IDs. Channels, playlists, profiles, and search pages are returned as per-item errors.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048
            }
          },
          "preferredLanguages": {
            "title": "Preferred languages",
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "Ordered BCP 47 language preferences. Exact regional matches beat base-language matches.",
            "items": {
              "type": "string",
              "enumSuggestedValues": [
                "en",
                "en-US",
                "es",
                "es-419",
                "fr",
                "de",
                "pt",
                "pt-BR",
                "it",
                "ja",
                "ko",
                "zh-Hans",
                "zh-Hant",
                "ar",
                "hi"
              ],
              "enumTitles": [
                "English",
                "English (United States)",
                "Spanish",
                "Spanish (Latin America)",
                "French",
                "German",
                "Portuguese",
                "Portuguese (Brazil)",
                "Italian",
                "Japanese",
                "Korean",
                "Chinese (Simplified)",
                "Chinese (Traditional)",
                "Arabic",
                "Hindi"
              ]
            },
            "default": [
              "en"
            ]
          },
          "captionPreference": {
            "title": "Caption preference",
            "enum": [
              "manual-first",
              "auto-first",
              "manual-only",
              "auto-only"
            ],
            "type": "string",
            "description": "Choose whether human-created or automatically generated captions are preferred or required.",
            "default": "manual-first"
          },
          "fallbackToAnyLanguage": {
            "title": "Fallback to any language",
            "type": "boolean",
            "description": "Select another available language when no preferred language matches.",
            "default": true
          },
          "translateTo": {
            "title": "Translate to",
            "minLength": 2,
            "maxLength": 35,
            "type": "string",
            "description": "Optional YouTube-supported target language code. Existing native target-language captions are preferred."
          },
          "outputFormats": {
            "title": "Output formats",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "Transcript artifacts to include in each successful result.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "segments",
                "srt",
                "vtt",
                "markdown",
                "chunks"
              ],
              "enumTitles": [
                "Plain text",
                "Timestamped segments",
                "SRT subtitles",
                "WebVTT subtitles",
                "Markdown",
                "RAG chunks"
              ]
            },
            "default": [
              "text",
              "segments"
            ]
          },
          "cleaning": {
            "title": "Transcript cleaning",
            "type": "object",
            "description": "Configure deterministic text normalization. No punctuation is invented.",
            "properties": {
              "decodeHtmlEntities": {
                "title": "Decode HTML entities",
                "description": "Decode entities such as &amp;amp;.",
                "type": "boolean",
                "editor": "checkbox",
                "default": true
              },
              "normalizeWhitespace": {
                "title": "Normalize whitespace",
                "description": "Collapse internal whitespace and trim segment text.",
                "type": "boolean",
                "editor": "checkbox",
                "default": true
              },
              "normalizeUnicode": {
                "title": "Normalize Unicode",
                "description": "Normalize text to Unicode NFC.",
                "type": "boolean",
                "editor": "checkbox",
                "default": true
              },
              "deduplicateAdjacentSegments": {
                "title": "Deduplicate adjacent segments",
                "description": "Remove only exact adjacent text with substantially overlapping timestamps.",
                "type": "boolean",
                "editor": "checkbox",
                "default": true
              },
              "removeNonSpeechCues": {
                "title": "Remove non-speech cues",
                "description": "Remove standalone cues such as [Music] and [Applause].",
                "type": "boolean",
                "editor": "checkbox",
                "default": false
              },
              "paragraphGapSeconds": {
                "title": "Paragraph gap",
                "description": "Start a new paragraph after a gap of this many seconds.",
                "type": "number",
                "editor": "number",
                "minimum": 0,
                "maximum": 60,
                "default": 2.5,
                "unit": "seconds"
              }
            },
            "default": {
              "decodeHtmlEntities": true,
              "normalizeWhitespace": true,
              "normalizeUnicode": true,
              "deduplicateAdjacentSegments": true,
              "removeNonSpeechCues": false,
              "paragraphGapSeconds": 2.5
            },
            "additionalProperties": false
          },
          "chunking": {
            "title": "RAG chunking",
            "type": "object",
            "description": "Configure segment-aware chunks generated when the chunks format is selected.",
            "properties": {
              "maxCharacters": {
                "title": "Maximum characters",
                "description": "Maximum Unicode code points per chunk.",
                "type": "integer",
                "editor": "number",
                "minimum": 250,
                "maximum": 20000,
                "default": 2000
              },
              "overlapCharacters": {
                "title": "Overlap characters",
                "description": "Approximate overlap retained as whole segments.",
                "type": "integer",
                "editor": "number",
                "minimum": 0,
                "maximum": 19999,
                "default": 200
              },
              "includeTimestamps": {
                "title": "Include timestamps",
                "description": "Prefix chunk segments with their start timestamps.",
                "type": "boolean",
                "editor": "checkbox",
                "default": true
              }
            },
            "default": {
              "maxCharacters": 2000,
              "overlapCharacters": 200,
              "includeTimestamps": true
            },
            "additionalProperties": false
          },
          "includeMetadata": {
            "title": "Include video metadata",
            "type": "boolean",
            "description": "Include available title, channel, duration, publication, thumbnail, Shorts, and live metadata.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Number of videos processed concurrently.",
            "default": 5
          },
          "maxRetriesPerVideo": {
            "title": "Retries per video",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Number of complete session retries after the first attempt.",
            "default": 3
          },
          "requestTimeoutSecs": {
            "title": "Request timeout",
            "minimum": 10,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout applied to each upstream HTTP request.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Use Apify Proxy or your own proxy URLs for YouTube requests.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "debug": {
            "title": "Debug logging",
            "type": "boolean",
            "description": "Log sanitized phase diagnostics without transcripts, cookies, tokens, response bodies, or proxy URLs.",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}