{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper - Subtitles, SRT & RAG",
    "description": "Get YouTube transcripts from video, Shorts, channel, playlist or search URLs. Returns clean text, timed segments, SRT/VTT and RAG-ready chunks in any caption language, with optional translation. Built for summaries, RAG and AI agents.",
    "version": "0.1",
    "x-build-id": "7UljLivitdu4SkMnv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zenomastro~youtube-transcript-reliable/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zenomastro-youtube-transcript-reliable",
        "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/zenomastro~youtube-transcript-reliable/runs": {
      "post": {
        "operationId": "runs-sync-zenomastro-youtube-transcript-reliable",
        "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/zenomastro~youtube-transcript-reliable/run-sync": {
      "post": {
        "operationId": "run-sync-zenomastro-youtube-transcript-reliable",
        "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": "YouTube URLs or video IDs",
            "minItems": 0,
            "maxItems": 500,
            "type": "array",
            "description": "YouTube video links or 11-character video IDs, one per line. Watch, youtu.be, Shorts, Live and Embed links all work, e.g. https://www.youtube.com/watch?v=dQw4w9WgXcQ. Up to 500 per run. Can be combined with channel, playlist and search sources below.",
            "items": {
              "type": "string"
            }
          },
          "sourceUrls": {
            "title": "Channel, playlist or search URLs",
            "maxItems": 50,
            "type": "array",
            "description": "Get transcripts of the videos in a YouTube channel (e.g. https://www.youtube.com/@mkbhd or /@mkbhd/videos), playlist (https://www.youtube.com/playlist?list=...) or search-results page (filters you set on youtube.com are kept). Channels are read newest first, playlists in playlist order, up to Maximum videos from channels, playlists and searches. Shortcuts work too: @handle, a channel ID (UC...) or plain keywords (read as a search).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search keywords",
            "maxItems": 50,
            "type": "array",
            "description": "Search YouTube for these keywords, one search per line (e.g. sourdough bread recipe), and get the transcripts of the top video results, like searching on youtube.com with the Videos filter.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxDiscoveredVideos": {
            "title": "Maximum videos from channels, playlists and searches",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Total cap on videos taken from Channel, playlist or search URLs and Search keywords in one run (videos you list directly are not counted). Use Maximum videos per source below to spread it over several sources.",
            "default": 100
          },
          "languages": {
            "title": "Preferred languages",
            "type": "array",
            "description": "Caption languages in order of preference, as codes such as en, es, it, pt, de, fr, ja. When a video has no exact match, a regional variant is used (en finds en-GB or en-US, pt finds pt-BR). Human-made captions are preferred over auto-generated ones unless you change it under Language options.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "translateTo": {
            "title": "Translate transcript to",
            "type": "string",
            "description": "Optional language code (e.g. en, es, fr, de, it, pt) to get every transcript in that language using YouTube's own auto-translation, when YouTube offers it for the video. If YouTube refuses, you get the original transcript (not charged) with translationError explaining why. Leave empty for no translation.",
            "default": ""
          },
          "fallbackToAnyLanguage": {
            "title": "Fallback to any available language",
            "type": "boolean",
            "description": "If the video has none of your preferred languages, return a transcript in another available language instead of an error row. availableTranscripts always lists every language the video has.",
            "default": true
          },
          "preferAutoGenerated": {
            "title": "Prefer auto-generated captions",
            "type": "boolean",
            "description": "Prefer YouTube's automatic (speech recognition) captions over human-made captions when both exist in your language.",
            "default": false
          },
          "includeSegments": {
            "title": "Include timestamped segments",
            "type": "boolean",
            "description": "Include every caption line with its start time and duration in seconds (segments).",
            "default": true
          },
          "includeTimestampedText": {
            "title": "Include timestamped text",
            "type": "boolean",
            "description": "Add timestampedText: plain text with one \"[mm:ss] text\" line per caption (\"[hh:mm:ss]\" for videos of an hour or more). Easy to paste into ChatGPT or a document and cite by time.",
            "default": false
          },
          "timestampEverySeconds": {
            "title": "Timestamp every N seconds",
            "minimum": 0,
            "maximum": 3600,
            "type": "integer",
            "description": "With timestamped text, group captions into one line every N seconds (for example 30). 0 = one line per caption.",
            "default": 0
          },
          "includeParagraphs": {
            "title": "Include readable paragraphs",
            "type": "boolean",
            "description": "Group captions into paragraph-sized blocks, each with start/end time and a link that opens the video at that moment.",
            "default": true
          },
          "paragraphMaxChars": {
            "title": "Paragraph max characters",
            "minimum": 300,
            "maximum": 10000,
            "type": "integer",
            "description": "Approximate maximum characters per paragraph.",
            "default": 1200
          },
          "includeChapters": {
            "title": "Include chapters",
            "type": "boolean",
            "description": "Split the transcript into the video's chapters (title, start, end, text and a link to the chapter) when the creator added chapter timestamps to the description. Videos without chapters return an empty list.",
            "default": true
          },
          "includeSrt": {
            "title": "Include SRT",
            "type": "boolean",
            "description": "Return the transcript as an SRT subtitle string (srt).",
            "default": false
          },
          "includeVtt": {
            "title": "Include WebVTT",
            "type": "boolean",
            "description": "Return the transcript as a WebVTT subtitle string (vtt).",
            "default": false
          },
          "includeChunks": {
            "title": "Create RAG chunks",
            "type": "boolean",
            "description": "Split the text into overlapping chunks for embeddings and vector databases. Each chunk has its start/end time and a link that opens the video at that moment, so AI answers can cite the exact moment.",
            "default": false
          },
          "chunkSizeChars": {
            "title": "RAG chunk size",
            "minimum": 500,
            "maximum": 50000,
            "type": "integer",
            "description": "Approximate maximum characters per chunk (about 4 characters per token).",
            "default": 6000
          },
          "chunkOverlapChars": {
            "title": "Chunk overlap",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Characters repeated between consecutive chunks, so no sentence is lost at a boundary.",
            "default": 500
          },
          "removeSoundTags": {
            "title": "Remove sound tags like [Music]",
            "type": "boolean",
            "description": "Remove sound descriptions in square brackets ([Music], [Applause], [Laughter]) and music notes from every output, for cleaner text for AI and reading.",
            "default": false
          },
          "preserveFormatting": {
            "title": "Preserve supported formatting",
            "type": "boolean",
            "description": "Keep YouTube's caption HTML formatting tags (such as <i> and <b>) where the captions have them.",
            "default": false
          },
          "saveCombinedFile": {
            "title": "Save all transcripts in one file",
            "type": "boolean",
            "description": "Also save every transcript of the run in one readable Markdown file (transcripts.md, linked in the Output tab), with titles, links, chapters and [mm:ss] timestamps. Ready to upload to ChatGPT, Claude or NotebookLM. Free.",
            "default": true
          },
          "includeMetadata": {
            "title": "Include video metadata",
            "type": "boolean",
            "description": "Add title, channel, channel handle, subscribers, description, keywords, thumbnail, duration, views, likes, comment count and publish date when YouTube shows them. Read from the page the transcript request already loads, so it usually adds no extra request.",
            "default": true
          },
          "maxVideosPerSource": {
            "title": "Maximum videos per source",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Cap for each channel, playlist or search, e.g. 10 = the 10 newest videos of every channel. 0 = no per-source cap (only the total maximum applies, so the first source can use it all).",
            "default": 0
          },
          "sourceContentTypes": {
            "title": "Channel tabs to include",
            "uniqueItems": true,
            "type": "array",
            "description": "For channel URLs without a tab (for example https://www.youtube.com/@name), which tabs to read: videos, shorts and/or live streams. Empty = all tabs (videos first, then live streams, then Shorts). Playlist, search and tab URLs such as /@name/videos are read as given.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "shorts",
                "streams"
              ],
              "enumTitles": [
                "Videos",
                "Shorts",
                "Live streams"
              ]
            },
            "default": []
          },
          "publishedAfter": {
            "title": "Published on or after",
            "type": "string",
            "description": "Only videos from channels, playlists and searches published on or after this date: YYYY-MM-DD (for example 2026-09-01) or a relative value such as \"30 days\", \"2 weeks\" or \"6 months\" (counted back from today, UTC). Videos outside the window are skipped and not charged. Videos in videoUrls are always processed."
          },
          "publishedBefore": {
            "title": "Published on or before",
            "type": "string",
            "description": "Only videos from channels, playlists and searches published on or before this date: YYYY-MM-DD or a relative value such as \"7 days\". Leave empty for no upper limit."
          },
          "monitorName": {
            "title": "Transcript monitor name",
            "type": "string",
            "description": "Give scheduled runs the same name (e.g. my-channel-monitor) to remember transcripts between runs: every row then says whether its text changed since the last run (changed, previousSha256).",
            "default": ""
          },
          "onlyChanged": {
            "title": "Emit only new or changed transcripts",
            "type": "boolean",
            "description": "With a monitor name, skip (and do not charge) transcripts whose text is identical to the previous run. New videos are always emitted, so a channel schedule returns only what is new.",
            "default": false
          },
          "requestTimeoutSecs": {
            "title": "Per-video timeout",
            "minimum": 5,
            "maximum": 90,
            "type": "integer",
            "description": "Maximum time for one transcript attempt.",
            "default": 25
          },
          "retries": {
            "title": "Retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retry temporary failures (timeouts, network errors) with backoff and a fresh proxy session. A video YouTube blocks is retried right away from other IP addresses, at least 5 times unless this is 0. Failed videos are never charged.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy (datacenter) is on by default because YouTube often blocks cloud servers; when it is blocked, the run also tries its own IP address. Your own proxy URLs (for example residential) are always used as given.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}