{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript & Subtitles Extractor - Text, SRT, VTT",
    "description": "Extract YouTube transcripts and subtitles in bulk. Returns plain text, timestamped segments, SRT, VTT, or LLM-ready chunks. Handles auto-generated and human captions in any language. Pay only for videos that return a transcript.",
    "version": "0.1",
    "x-build-id": "t4yzopnZqlSIeP0Nc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/readable_slash~youtube-transcript-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-readable_slash-youtube-transcript-extractor",
        "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/readable_slash~youtube-transcript-extractor/runs": {
      "post": {
        "operationId": "runs-sync-readable_slash-youtube-transcript-extractor",
        "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/readable_slash~youtube-transcript-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-readable_slash-youtube-transcript-extractor",
        "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": [
          "videoUrls"
        ],
        "properties": {
          "videoUrls": {
            "title": "YouTube videos",
            "type": "array",
            "description": "Video URLs or 11-character video IDs. Watch links, youtu.be short links, Shorts, embeds and live URLs all work. Duplicates are removed, so the same video pasted twice is only charged once.",
            "items": {
              "type": "string"
            }
          },
          "preferredLanguages": {
            "title": "Preferred languages",
            "type": "array",
            "description": "Language codes in order of preference, for example nl, en, de. A human-written track always wins over an auto-generated one in the same language. If none of the preferred languages exist, the closest regional variant is used, then any human track, then anything available.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "outputFormats": {
            "title": "Output formats",
            "type": "array",
            "description": "Which shapes to return. Only what you request is included, so a long video does not arrive in five formats at once.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "segments",
                "chunks",
                "srt",
                "vtt"
              ],
              "enumTitles": [
                "Plain text",
                "Timestamped segments",
                "LLM-ready chunks with timestamps",
                "SRT subtitle file",
                "WebVTT subtitle file"
              ]
            },
            "default": [
              "text"
            ]
          },
          "chunkTargetChars": {
            "title": "Chunk size (characters)",
            "minimum": 200,
            "maximum": 8000,
            "type": "integer",
            "description": "Target size for each chunk when the chunks format is selected. Chunks break at sentence ends where possible and keep the timestamp they started at, so a model's answer can be traced back to a moment in the video.",
            "default": 1200
          },
          "chunkOverlapChars": {
            "title": "Chunk overlap (characters)",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "How much text to repeat at the start of each chunk. A small overlap helps retrieval when a passage begins mid-topic. Set to 0 to disable.",
            "default": 100
          },
          "includeAvailableLanguages": {
            "title": "List all available languages",
            "type": "boolean",
            "description": "Adds every caption language the video offers to each result. Useful when deciding which languages to request on a later run.",
            "default": false
          },
          "useResidentialProxy": {
            "title": "Use residential proxy",
            "type": "boolean",
            "description": "Required. YouTube refuses requests from datacenter address ranges and answers every one with 'Sign in to confirm you're not a bot'. Turning this off will make every video fail unless you are running the code on a home connection.",
            "default": true
          },
          "proxyCountry": {
            "title": "Proxy country",
            "type": "string",
            "description": "Optional two-letter country code, for example US or NL. Leave empty to let the pool choose. Setting one can matter for region-restricted videos.",
            "default": ""
          },
          "maxRetries": {
            "title": "Retries per video",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "How many times to retry a video that failed for a network reason, each time from a different proxy address. Videos that genuinely have no captions are never retried, so raising this does not waste time or money on them.",
            "default": 3
          },
          "maxVideos": {
            "title": "Maximum videos",
            "minimum": 0,
            "type": "integer",
            "description": "Safety cap on how many videos to process. 0 means no limit.",
            "default": 0
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "How many videos to fetch at once. Raising this speeds up large runs; lowering it is gentler on YouTube.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}