{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper - AI-Ready, Bulk & Fast",
    "description": "Get YouTube transcripts in bulk from videos, channels, playlists or search: any language, auto-generated & translated captions, SRT/VTT, RAG chunks.",
    "version": "0.1",
    "x-build-id": "FccuRuApk8joA4Ivp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/prevailing_glow~youtube-transcript-ai/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-prevailing_glow-youtube-transcript-ai",
        "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/prevailing_glow~youtube-transcript-ai/runs": {
      "post": {
        "operationId": "runs-sync-prevailing_glow-youtube-transcript-ai",
        "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/prevailing_glow~youtube-transcript-ai/run-sync": {
      "post": {
        "operationId": "run-sync-prevailing_glow-youtube-transcript-ai",
        "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": {
          "videoUrls": {
            "title": "Video URLs or IDs",
            "type": "array",
            "description": "YouTube video links (watch, youtu.be, shorts, embed, live) or 11-character video IDs, one per line. Each video with a transcript is one billable <b>transcript</b> event.",
            "items": {
              "type": "string"
            }
          },
          "channelUrls": {
            "title": "Channel URLs or handles",
            "type": "array",
            "description": "Channels as <code>@handle</code>, <code>https://www.youtube.com/@handle</code>, <code>/channel/UC...</code>, <code>/c/name</code> or <code>/user/name</code>. The newest uploads are scraped, up to <b>Max videos per channel / playlist / search</b>.",
            "items": {
              "type": "string"
            }
          },
          "playlistUrls": {
            "title": "Playlist URLs or IDs",
            "type": "array",
            "description": "Playlist links (<code>https://www.youtube.com/playlist?list=PL...</code>) or playlist IDs. Videos are taken in playlist order.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries (optional)",
            "type": "array",
            "description": "YouTube searches (videos only, YouTube's relevance order), one per line. Up to <b>Max videos per channel / playlist / search</b> results each.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerSource": {
            "title": "Max videos per channel / playlist / search",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many videos to take from each channel, playlist and search query.",
            "default": 20
          },
          "channelVideoType": {
            "title": "Channel content",
            "enum": [
              "videos",
              "shorts",
              "live",
              "all"
            ],
            "type": "string",
            "description": "Which uploads to take from channels: regular videos (default), Shorts, past live streams, or all uploads.",
            "default": "videos"
          },
          "maxTotalVideos": {
            "title": "Max videos in total",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Upper limit on videos per run over all inputs (duplicates are removed).",
            "default": 1000
          },
          "preferredLanguages": {
            "title": "Preferred languages",
            "type": "array",
            "description": "Language codes in order of preference, e.g. <code>en</code>, <code>de</code>, <code>pt-BR</code>. Uploaded (human) captions are preferred over auto-generated ones. Leave empty to get each video's original language.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "allowAutoGenerated": {
            "title": "Use auto-generated captions",
            "type": "boolean",
            "description": "Use YouTube's automatic (speech recognition) captions when no uploaded captions exist in a preferred language.",
            "default": true
          },
          "translateIfMissing": {
            "title": "Translate when the language is missing",
            "type": "boolean",
            "description": "If a video has no captions in your preferred language, ask YouTube to machine-translate an existing track into it (where YouTube offers translation). Marked as <code>captionType: translated</code>.",
            "default": true
          },
          "anyLanguageFallback": {
            "title": "Fall back to the original language",
            "type": "boolean",
            "description": "If nothing matches (and no translation is possible), return the captions in the video's own language instead of a no-captions row. <code>languageMatched</code> is false on such rows.",
            "default": true
          },
          "outputFormats": {
            "title": "Transcript formats",
            "type": "array",
            "description": "Which transcript fields each video row gets. Plain text has paragraph breaks; segments have start/end times in seconds; markdown has chapter headings and timestamp links.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "segments",
                "srt",
                "vtt",
                "markdown"
              ],
              "enumTitles": [
                "Plain text",
                "Timestamped segments (JSON)",
                "SRT subtitles",
                "WebVTT subtitles",
                "Markdown"
              ]
            },
            "default": [
              "text",
              "segments"
            ]
          },
          "chunking": {
            "title": "RAG chunks",
            "enum": [
              "off",
              "inline",
              "rows",
              "both"
            ],
            "type": "string",
            "description": "Split each transcript into chunks for embeddings / retrieval. Chunks follow caption boundaries, carry start/end timestamps and a link to the exact moment. <b>Separate rows</b> gives one dataset row per chunk (ready for vector-database loaders); chunk rows are free.",
            "default": "off"
          },
          "chunkSize": {
            "title": "Chunk size",
            "minimum": 50,
            "maximum": 32000,
            "type": "integer",
            "description": "Maximum chunk size in the unit below (default 500 tokens).",
            "default": 500
          },
          "chunkOverlap": {
            "title": "Chunk overlap",
            "minimum": 0,
            "maximum": 16000,
            "type": "integer",
            "description": "Overlap between consecutive chunks, in whole captions up to this size (at most half the chunk size).",
            "default": 50
          },
          "chunkUnit": {
            "title": "Chunk unit",
            "enum": [
              "tokens",
              "chars"
            ],
            "type": "string",
            "description": "Tokens are estimated (~4 characters per token, 1 per CJK character), close to OpenAI / Gemini tokenizers.",
            "default": "tokens"
          },
          "includeMetadata": {
            "title": "Include full metadata",
            "type": "boolean",
            "description": "Publish date, description, chapters, tags, category and likes. Title, channel, duration, views and thumbnail are always included.",
            "default": true
          },
          "aiTranscriptionFallback": {
            "title": "Transcribe videos without captions with AI",
            "type": "boolean",
            "description": "Bring your own key: needs your Gemini API key in the field below (without it this option does nothing). For public videos that have no captions at all, Google Gemini transcribes the speech (it reads the public video directly; if that fails, the audio is downloaded and sent). Not charged by this Actor: only the normal transcript event applies, and Google bills your key. Off by default.",
            "default": false
          },
          "aiMaxVideoMinutes": {
            "title": "Max video length for AI transcription (minutes)",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Longer videos without captions are skipped (free row).",
            "default": 30
          },
          "geminiApiKey": {
            "title": "Your Gemini API key (required for AI transcription)",
            "type": "string",
            "description": "Required for AI transcription. Create a key in Google AI Studio (aistudio.google.com). Google bills your key directly (about $0.001-0.002 per audio minute with gemini-3.5-flash-lite on the paid tier); this Actor adds no AI charge. Stored encrypted, used only for your run, never logged or written to the output."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "YouTube blocks most cloud IPs for captions (tested: residential 100% success, datacenter 0%). Residential proxies are used only for the small player and caption requests (~50 KB per video, never for audio); listing and metadata use datacenter. If residential proxies are not available, datacenter proxies with retries are used.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "residentialFallback": {
            "title": "Residential fallback for blocked caption requests",
            "type": "boolean",
            "description": "Only when the proxy above is datacenter: caption requests that stay blocked after retries are retried once more through Apify RESIDENTIAL proxy (if your account has it). Never used for listing or audio.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Parallel videos",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Videos processed at the same time.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}