{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper - bulk videos, channels, search",
    "description": "Download YouTube transcripts in bulk for videos, Shorts, channels, playlists or search results. Keyless, with timestamped output and optional AI transcription fallback for videos without captions.",
    "version": "0.1",
    "x-build-id": "olWJtmwPj2nhrTjyE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vhsgreed~youtube-transcript-fresh/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vhsgreed-youtube-transcript-fresh",
        "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/vhsgreed~youtube-transcript-fresh/runs": {
      "post": {
        "operationId": "runs-sync-vhsgreed-youtube-transcript-fresh",
        "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/vhsgreed~youtube-transcript-fresh/run-sync": {
      "post": {
        "operationId": "run-sync-vhsgreed-youtube-transcript-fresh",
        "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": {
          "sources": {
            "title": "Sources (video URLs/IDs, Shorts, playlist URLs, channel URLs/@handles)",
            "type": "array",
            "description": "Mix any of: watch?v=..., youtu.be/..., youtube.com/shorts/..., bare 11-char video IDs, youtube.com/playlist?list=..., /channel/UC..., /@handle.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "YouTube search terms; transcripts for the top results are fetched. Combine with maxVideosPerSource.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerSource": {
            "title": "Max videos per source",
            "maximum": 2000,
            "type": "integer",
            "description": "Applies to each channel, playlist and search query (default 20, max 2000).",
            "default": 20
          },
          "proxy": {
            "title": "Proxy",
            "enum": [
              "apify-residential",
              "apify-datacenter",
              "none"
            ],
            "type": "string",
            "description": "YouTube bot-gates datacenter IPs after a few lookups; residential keeps success rates high. Proxy cost is paid by the run owner as platform usage.",
            "default": "apify-residential"
          },
          "languages": {
            "title": "Caption languages (fallback order)",
            "type": "array",
            "description": "ISO 639-1 codes, tried in order. Empty = original language of the video.",
            "items": {
              "type": "string"
            }
          },
          "captionSource": {
            "title": "Caption source",
            "enum": [
              "any",
              "manual",
              "auto"
            ],
            "type": "string",
            "description": "any = manual preferred; manual = manual captions only; auto = auto-generated only.",
            "default": "any"
          },
          "translateTo": {
            "title": "Translate transcript to (ISO 639-1, optional)",
            "type": "string",
            "description": "Uses YouTube built-in translation (tlang). Empty = no translation."
          },
          "outputFormats": {
            "title": "Output formats",
            "type": "array",
            "description": "Any of: json (timestamped segments, default), text, srt, vtt, llm (LLM-ready ~1000-char chunks).",
            "items": {
              "type": "string"
            }
          },
          "includeMetadata": {
            "title": "Include video metadata",
            "type": "boolean",
            "description": "title, channel, channelId, uploadDate, durationSec, viewCount, likeCount, keywords, thumbnails, description, isLive.",
            "default": true
          },
          "wordTimestamps": {
            "title": "Include word-level timestamps when available",
            "type": "boolean",
            "description": "Auto-generated (ASR) tracks carry per-word timing; included in each segment as 'words'.",
            "default": false
          },
          "maxRetries": {
            "title": "Retries per request",
            "maximum": 6,
            "type": "integer",
            "description": "Retries per YouTube request with exponential backoff (default 3, max 6).",
            "default": 3
          },
          "maxVideosForAi": {
            "title": "Max videos for AI fallback per run",
            "maximum": 100,
            "type": "integer",
            "description": "Cap on caption-less videos sent to Whisper per run (default 5, max 100).",
            "default": 5
          },
          "aiEnabled": {
            "title": "Enable AI transcription fallback (Whisper, for videos without captions)",
            "type": "boolean",
            "description": "Off by default. Uses YOUR OpenAI key (aiApiKey or OPENAI_API_KEY env var). Charges ai_transcription_minute per started minute.",
            "default": false
          },
          "aiApiKey": {
            "title": "OpenAI API key for AI fallback (BYOK)",
            "type": "string",
            "description": "OpenAI key for AI fallback (sk-...). Leave empty to use the OPENAI_API_KEY environment variable."
          },
          "aiMaxMinutes": {
            "title": "Max AI minutes per run",
            "maximum": 600,
            "type": "integer",
            "description": "Hard cap on Whisper minutes per run (default 30, max 600).",
            "default": 30
          },
          "aiMaxVideos": {
            "title": "Max videos for AI fallback per run",
            "maximum": 100,
            "type": "integer",
            "description": "Cap on caption-less videos sent to Whisper per run (default 5, max 100).",
            "default": 5
          },
          "aiDryRun": {
            "title": "AI dry run (estimate cost only)",
            "type": "boolean",
            "description": "When true, reports estimated AI minutes and cost without transcribing or charging.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}