{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper: Subtitles & Captions for AI / RAG",
    "description": "YouTube transcript scraper: get transcripts, subtitles and captions for videos, channels and playlists. Manual, auto or translated fallback, timestamps, chapters, clean text and RAG chunks. No login, no API key, reliable retries.",
    "version": "1.0",
    "x-build-id": "cyHzMLaywgnbAwZjg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tomstudio~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tomstudio-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/tomstudio~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tomstudio-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/tomstudio~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tomstudio-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": "Video URLs or IDs",
            "type": "array",
            "description": "YouTube video URLs (watch, youtu.be, shorts, embed, live) or plain 11-character video IDs.",
            "items": {
              "type": "string"
            }
          },
          "channelOrPlaylistUrls": {
            "title": "Channels or playlists (latest videos)",
            "type": "array",
            "description": "Optional. Channel URLs (https://www.youtube.com/@TED), @handles or playlist URLs. The latest videos of each are added to the run.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerSource": {
            "title": "Videos per channel / playlist",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many of the latest videos to take from each channel or playlist.",
            "default": 10
          },
          "languages": {
            "title": "Preferred languages",
            "type": "array",
            "description": "Language codes in priority order (e.g. en, it, es). Manual subtitles are tried first, then auto-generated.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "translateIfMissing": {
            "title": "Translate if missing",
            "type": "boolean",
            "description": "If no track exists in your preferred language, use YouTube's machine translation of another track.",
            "default": true
          },
          "fallbackToAnyLanguage": {
            "title": "Fall back to any language",
            "type": "boolean",
            "description": "If nothing matches (and translation is impossible), return the video's original-language transcript instead of an error.",
            "default": true
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "full",
              "clean",
              "rag"
            ],
            "type": "string",
            "description": "full = text + timestamped segments. clean = readable text only (sound tags and >> removed) for LLMs. rag = clean text + timestamped chunks ready for embeddings.",
            "default": "full"
          },
          "chunkSize": {
            "title": "RAG chunk size (characters)",
            "minimum": 200,
            "maximum": 20000,
            "type": "integer",
            "description": "Approximate chunk length when output format is 'rag'.",
            "default": 1500
          },
          "includeMetadata": {
            "title": "Include title, channel, duration, chapters",
            "type": "boolean",
            "description": "Adds video metadata and chapters (one extra request per video). Turn off for maximum speed.",
            "default": true
          },
          "maxVideos": {
            "title": "Max videos in total",
            "minimum": 1,
            "type": "integer",
            "description": "Safety cap for the whole run.",
            "default": 1000
          },
          "concurrency": {
            "title": "Parallel videos",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Videos processed at the same time. Lower it if YouTube rate-limits you.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy (datacenter) is on by default and is included in the free plan. If YouTube blocks it, the Actor can retry the video with RESIDENTIAL proxies (see the next option). You can also pick the RESIDENTIAL group here from the start, or use your own proxies.",
            "default": {
              "useApifyProxy": true
            }
          },
          "useResidentialFallback": {
            "title": "Retry with residential proxy when blocked",
            "type": "boolean",
            "description": "When YouTube blocks the datacenter proxy for a video, retry that video with Apify RESIDENTIAL proxies (billed to YOUR Apify account by traffic, roughly 0.0005 USD per video; requires residential proxy access on your plan). If the group is unavailable the video is reported with errorCode BLOCKED - the run never crashes.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}