{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper - Subtitles, Captions & Timestamps",
    "description": "Extract YouTube transcripts and subtitles from any video, channel, playlist or search. Plain text, timestamps, SRT, VTT and RAG-ready chunks with real timings. No API key, no cookies, no browser.",
    "version": "0.1",
    "x-build-id": "lgqITR9RFj5diBzhF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/teamsasuke~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-teamsasuke-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/teamsasuke~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-teamsasuke-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/teamsasuke~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-teamsasuke-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": {
          "videoUrls": {
            "title": "YouTube URLs",
            "type": "array",
            "description": "Video, channel, playlist or Shorts URLs. Paste a channel and it takes every video on it; paste a playlist and it takes the whole list. Bare video IDs and @handles work too.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search terms",
            "type": "array",
            "description": "Search YouTube and transcribe the top results for each term. Useful when you want the conversation about a topic rather than a specific channel.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerSource": {
            "title": "Max videos per channel, playlist or search",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Caps how many videos are taken from each channel, playlist or search term. Individual video URLs are never capped.",
            "default": 50
          },
          "languages": {
            "title": "Preferred caption languages",
            "type": "array",
            "description": "Two-letter language codes in order of preference, for example en, es, fr. Regional variants match too, so en also accepts en-US and en-GB.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "fallbackToAnyLanguage": {
            "title": "Fall back to any available language",
            "type": "boolean",
            "description": "If none of your preferred languages exist, use whatever captions the video does have. Turn this off to skip videos that are not in your languages.",
            "default": true
          },
          "preferManualCaptions": {
            "title": "Prefer human-written captions",
            "type": "boolean",
            "description": "When a video has both human-written and auto-generated captions, take the human ones. They are noticeably more accurate, especially with names and technical terms.",
            "default": true
          },
          "translateTo": {
            "title": "Translate transcript to",
            "type": "string",
            "description": "Two-letter code to have YouTube translate the transcript, for example es or de. Leave empty for the original language. If translation is unavailable the original is returned rather than nothing.",
            "default": ""
          },
          "includeVideoMetadata": {
            "title": "Include video details",
            "type": "boolean",
            "description": "Add title, channel, description, duration, view count, keywords and thumbnail to each row.",
            "default": true
          },
          "includeTimestampedSegments": {
            "title": "Include timestamped segments",
            "type": "boolean",
            "description": "Add the segments array: every caption line with its start time, end time and duration in seconds. Turn off for a smaller dataset when you only need the text.",
            "default": true
          },
          "includeSrt": {
            "title": "Include SRT subtitles",
            "type": "boolean",
            "description": "Add a ready-to-save .srt subtitle file as a string field.",
            "default": false
          },
          "includeVtt": {
            "title": "Include WebVTT subtitles",
            "type": "boolean",
            "description": "Add a ready-to-save .vtt subtitle file as a string field, for HTML5 video players.",
            "default": false
          },
          "chunkSize": {
            "title": "Split transcript into chunks of (characters)",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "For RAG and embeddings. Splits the transcript into passages of roughly this many characters, each keeping its real start and end time so answers can cite the moment in the video. Set 0 to skip chunking. 1000 is a sensible default for most embedding models.",
            "default": 0
          },
          "chunkOverlap": {
            "title": "Chunk overlap (characters)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "How much text each chunk repeats from the one before it, so a sentence split across the boundary still makes sense in both. Ignored when chunking is off.",
            "default": 0
          },
          "includeVideosWithoutTranscript": {
            "title": "List videos with no transcript",
            "type": "boolean",
            "description": "Save a list of every video that had no captions or could not be read, with the reason for each, to the run's key-value store under VIDEOS_WITHOUT_TRANSCRIPT. They are never written to the dataset, so they are never billed. Useful for auditing a whole channel.",
            "default": false
          },
          "concurrency": {
            "title": "Videos in parallel",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "How many videos to fetch at once. 5 is a good balance. Raising it speeds up large runs but YouTube starts rate-limiting, which slows things down again.",
            "default": 5
          },
          "blockRetries": {
            "title": "Retries when blocked",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many different proxy addresses to try before giving up on a video. Each retry is one extra request; you are never charged for a video that stays blocked.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "YouTube refuses its player API from cloud datacenters, so a proxy is required when running on Apify. Residential is the default because it is the only setting that returned every transcript in testing. Datacenter proxies are cheaper and got about 96%, if you prefer that trade.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}