{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Pro — Videos, Shorts, Playlists & Channels",
    "description": "Extract YouTube transcripts from videos, Shorts, playlists, channels, and search. Get text, timestamped segments, SRT, VTT, RAG chunks, and metadata. Supports language selection, auto captions, translation, and reliable proxy fallback. Pay only for successful transcripts.",
    "version": "1.0",
    "x-build-id": "SYFEhDN2Q7Toqq0MQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/huzhihua~youtube-transcript-pro/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-huzhihua-youtube-transcript-pro",
        "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/huzhihua~youtube-transcript-pro/runs": {
      "post": {
        "operationId": "runs-sync-huzhihua-youtube-transcript-pro",
        "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/huzhihua~youtube-transcript-pro/run-sync": {
      "post": {
        "operationId": "run-sync-huzhihua-youtube-transcript-pro",
        "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",
            "type": "array",
            "description": "Video URLs/IDs, playlist or channel URLs, @handles, or search:query entries. Defaults to a short public captioned video for a health check.",
            "items": {
              "type": "string"
            }
          },
          "videoUrls": {
            "title": "Video URLs (legacy)",
            "type": "array",
            "description": "Optional additional list of video URLs or bare 11-character IDs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Optional search terms that yt-dlp resolves into public video results.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "title": "Preferred languages",
            "type": "array",
            "description": "Language priority list; exact match and locale-compatible variants are selected deterministically.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "fallbackToAnyLanguage": {
            "title": "Allow any language fallback",
            "type": "boolean",
            "description": "When enabled, use a manual track then an auto track only if none of the requested languages match.",
            "default": false
          },
          "preferManualCaptions": {
            "title": "Prefer manual captions",
            "type": "boolean",
            "description": "Prefer human-created captions over auto-generated tracks when language priority allows.",
            "default": true
          },
          "includeAutoGenerated": {
            "title": "Include auto-generated captions",
            "type": "boolean",
            "description": "If false, auto-generated tracks are not eligible for selection.",
            "default": true
          },
          "translateToLanguage": {
            "title": "Translate captions to",
            "type": "string",
            "description": "Optional target language code when the selected YouTube caption track supports translation."
          },
          "outputFormats": {
            "title": "Output formats",
            "type": "array",
            "description": "Choose any of text, segments, SRT, VTT, or RAG chunks. All are outputs of one transcript event.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "segments",
                "srt",
                "vtt",
                "rag"
              ],
              "enumTitles": [
                "Plain text",
                "Timestamped segments",
                "SRT",
                "WebVTT",
                "RAG chunks"
              ]
            },
            "default": [
              "text",
              "segments"
            ]
          },
          "ragChunks": {
            "title": "Create RAG chunks",
            "type": "boolean",
            "description": "Also create timestamped RAG chunks, grouped near the selected chunk duration.",
            "default": false
          },
          "chunkSeconds": {
            "title": "RAG chunk duration (seconds)",
            "minimum": 10,
            "maximum": 600,
            "type": "integer",
            "description": "Target duration for RAG chunks; actual boundaries follow caption segments.",
            "default": 60
          },
          "startSec": {
            "title": "Transcript start (seconds)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional lower bound for transcript segments; original timestamps are preserved."
          },
          "endSec": {
            "title": "Transcript end (seconds)",
            "minimum": 1,
            "type": "integer",
            "description": "Optional end timestamp; use with startSec or durationSec."
          },
          "durationSec": {
            "title": "Transcript duration (seconds)",
            "minimum": 1,
            "type": "integer",
            "description": "Optional duration used with startSec when endSec is not supplied."
          },
          "maxVideosPerSource": {
            "title": "Maximum videos per source",
            "minimum": 0,
            "type": "integer",
            "description": "Limit playlist/channel discovery; 0 means all discovered items.",
            "default": 20
          },
          "maxVideosPerSearch": {
            "title": "Maximum videos per search",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum results to resolve for each search query.",
            "default": 10
          },
          "includeVideos": {
            "title": "Include channel videos",
            "type": "boolean",
            "description": "Include the channel Videos tab during channel discovery.",
            "default": true
          },
          "includeShorts": {
            "title": "Include Shorts",
            "type": "boolean",
            "description": "Include the channel Shorts tab during channel discovery.",
            "default": true
          },
          "includeLive": {
            "title": "Include live and replay videos",
            "type": "boolean",
            "description": "Include the channel Streams tab during channel discovery.",
            "default": true
          },
          "timeoutSeconds": {
            "title": "Per-video timeout",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Maximum wait per metadata or caption request.",
            "default": 30
          },
          "retryCount": {
            "title": "Retries per video",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Number of short retries for retryable per-video failures.",
            "default": 1
          },
          "retryFreshCaptions": {
            "title": "Retry recent captions still processing",
            "type": "boolean",
            "description": "Retry NO_CAPTIONS only for videos published within 48 hours or recently-ended live replays with recent metadata.",
            "default": false
          },
          "freshCaptionRetryMaxMinutes": {
            "title": "Maximum fresh-caption wait (minutes)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Total upper bound for fresh-caption retries using finite 30/60/120-second backoff.",
            "default": 3
          },
          "proxyMode": {
            "title": "Proxy mode",
            "enum": [
              "auto",
              "direct",
              "datacenter",
              "residential"
            ],
            "type": "string",
            "description": "Direct uses no proxy; datacenter and residential use that group directly; auto tries direct, then datacenter, then optional residential.",
            "default": "auto"
          },
          "proxyConfiguration": {
            "title": "Apify proxy configuration",
            "type": "object",
            "description": "Optional Apify Proxy settings for legitimate public-access reliability. Proxy mode controls the selected network group."
          },
          "allowResidentialFallback": {
            "title": "Allow residential fallback",
            "type": "boolean",
            "description": "Allow residential proxy only after direct and datacenter network/bot failures in auto mode. Residential remains disabled by default.",
            "default": false
          },
          "maxSuccessfulTranscripts": {
            "title": "Maximum successful transcripts",
            "minimum": 0,
            "type": "integer",
            "description": "Optional local cap on the number of confirmed successful-transcript events; 0 uses the Apify run charge limit only.",
            "default": 0
          },
          "incrementalMode": {
            "title": "Skip unchanged items",
            "type": "boolean",
            "description": "When prior state exists, skip items with a previously stored identical transcript hash.",
            "default": false
          },
          "stateKey": {
            "title": "Persistent state key",
            "type": "string",
            "description": "Optional key suffix used for persistent resume and incremental state."
          },
          "resume": {
            "title": "Resume from saved state",
            "type": "boolean",
            "description": "Skip previously confirmed successful transcripts under the selected state key.",
            "default": false
          },
          "metadata": {
            "title": "Fetch video metadata",
            "type": "boolean",
            "description": "Fetch public video metadata with yt-dlp. Metadata fields may be null when unavailable.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}