{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper - Subtitles, SRT & VTT",
    "description": "Get YouTube transcripts and subtitles from any video URL: full text, timestamps, SRT/VTT, language, auto-caption flag, translation to 100+ languages.",
    "version": "1.0",
    "x-build-id": "C7jtnGFuciEtAOAuo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cheapapi~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cheapapi-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/cheapapi~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-cheapapi-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/cheapapi~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-cheapapi-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",
        "required": [
          "videos"
        ],
        "properties": {
          "videos": {
            "title": "YouTube videos",
            "minItems": 1,
            "type": "array",
            "description": "Video links or 11-character video IDs (youtube.com/watch, youtu.be, Shorts, embed and live links). One result row per video. Channel and playlist links are not accepted: to find videos by keyword or channel name, run our YouTube Search Scraper (cheapapi/youtube-search-scraper) first and paste its url or videoId values here (search results, not a complete upload list).",
            "items": {
              "type": "string"
            }
          },
          "transcriptLanguages": {
            "title": "Transcript languages (in order of preference)",
            "maxItems": 3,
            "type": "array",
            "description": "Up to 3 caption language codes, best first (e.g. en, then de, then es; also pt-BR, zh-Hans). Each video gets the first language on the list that it has captions in. If it has none of them, you get its default captions and the row is marked languageUnavailable = true. Leave empty for the video's default captions. Each further language tried for a video adds processing time and costs $0.0033 (extra-lookup); a video that has your first language is a single lookup.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "translateTo": {
            "title": "Translate to",
            "type": "string",
            "description": "Optional: translate every transcript into this language. Pick one of the common languages from the list, or type any other language code YouTube supports (100+ languages, e.g. sv, el, he, fa). Leave empty for no translation. Translations are machine translations made by YouTube."
          },
          "outputFormats": {
            "title": "Output formats",
            "type": "array",
            "description": "Which transcript formats to include in each row. Plain text and timestamped segments by default; add SRT and/or WebVTT subtitle files as strings.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "segments",
                "srt",
                "vtt"
              ],
              "enumTitles": [
                "Plain text",
                "Timestamped segments (start, end, text)",
                "SRT subtitles",
                "WebVTT subtitles"
              ]
            },
            "default": [
              "text",
              "segments"
            ]
          },
          "processingSpeed": {
            "title": "Processing speed",
            "enum": [
              "standard",
              "fast"
            ],
            "type": "string",
            "description": "Standard: results usually within a few minutes (can take up to ~45 minutes at peak times); each transcript is saved to the dataset as soon as it is ready, and the log shows the progress with an estimate of the time left. Fast processing: about 1 minute, for an extra $0.0015 per lookup (normally one per video; also for the video-checked and extra-lookup events).",
            "default": "standard"
          },
          "includeTimestampsInText": {
            "title": "Timestamps in plain text",
            "type": "boolean",
            "description": "Put each caption line on its own line with a [m:ss] timestamp in the \"text\" field instead of one continuous paragraph.",
            "default": false
          },
          "includeVideosWithoutTranscript": {
            "title": "Include videos without a transcript",
            "type": "boolean",
            "description": "Also add a row for videos that have no captions, with transcriptAvailable = false and a short reason. The row itself is free; the lookup of such a video is charged as video-checked ($0.0033) either way. Off by default; they are always listed in the run summary.",
            "default": false
          },
          "maxVideos": {
            "title": "Max videos",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many videos from the list (0 = no limit). Useful for testing a long list.",
            "default": 0
          },
          "onlyNewVideos": {
            "title": "Only new videos",
            "type": "boolean",
            "description": "Skip videos whose transcript an earlier run with this option already delivered (with the same Transcript languages and Translate to settings). Skipped videos are not requested and cost nothing. Videos that had no transcript are checked again (and charged as video-checked) because captions are often added later. \"Max videos\" then counts only new videos.",
            "default": false
          },
          "processedVideosStore": {
            "title": "Processed videos store name",
            "type": "string",
            "description": "Name of the key-value store in your Apify account that remembers the delivered videos (lowercase letters, digits and hyphens). Use a different name per project or channel to keep separate lists; delete the store to start over. Default: youtube-transcripts-processed.",
            "default": "youtube-transcripts-processed"
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Country YouTube is opened from, as a code or name (US, GB, DE, \"Germany\"). Matters only for videos that are region-restricted. Default: US.",
            "default": "US"
          },
          "interfaceLanguage": {
            "title": "Interface language",
            "type": "string",
            "description": "Language of the YouTube interface (code such as en, de, es). This is not the transcript language; use \"Transcript languages\" for that. Default: en.",
            "default": "en"
          },
          "operatingSystem": {
            "title": "Operating system",
            "enum": [
              "windows",
              "macos"
            ],
            "type": "string",
            "description": "Operating system of the desktop browser YouTube is opened with.",
            "default": "windows"
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop"
            ],
            "type": "string",
            "description": "Device type YouTube is opened with. Only desktop is supported for transcripts.",
            "default": "desktop"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}