{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript API & Scraper",
    "description": "Extract transcripts from YouTube videos, Shorts, playlists, and channels—no YouTube API key. Get clean text, timestamps, SRT, VTT, Markdown, metadata, and RAG-ready chunks for AI agents and automation. Original-language output; failed videos are free.",
    "version": "2.0",
    "x-build-id": "EZ0hkmneSlYCw4o3K"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/panix~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-panix-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/panix~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-panix-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/panix~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-panix-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 or Shorts URLs",
            "type": "array",
            "description": "Optional direct video URLs or 11-character IDs. Supports watch, youtu.be, Shorts, live replay, embed, and mobile links. Duplicates are removed automatically.",
            "items": {
              "type": "string"
            }
          },
          "playlistUrls": {
            "title": "YouTube playlist URLs",
            "type": "array",
            "description": "Optional public playlist URLs or playlist IDs. Videos are discovered in playlist order without a YouTube API key.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "channelUrls": {
            "title": "YouTube channel URLs or @handles",
            "type": "array",
            "description": "Optional public channel URLs, @handles, or explicit /videos, /shorts, or /streams tabs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxVideos": {
            "title": "Maximum discovered videos",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum unique videos added from playlists and channels across the run. Direct video URLs do not consume this allowance.",
            "default": 50
          },
          "channelMode": {
            "title": "Channel discovery mode",
            "enum": [
              "latest",
              "all"
            ],
            "type": "string",
            "description": "Latest uses YouTube's compact public feed for up to 15 recent uploads and Shorts and is recommended for scheduled monitoring. All follows browse continuations until the maximum is reached.",
            "default": "latest"
          },
          "publishedAfter": {
            "title": "Published on or after",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional inclusive UTC publication date for channel videos, using YYYY-MM-DD.",
            "default": ""
          },
          "publishedBefore": {
            "title": "Published on or before",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional inclusive UTC publication date for channel videos, using YYYY-MM-DD.",
            "default": ""
          },
          "language": {
            "title": "Caption language (optional)",
            "pattern": "^$|^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})?$",
            "type": "string",
            "description": "Leave empty to return the video's original spoken language. Or enter a code such as en, es, de, hi, ur, or pt-BR to request an available caption track.",
            "default": ""
          },
          "preferManualCaptions": {
            "title": "Prefer human-made captions",
            "type": "boolean",
            "description": "Prefer creator-uploaded captions over auto-generated captions in the same language.",
            "default": true
          },
          "fixUrduScript": {
            "title": "Correct Urdu captions to Urdu script",
            "type": "boolean",
            "description": "When YouTube writes Urdu speech with its Hindi recognizer, convert the original-language transcript to Urdu script while preserving YouTube's caption text.",
            "default": true
          },
          "removeNonSpeechTags": {
            "title": "Remove music and applause tags",
            "type": "boolean",
            "description": "Remove tags such as [Music], [Applause], and musical-note symbols from transcript text.",
            "default": false
          },
          "includeSegments": {
            "title": "Timestamped segments",
            "type": "boolean",
            "description": "Include a segments array with start, end, duration, and text for every caption line.",
            "default": true
          },
          "includeMetadata": {
            "title": "Video metadata and chapters",
            "type": "boolean",
            "description": "Include title, channel, publication date, duration, views, keywords, thumbnail, description, and detected chapters.",
            "default": true
          },
          "includeSrt": {
            "title": "SRT subtitles",
            "type": "boolean",
            "description": "Include a ready-to-save SRT subtitle string. Right-to-left languages include direction markers.",
            "default": false
          },
          "includeVtt": {
            "title": "WebVTT subtitles",
            "type": "boolean",
            "description": "Include a ready-to-save WebVTT subtitle string.",
            "default": false
          },
          "includeMarkdown": {
            "title": "LLM-ready Markdown",
            "type": "boolean",
            "description": "Include a Markdown document with metadata, timestamped paragraphs, and chapter headings.",
            "default": false
          },
          "includeChunks": {
            "title": "RAG-ready chunks",
            "type": "boolean",
            "description": "Include chapter-aware chunks with timestamps and deep links for vector databases and AI applications.",
            "default": false
          },
          "chunkSizeWords": {
            "title": "Chunk size",
            "minimum": 50,
            "maximum": 2000,
            "type": "integer",
            "description": "Target words per chunk; characters are used for Chinese, Japanese, and Thai.",
            "default": 300
          },
          "chunkOverlapWords": {
            "title": "Chunk overlap",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Words repeated between adjacent chunks so context is preserved.",
            "default": 30
          },
          "maxConcurrency": {
            "title": "Parallel videos",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Maximum transcript requests processed concurrently.",
            "default": 10
          },
          "maxRetries": {
            "title": "Retries per video",
            "minimum": 0,
            "maximum": 6,
            "type": "integer",
            "description": "Extra attempts from fresh residential IPs when YouTube blocks a request. Retries are free.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Residential proxy is enabled by default because YouTube blocks most datacenter IPs.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}