{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper - Subtitles & Captions",
    "description": "Get YouTube transcripts (captions/subtitles) in bulk for videos, Shorts, channels, playlists or search results. Plain text, timestamped segments, SRT, VTT or RAG-ready chunks, with language fallback and video metadata. No browser, no API key. Pay only for transcripts found.",
    "version": "1.0",
    "x-build-id": "i9p3yQYcP1alQNhQ0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/adyg~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-adyg-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/adyg~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-adyg-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/adyg~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-adyg-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": {
          "urls": {
            "title": "YouTube URLs, video IDs or @handles",
            "type": "array",
            "description": "One per line, mixed freely: video URLs (<code>watch?v=</code>, <code>youtu.be/</code>, <code>/shorts/</code>, <code>/live/</code>, <code>/embed/</code>), 11-character video IDs, channel URLs or <code>@handles</code> (<code>/@name</code>, <code>/channel/UC…</code>, <code>/c/</code>, <code>/user/</code>; add <code>/shorts</code> or <code>/streams</code> to pick that tab) and playlist URLs (<code>playlist?list=</code>). The type is detected automatically.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Search YouTube and get transcripts of the top <i>Max videos</i> results (videos only) for each query, e.g. <code>how transformers work</code>.",
            "items": {
              "type": "string"
            }
          },
          "maxVideos": {
            "title": "Max videos per channel / playlist / search",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many videos to take from each channel, playlist or search query (newest first for channels). Single video URLs are always included.",
            "default": 10
          },
          "channelContentType": {
            "title": "Channel tab",
            "enum": [
              "videos",
              "shorts",
              "streams",
              "all"
            ],
            "type": "string",
            "description": "Which uploads to take from a channel. A tab in the channel URL (e.g. <code>/@name/shorts</code>) overrides this.",
            "default": "videos"
          },
          "maxTotalVideos": {
            "title": "Max videos in total",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Upper limit for the whole run, after removing duplicates.",
            "default": 1000
          },
          "languages": {
            "title": "Preferred languages",
            "type": "array",
            "description": "Language codes in order of preference, e.g. <code>en</code>, <code>es</code>, <code>pt-BR</code>. <code>en</code> also matches <code>en-US</code>/<code>en-GB</code>. Leave empty to always get the video's original (spoken) language.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "fallbackToAnyLanguage": {
            "title": "Fall back to the original language",
            "type": "boolean",
            "description": "If none of the preferred languages exists, return the transcript in the video's original language (manual captions first, then auto-generated). Turn off to get a free <code>no_transcript</code> row instead.",
            "default": true
          },
          "autoTranslate": {
            "title": "Auto-translate to the first preferred language",
            "type": "boolean",
            "description": "If no transcript exists in your preferred languages, ask YouTube to machine-translate the original transcript into the first preferred language. If YouTube refuses the translation, the original language is returned and <code>translationError</code> is set.",
            "default": false
          },
          "preferManualCaptions": {
            "title": "Prefer human-made captions",
            "type": "boolean",
            "description": "Pick creator-uploaded captions over auto-generated (ASR) ones in the same language.",
            "default": true
          },
          "skipAutoGenerated": {
            "title": "Only human-made captions",
            "type": "boolean",
            "description": "Ignore auto-generated captions. Videos with only auto-generated captions get a free <code>no_transcript</code> row.",
            "default": false
          },
          "outputFormats": {
            "title": "Output formats",
            "type": "array",
            "description": "Which transcript formats to include in each row. Every format is included in the same price.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "segments",
                "timestamped",
                "srt",
                "vtt",
                "chunks"
              ],
              "enumTitles": [
                "Plain text",
                "Timestamped segments (JSON)",
                "Timestamped text ([m:ss] lines)",
                "SRT subtitles",
                "WebVTT subtitles",
                "RAG chunks (with start/end and deep links)"
              ]
            },
            "default": [
              "text",
              "segments"
            ]
          },
          "chunkSize": {
            "title": "Chunk size (characters)",
            "minimum": 200,
            "maximum": 50000,
            "type": "integer",
            "description": "Only for the <i>RAG chunks</i> format. Chunks follow caption boundaries (no cut words). 2,000 characters ≈ 400-500 tokens.",
            "default": 2000
          },
          "chunkOverlap": {
            "title": "Chunk overlap (characters)",
            "minimum": 0,
            "maximum": 25000,
            "type": "integer",
            "description": "Text repeated from the end of one chunk at the start of the next.",
            "default": 200
          },
          "includeDescription": {
            "title": "Include video description",
            "type": "boolean",
            "description": "Add the video description and chapters (parsed from description timestamps).",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Defaults to Apify datacenter proxy with automatic residential fallback when YouTube asks to 'confirm you're not a bot'. Choose the RESIDENTIAL group to always use residential IPs.",
            "default": {
              "useApifyProxy": true
            }
          },
          "residentialFallback": {
            "title": "Residential fallback",
            "type": "boolean",
            "description": "Retry blocked requests on residential IPs. Recommended - this is what keeps the success rate high.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Videos processed in parallel.",
            "default": 20
          },
          "maxRetries": {
            "title": "Max attempts per request",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Each blocked request is retried on a new IP, with backoff.",
            "default": 6
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}