{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper: Subtitles, Chapters & MCP",
    "description": "Extract YouTube transcripts as text, Markdown, RAG chunks, SRT, or VTT with chapters and key moments. Use it for AI agents via MCP, or to find where a phrase is said. This unofficial tool downloads no video and runs no speech-to-text; no-caption rows are free. Not affiliated with YouTube or Google.",
    "version": "0.0",
    "x-build-id": "22DBEFcIR9CSkDjGx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kizukidata~youtube-transcripts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kizukidata-youtube-transcripts",
        "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/kizukidata~youtube-transcripts/runs": {
      "post": {
        "operationId": "runs-sync-kizukidata-youtube-transcripts",
        "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/kizukidata~youtube-transcripts/run-sync": {
      "post": {
        "operationId": "run-sync-kizukidata-youtube-transcripts",
        "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": {
          "videos": {
            "title": "Videos",
            "type": "array",
            "description": "YouTube watch, youtu.be, Shorts, playlist, or channel URLs or 11-char IDs (up to 500). Naming no target reads 1 sample video: a free sample of at most 1 row (marked isSample).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "playlists": {
            "title": "Playlists",
            "type": "array",
            "description": "Playlist URLs (/playlist?list=) or IDs, up to 20. Reads first 100 videos per playlist (capped by maxItems, or 20 total without maxItems).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "channels": {
            "title": "Channels",
            "type": "array",
            "description": "Channel URLs (/channel/, @handle, /c/, /user/) or IDs, up to 20. Reads newest videos first (capped by maxItems, or 20 total without maxItems).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "find": {
            "title": "Find phrases",
            "type": "array",
            "description": "Up to 20 case-insensitive words or phrases to locate in transcripts. Text match, not semantic search: pass short keywords (pricing, open source), not a whole question. Fills matches; no-match videos are free.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "findMode": {
            "title": "What to return for videos that match",
            "enum": [
              "snippets",
              "filter"
            ],
            "type": "string",
            "description": "snippets (default): return only matched clips plus findContextSeconds. filter: return the full transcript of matching videos. Used with find.",
            "default": "snippets"
          },
          "findContextSeconds": {
            "title": "Seconds of speech around each match",
            "minimum": 0,
            "maximum": 600,
            "type": "integer",
            "description": "How many seconds of speech to keep before and after each place a phrase is said, from 0 to 600. Used only when find is set.",
            "default": 15
          },
          "maxMatches": {
            "title": "Maximum matches described per video",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Max matches listed in matches per video (1-100, default 10). matchCount still counts all occurrences; raise this if matches equals maxMatches.",
            "default": 10
          },
          "startAt": {
            "title": "Start of the time window",
            "minimum": 0,
            "type": "integer",
            "description": "Start of time window in seconds from video start (e.g. 90 for 1:30). Includes any caption active at that second."
          },
          "endAt": {
            "title": "End of the time window",
            "minimum": 0,
            "type": "integer",
            "description": "Return only what is said up to this second (seconds from the start of the video), later than startAt. Leave empty to read to the end."
          },
          "maxChars": {
            "title": "Maximum transcript characters per video",
            "minimum": 0,
            "maximum": 2000000,
            "type": "integer",
            "description": "Cut caption text after this many chars (0 = full). Returns at least 1 caption, sets truncated: true and nextStartSegment for startSegment paging.",
            "default": 0
          },
          "startSegment": {
            "title": "Start at caption number",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Caption index to start from (0 = beginning). Pass a truncated row's nextStartSegment with the same inputs and maxChars to continue reading.",
            "default": 0
          },
          "formats": {
            "title": "Transcript formats",
            "type": "array",
            "description": "Output formats (default: text, segments): text, segments, markdown (chapters & timestamp links), chunks (RAG), srt, vtt. Unselected are null.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "segments",
                "markdown",
                "chunks",
                "srt",
                "vtt"
              ],
              "enumTitles": [
                "text: plain text",
                "segments: timed captions",
                "markdown: chapters and timestamp links",
                "chunks: RAG chunks",
                "srt: SubRip subtitle file",
                "vtt: WebVTT subtitle file"
              ]
            },
            "default": [
              "text",
              "segments"
            ]
          },
          "languages": {
            "title": "Caption languages (in order of preference)",
            "type": "array",
            "description": "Up to 10 caption language codes in priority order (e.g. en, ja). Falls back to spoken auto-captions with languageNote; never machine-translated.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "preferManual": {
            "title": "Prefer human-written captions over auto-generated ones",
            "type": "boolean",
            "description": "When a video has both in the requested language, take the human-written track. Turn it off to prefer the auto-generated track.",
            "default": true
          },
          "includeSignals": {
            "title": "Most replayed moments, chapters, likes and comment count",
            "type": "boolean",
            "description": "Include mostReplayed (with speech), heatmap, chapters, likeCount, and commentCount at no extra cost. Off = transcripts and description chapters only.",
            "default": true
          },
          "chunkSize": {
            "title": "Chunk size (characters)",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Target characters per RAG chunk, split on paragraphs/sentences (0 = single chunk, 0-20000, default 1500). Used when formats includes chunks.",
            "default": 1500
          },
          "maxItems": {
            "title": "Maximum videos",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Max rows per run (1-500). No API default (Console prefills 3); omit for all named videos + 20 from playlists/channels. Only transcripts are charged."
          },
          "onlyNewItems": {
            "title": "Only new videos",
            "type": "boolean",
            "description": "Skip videos returned in earlier runs with the same input (state kept 90 days). Failed/no-caption rows retry; no-match find rows re-check later.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Requests at once",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Concurrent requests (1-3, default 3). Set 1 for sequential requests; rate limits still apply. Cached captions send no request.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Defaults to Apify RESIDENTIAL proxies. Set apifyProxyCountry for region-restricted videos, or turn off for local tests.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}