{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper — Subtitles & Captions API",
    "description": "Scrape YouTube transcripts, subtitles and captions from videos, Shorts, channels, playlists and search. Any language with fallback; text, timestamps, SRT, VTT or chunks for AI, plus title, views, likes, date and channel. Works with MCP, n8n and Make. No captions, no charge.",
    "version": "0.1",
    "x-build-id": "idjcxTgsA9cqY2hFU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/anuarbakty~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-anuarbakty-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/anuarbakty~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-anuarbakty-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/anuarbakty~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-anuarbakty-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 links or video ids",
            "type": "array",
            "description": "One per line, in any form YouTube uses:<br>• a <b>video</b>: <code>youtube.com/watch?v=…</code>, <code>youtu.be/…</code>, <code>/live/…</code>, <code>/embed/…</code>, or the bare 11-character id<br>• a <b>Short</b>: <code>youtube.com/shorts/…</code><br>• a <b>channel</b>: <code>youtube.com/@handle</code>, <code>/channel/UC…</code>, <code>/c/name</code>, <code>/user/name</code>, or just <code>@handle</code> → its newest videos (add <code>/shorts</code> or <code>/streams</code> for those tabs)<br>• a <b>playlist</b>: <code>youtube.com/playlist?list=…</code><br>• a <b>search page</b>: <code>youtube.com/results?search_query=…</code><br>Also read under the names <code>startUrls</code>, <code>videoUrls</code>, <code>youtube_url</code>, <code>channel_url</code> and others, so inputs made for other transcript Actors work as they are.",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Search words",
            "type": "array",
            "description": "Search YouTube for these words, one search per line, and transcribe the videos found (videos only, in YouTube's order). The limit per channel below applies to each search.",
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "title": "Languages, in order of preference",
            "type": "array",
            "description": "Language codes such as <code>en</code>, <code>es</code>, <code>pt-BR</code> or names such as <code>English</code>. The first one the video has is taken; <code>en</code> also matches <code>en-US</code> and <code>en-GB</code>. Leave empty for the language spoken in the video.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "fallbackToAnyLanguage": {
            "title": "When none of these languages exists, take the original one",
            "type": "boolean",
            "description": "On: a video without captions in your languages gives its captions in the language spoken in it, and <code>languageMatch</code> says <code>fallback</code>. Off: such a video gives a free row with the code <code>LANGUAGE_NOT_FOUND</code> and the list of its languages.",
            "default": true
          },
          "captionType": {
            "title": "Author or auto-generated captions",
            "enum": [
              "manualFirst",
              "autoFirst",
              "manualOnly",
              "autoOnly"
            ],
            "type": "string",
            "description": "Author captions are uploaded by the channel and are usually cleaner; auto-generated captions are YouTube's speech recognition. Each row says which one came in <code>captionType</code>.",
            "default": "manualFirst"
          },
          "allLanguages": {
            "title": "Every language the video has",
            "type": "boolean",
            "description": "One row per caption language of the video (each is a transcript and is charged as one). The languages above are not used then.",
            "default": false
          },
          "listLanguagesOnly": {
            "title": "Only list the caption languages (free)",
            "type": "boolean",
            "description": "No transcripts: one free row per video with the video details and <code>availableLanguages</code>. Useful to see what a channel offers before transcribing it.",
            "default": false
          },
          "outputFormats": {
            "title": "Transcript formats",
            "type": "array",
            "description": "What each row holds: <b>segments</b> — the <code>transcript</code> array of lines with <code>start</code>, <code>duration</code>, <code>end</code> in seconds; <b>text</b> — one plain string; <b>paragraphs</b> — the text split at pauses into readable paragraphs with their times; <b>chunks for AI</b> — pieces of about 150 words with times and a link to that second of the video, for ChatGPT, Claude and RAG; <b>timestamped text</b> — lines like <code>[1:23] …</code>; <b>SRT</b>, <b>VTT</b> and <b>XML</b> as strings.",
            "items": {
              "type": "string",
              "enum": [
                "segments",
                "text",
                "paragraphs",
                "chunks",
                "timestampedText",
                "srt",
                "vtt",
                "xml"
              ],
              "enumTitles": [
                "Segments with timestamps",
                "Plain text",
                "Paragraphs",
                "Chunks for AI (RAG)",
                "Timestamped text",
                "SRT",
                "VTT",
                "XML"
              ]
            },
            "default": [
              "segments",
              "text"
            ]
          },
          "chunkWords": {
            "title": "Words per chunk for AI",
            "minimum": 20,
            "maximum": 2000,
            "type": "integer",
            "description": "Size of each piece in the <b>chunks for AI</b> format. Pieces are cut between caption lines, so they hold about this many words.",
            "default": 150
          },
          "saveFiles": {
            "title": "Save .srt, .vtt and .txt files with download links",
            "type": "boolean",
            "description": "Every transcript is also saved as three files in the run's key-value store, and the row gets their links in <code>fileUrls</code>. Handy for video editors and for sending a file to a client.",
            "default": false
          },
          "removeNonSpeech": {
            "title": "Remove sound labels like [Music] and [Applause]",
            "type": "boolean",
            "description": "Also removes music notes and YouTube's <code>[ __ ]</code> for bleeped words. HTML entities such as <code>&amp;#39;</code> are always turned into characters.",
            "default": true
          },
          "wordTimestamps": {
            "title": "Word-level timestamps",
            "type": "boolean",
            "description": "Every line of an auto-generated transcript gets a <code>words</code> list with the start and end of each word. Author captions have no word timings, so their lines get <code>words: null</code>.",
            "default": false
          },
          "includeDetails": {
            "title": "Exact publish date, likes, category, Shorts flag, @handle",
            "type": "boolean",
            "description": "One light extra request per video. Title, channel, views, duration, description, tags and thumbnail come in every row anyway.",
            "default": true
          },
          "includeEngagement": {
            "title": "Comment count and channel subscribers",
            "type": "boolean",
            "description": "One more request per video. YouTube shows large numbers rounded (2.4M), and so do these fields.",
            "default": true
          },
          "maxVideosPerSource": {
            "title": "Videos per channel tab, playlist or search",
            "minimum": 0,
            "type": "integer",
            "description": "The newest videos of a channel come first. 0 means no limit. Single video links are not counted here.",
            "default": 50
          },
          "channelTabs": {
            "title": "Channel tabs",
            "type": "array",
            "description": "Which lists of a channel to read when the link points at the channel itself. A link to <code>/shorts</code> or <code>/streams</code> reads only that tab.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "shorts",
                "streams"
              ],
              "enumTitles": [
                "Videos",
                "Shorts",
                "Live streams"
              ]
            },
            "default": [
              "videos"
            ]
          },
          "publishedAfter": {
            "title": "Published on or after",
            "type": "string",
            "description": "For channels, playlists and searches: <code>2026-09-01</code>, or a span back from today such as <code>30 days</code>, <code>2 weeks</code>, <code>6 months</code>. Videos outside the dates are skipped and not charged."
          },
          "publishedBefore": {
            "title": "Published on or before",
            "type": "string",
            "description": "Same forms as above."
          },
          "maxItems": {
            "title": "Most transcripts in the whole run",
            "minimum": 0,
            "type": "integer",
            "description": "The run stops after this many transcripts, whatever the inputs. 0 means no limit.",
            "default": 0
          },
          "includeErrorRows": {
            "title": "Rows for videos without a transcript",
            "type": "boolean",
            "description": "A free row with <code>status</code>, <code>errorCode</code> and <code>message</code> for every video that has no captions, is private, removed, age-restricted or blocked. Off: such videos only appear in the run summary.",
            "default": true
          },
          "deduplicate": {
            "title": "Each video once per run",
            "type": "boolean",
            "description": "A video found by several inputs (a channel and a search, say) is transcribed and charged once.",
            "default": true
          },
          "failIfAllInputsFail": {
            "title": "End the run as failed when no transcript came",
            "type": "boolean",
            "description": "For monitoring and automations that should alert on an empty result. By default such a run still succeeds and explains every video in a free row.",
            "default": false
          },
          "strictInput": {
            "title": "Stop on unknown input fields",
            "type": "boolean",
            "description": "A limit written under a name the Actor does not know would be ignored, so by default the run stops before the first request and says which field is unknown. Off: unknown fields are ignored.",
            "default": true
          },
          "runTag": {
            "title": "Tag for the rows",
            "type": "string",
            "description": "Any text; it is copied into every row as <code>runTag</code>, to tell runs apart in one table."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Leave as it is: the Actor uses Apify datacenter proxies and moves the caption request to residential ones when YouTube refuses an address. Set your own only if you need to."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}