{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper — Never Silent, LLM-Ready",
    "description": "Public YouTube transcript scraper with full batch accounting: every input returns a transcript or a typed, actionable failure — the run is never silent. Supports direct videos plus playlist/channel expansion, caption-availability auditing, and LLM-ready output as JSON, text, SRT, WebVTT, or chunks.",
    "version": "0.6",
    "x-build-id": "KC7ioNrRBFWhxpjKp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/catalini82~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-catalini82-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/catalini82~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-catalini82-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/catalini82~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-catalini82-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",
        "properties": {
          "videoUrls": {
            "title": "YouTube video URLs",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Public watch, youtu.be, Shorts, embed, or live URLs. Normally completed processing pushes a success or typed failure for every entry. Platform termination or total dataset outage can prevent a write.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          "sources": {
            "title": "Video, playlist, or channel sources",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Optional ordered source occurrences. Playlist and channel expansion uses a bounded public prefix; repeated values remain separate occurrences.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "type",
                "value"
              ],
              "properties": {
                "type": {
                  "title": "Source type",
                  "description": "Select video, playlist, or channel. Search is unsupported.",
                  "type": "string",
                  "enum": [
                    "video",
                    "playlist",
                    "channel"
                  ]
                },
                "value": {
                  "title": "Public source identity or URL",
                  "description": "Use one supported public identity or canonical HTTPS YouTube URL.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2048
                },
                "maxItems": {
                  "title": "Maximum expanded items",
                  "description": "Playlist/channel prefix size, from 1 through 50. Video sources must omit this field.",
                  "type": "integer",
                  "default": 25,
                  "minimum": 1,
                  "maximum": 50
                }
              }
            }
          },
          "operationMode": {
            "title": "Operation mode",
            "enum": [
              "transcript",
              "caption_audit"
            ],
            "type": "string",
            "description": "Extract transcript output or perform a text-free public caption inventory audit.",
            "default": "transcript"
          },
          "languages": {
            "title": "Preferred languages",
            "maxItems": 10,
            "type": "array",
            "description": "Caption language codes in priority order, such as en, en-US, de, or es.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 35
            }
          },
          "languageFallback": {
            "title": "Allow another caption language",
            "type": "boolean",
            "description": "When no preferred language exists, use another advertised caption track instead of returning language_unavailable.",
            "default": true
          },
          "outputFormat": {
            "title": "Primary output format",
            "enum": [
              "json",
              "text",
              "srt",
              "vtt",
              "llm"
            ],
            "type": "string",
            "description": "Select the primary transcript representation. Unified status and metadata fields are always present.",
            "default": "llm"
          },
          "includeMetadata": {
            "title": "Include video metadata",
            "type": "boolean",
            "description": "Include public title, channel, duration, view count, publication date, description, and thumbnail when available.",
            "default": true
          },
          "includeSegments": {
            "title": "Include timestamped segments",
            "type": "boolean",
            "description": "Include the normalized timestamped caption segments in each record. At least one of segments or full transcript text must stay enabled.",
            "default": true
          },
          "includeTranscriptText": {
            "title": "Include full transcript text",
            "type": "boolean",
            "description": "Include the joined full transcript text in each record. At least one of segments or full transcript text must stay enabled.",
            "default": true
          },
          "includeChunks": {
            "title": "Include LLM-ready chunks",
            "type": "boolean",
            "description": "Include deterministic overlapping text chunks. LLM format always includes them.",
            "default": true
          },
          "chunkMaxTokens": {
            "title": "Maximum estimated tokens per chunk",
            "minimum": 50,
            "maximum": 4000,
            "type": "integer",
            "description": "Approximate token limit for each LLM chunk. The overlap must be at most floor(chunkMaxTokens / 2).",
            "default": 1000
          },
          "chunkOverlapTokens": {
            "title": "Estimated overlap tokens",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Approximate context repeated between adjacent chunks. Runtime validation requires this value to be at most floor(chunkMaxTokens / 2), which guarantees a stride of at least half a chunk.",
            "default": 100
          },
          "maxVideos": {
            "title": "Maximum videos to fetch",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Only this many entries are fetched. Later entries still receive typed MAX_VIDEOS_LIMIT records so none disappear silently.",
            "default": 25
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of videos processed at once. Conservative defaults reduce blocking risk.",
            "default": 3
          },
          "perVideoTimeoutSecs": {
            "title": "Per-video timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "One total monotonic deadline shared by all extraction attempts for one video. Finalizing a timed-out isolated library worker may use up to 0.35 seconds of bounded terminate/kill/reap cleanup beyond it.",
            "default": 30
          },
          "proxyMode": {
            "title": "Proxy mode",
            "enum": [
              "residential",
              "apify_auto",
              "datacenter",
              "direct"
            ],
            "type": "string",
            "description": "Which network egress to use. YouTube blocks datacenter IP ranges, so Residential is the default and the only mode that reliably works on the Apify cloud. Direct, automatic, and datacenter routes are frequently rate-limited or blocked; when that happens the Actor reports a typed 'blocked'/'rate_limited' failure instead of silently returning nothing. Residential proxy traffic counts against your Apify residential proxy quota.",
            "default": "residential"
          },
          "proxyCountry": {
            "title": "Proxy country",
            "maxLength": 2,
            "type": "string",
            "description": "Optional two-letter country code for an explicitly selected Apify proxy mode, for example US or DE.",
            "default": ""
          },
          "debugMode": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Include safe parser/request diagnostics. Proxy URLs, credentials, cookies, and secrets are never included.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}