{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript, Subtitles & Captions Scraper",
    "description": "YouTube transcript, subtitles and captions for videos, Shorts, channels, playlists or search. Get each video transcript in any language, with timestamps, SRT/VTT, chapters, RAG-ready chunks or translation. You pay only for transcripts delivered. Videos with no captions, and failed videos, are free.",
    "version": "0.1",
    "x-build-id": "nWJdlnMKfJcG2Ocm4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/verbatim-labs~youtube-transcript/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-verbatim-labs-youtube-transcript",
        "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/verbatim-labs~youtube-transcript/runs": {
      "post": {
        "operationId": "runs-sync-verbatim-labs-youtube-transcript",
        "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/verbatim-labs~youtube-transcript/run-sync": {
      "post": {
        "operationId": "run-sync-verbatim-labs-youtube-transcript",
        "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": "Videos, Shorts, channels or playlists",
            "type": "array",
            "description": "Any mix of YouTube video/Shorts/live URLs, bare video IDs, channel URLs or @handles (youtube.com/@name, /channel/UC..., /c/..., /user/...; add /shorts or /streams to pick that tab), and playlist URLs. Duplicates are fetched and charged once.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries (optional)",
            "type": "array",
            "description": "YouTube searches; the top maxVideosPerSource results of each are transcribed.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerSource": {
            "title": "Max videos per channel / playlist / search",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Newest first for channels. Single video URLs are always included.",
            "default": 25
          },
          "channelContent": {
            "title": "Channel content",
            "enum": [
              "videos",
              "shorts",
              "streams",
              "all"
            ],
            "type": "string",
            "description": "Which uploads to take from channel inputs. A tab in the URL (/shorts, /streams) overrides this.",
            "default": "videos"
          },
          "newerThan": {
            "title": "Only videos newer than (optional)",
            "type": "string",
            "description": "Skip videos published before this date (YYYY-MM-DD). They are filtered out before their captions are fetched, so they are not output and not charged. Combine with onlyNew for monitoring."
          },
          "olderThan": {
            "title": "Only videos older than (optional)",
            "type": "string",
            "description": "Skip videos published after this date (YYYY-MM-DD). With newerThan this gives a date window. Skipped videos are not output and not charged."
          },
          "languages": {
            "title": "Preferred languages",
            "type": "array",
            "description": "Caption languages in order of preference (ISO codes like en, es, pt-BR; en also matches en-US/en-GB). Use [] or \"original\" for the video's own spoken language. YouTube's machine translation is not used.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "fallbackToOriginalLanguage": {
            "title": "Fall back to the original language",
            "type": "boolean",
            "description": "If none of your languages exist, return the spoken-language transcript (isPreferredLanguage=false) instead of a free no_captions row.",
            "default": true
          },
          "preferManualCaptions": {
            "title": "Prefer human captions over auto-generated",
            "type": "boolean",
            "description": "Uploader-made captions are usually cleaner. Off = take auto-generated first. captionType says which you got.",
            "default": true
          },
          "allLanguages": {
            "title": "All caption languages in one row",
            "type": "boolean",
            "description": "Also return every other caption language on the video in otherLanguages (one per language, human captions first). Each extra language delivered counts as one more transcript; failed languages are free. Max 30 per video. If YouTube rate-limits the main exits and the run falls back to the free fallback exit, only the main transcript is fetched there (extra languages come back skipped, not charged; otherLanguagesStatus says so).",
            "default": false
          },
          "maxLanguages": {
            "title": "Max extra languages per video",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Cap on otherLanguages when allLanguages is on.",
            "default": 30
          },
          "translateTo": {
            "title": "Translate to (one language)",
            "type": "string",
            "description": "Optional. A language code (en, es, de, pt-BR, ja...) to translate every transcript into. The original text stays in text; the translation goes in translatedText (plus translatedSegments / translatedSrt / translatedVtt if you asked for those). Costs $0.002 per translated transcript on top of the transcript. Videos already in that language are not translated or charged; failed translations are free. Leave empty for no translation."
          },
          "includeSegments": {
            "title": "Include timestamped segments",
            "type": "boolean",
            "description": "Adds segments: [{start, end, text}] in seconds. Off by default for API/MCP calls to keep rows small.",
            "default": false
          },
          "subtitleFormat": {
            "title": "Subtitle files",
            "enum": [
              "none",
              "srt",
              "vtt",
              "both"
            ],
            "type": "string",
            "description": "Also return ready-to-use subtitles as text fields.",
            "default": "none"
          },
          "includeDescription": {
            "title": "Include description and tags",
            "type": "boolean",
            "description": "Video description and keywords. Title, channel, publish date, duration, views and category are always included.",
            "default": true
          },
          "includeChapters": {
            "title": "Include chapters",
            "type": "boolean",
            "description": "chapters: [{start, end, title, text}] when the video defines chapters in its description (the transcript text is split per chapter). Free, no extra requests.",
            "default": true
          },
          "includeMostReplayed": {
            "title": "Include Most Replayed (heatmap aligned to the transcript)",
            "type": "boolean",
            "description": "mostReplayed: YouTube's Most replayed graph, aligned to the transcript: segments [{start, end, score 0-1}], the top 3-5 peaks [{start, end, score, text, chapter?}] with the words spoken in each peak, and lowPoints (the least replayed stretches; YouTube doesn't publish skip data). Same price, no extra charge; adds one request per delivered video. Videos without the graph (new or low-view videos, most Shorts and live replays) get mostReplayed: null and a mostReplayedStatus.",
            "default": false
          },
          "chunkWords": {
            "title": "RAG chunks: words per chunk (0 = off)",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Adds chunks: [{index, start, end, text}] of about this many words each, split on caption boundaries with timestamps kept. 300-800 suits most embedding models.",
            "default": 0
          },
          "onlyNew": {
            "title": "Only new videos (skip ones I already got)",
            "type": "boolean",
            "description": "Remembers delivered videos in a key-value store in your account and skips them next run. Free/retryable failures are retried.",
            "default": false
          },
          "historyKey": {
            "title": "History name",
            "type": "string",
            "description": "Separate onlyNew memories per project (default: \"default\")."
          },
          "maxVideos": {
            "title": "Max videos in total (0 = no limit)",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap across all sources. Videos skipped by newerThan/olderThan, or left unstarted by the fallback-exit limit, don't count toward it. Your run's max charge limit is also respected.",
            "default": 0
          },
          "dryRun": {
            "title": "Preview only (dry run)",
            "type": "boolean",
            "description": "List the videos with metadata and their caption languages, and estimate the cost, without fetching any transcript. Only the $0.00005 run start is billed (no transcript events). Up to 500 videos per run, 10 dry runs per user per day.",
            "default": false
          },
          "datasetId": {
            "title": "Chain a dataset (optional)",
            "type": "string",
            "description": "Dataset from any YouTube scraper. Rows with url, videoUrl, inputUrl, link, videoId or id are picked up; the whole row comes back as inputItem."
          },
          "items": {
            "title": "Items inline (optional)",
            "type": "array",
            "description": "Rows passed directly (Make, n8n, agents), e.g. [{\"url\": \"https://youtu.be/...\", \"myId\": 7}] or plain URL strings."
          },
          "datasetField": {
            "title": "Dataset URL field (optional)",
            "type": "string",
            "description": "Which field of the dataset/items rows holds the URL or video ID."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}