{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript & Subtitles Scraper — Any Language, SRT",
    "description": "Get YouTube transcripts and subtitles as text, timed lines or SRT. Any language incl. Arabic, YouTube auto-translate, bulk videos, playlists and channels. $2 per 1,000 transcripts; videos without captions are free.",
    "version": "0.1",
    "x-build-id": "Q2CWb5GZpbOFSzTaa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dottti~youtube-transcripts-reliable/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dottti-youtube-transcripts-reliable",
        "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/dottti~youtube-transcripts-reliable/runs": {
      "post": {
        "operationId": "runs-sync-dottti-youtube-transcripts-reliable",
        "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/dottti~youtube-transcripts-reliable/run-sync": {
      "post": {
        "operationId": "run-sync-dottti-youtube-transcripts-reliable",
        "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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "Videos, playlists or channels",
            "type": "array",
            "description": "YouTube video URLs or 11-character IDs, playlist URLs, or channel URLs (@handle, /channel/UC...). Watch, youtu.be, Shorts, embed and live links all work. A playlist or channel is expanded into its videos, up to the per-list limit below.",
            "items": {
              "type": "string"
            }
          },
          "preferredLanguages": {
            "title": "Preferred languages, in order",
            "type": "array",
            "description": "Language codes such as en, ar, fr, es, pt-BR, zh-Hans. The first language that the video has wins. Inside one language, a manual track is chosen before an auto-generated one. Any code YouTube uses works.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "allowAutoGenerated": {
            "title": "Allow auto-generated captions",
            "type": "boolean",
            "description": "Use YouTube's speech-recognition captions when no manual track exists in a wanted language. Turn off to accept manual captions only.",
            "default": true
          },
          "translateTo": {
            "title": "Translate to (optional)",
            "type": "string",
            "description": "Language code for the output. If the video has a track in this language, that track is used. If not, YouTube's own machine translation of the preferred-language track is requested. Leave empty to keep the original language."
          },
          "allowTranslation": {
            "title": "Use YouTube translation when a language is missing",
            "type": "boolean",
            "description": "When no track exists in your preferred languages, ask YouTube for a machine translation into the first one. YouTube refuses some translation requests; see fallback below.",
            "default": true
          },
          "fallbackToAnyLanguage": {
            "title": "Fall back to the original language",
            "type": "boolean",
            "description": "When the wanted language is missing and translation is off or refused, return the video's own track and say so in `language` and `message`. Turn off to get status no_captions instead (not charged).",
            "default": true
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "segments",
              "text",
              "srt",
              "all"
            ],
            "type": "string",
            "description": "segments: timed lines (start, duration, text) plus plain text. text: plain text only. srt: SubRip subtitle file text. all: everything.",
            "default": "segments"
          },
          "includeChapters": {
            "title": "Include chapters and line summary",
            "type": "boolean",
            "description": "Split the transcript by the chapter timestamps in the video description, with the first and last spoken line and a word count per chapter. Videos without chapter stamps are split into 5-minute blocks. No AI is used.",
            "default": true
          },
          "includeChapterText": {
            "title": "Include full text per chapter",
            "type": "boolean",
            "description": "Adds each chapter's full text. Makes rows larger.",
            "default": false
          },
          "maxVideos": {
            "title": "Maximum videos",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on videos processed in this run, and therefore on cost.",
            "default": 100
          },
          "maxVideosPerList": {
            "title": "Maximum videos per playlist or channel",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many videos to take from each playlist or channel (newest first for channels).",
            "default": 50
          },
          "autoProxyFallback": {
            "title": "Automatic proxy fallback",
            "type": "boolean",
            "description": "Start without a proxy. If YouTube refuses the request, switch to datacenter proxy, then to residential proxy, and stay there for the rest of the run. Proxy cost is included in the price.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Fixed proxy (optional)",
            "type": "object",
            "description": "Set this only to force one proxy for every request. It replaces the automatic fallback.",
            "default": {
              "useApifyProxy": false
            }
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Pause before each request. Raise it if the log shows refusals.",
            "default": 300
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}