{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper with Chapters & Heatmap",
    "description": "Get YouTube transcripts from videos, channels, playlists or searches: timed segments, plain text, SRT or VTT in your preferred language, every caption and dubbed audio track, chapters, most-replayed moments and LLM-ready chunks with timestamp links. No API key.",
    "version": "0.1",
    "x-build-id": "Y8UAzcrADMR7LfZvk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sz022~youtube-transcript-chapters/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sz022-youtube-transcript-chapters",
        "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/sz022~youtube-transcript-chapters/runs": {
      "post": {
        "operationId": "runs-sync-sz022-youtube-transcript-chapters",
        "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/sz022~youtube-transcript-chapters/run-sync": {
      "post": {
        "operationId": "run-sync-sz022-youtube-transcript-chapters",
        "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": {
          "urls": {
            "title": "Videos, channels or playlists",
            "type": "array",
            "description": "One per line, mixed freely. Videos: https://www.youtube.com/watch?v=..., youtu.be/..., /shorts/... or a bare 11-character video ID. Channels: https://www.youtube.com/@handle, /channel/UC..., or @handle. Playlists: https://www.youtube.com/playlist?list=... or a bare playlist ID. Channels and playlists expand into their newest videos, up to the limit below.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries (optional)",
            "type": "array",
            "description": "YouTube searches, one per line. Each returns the top videos for the query, up to the limit below.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerSource": {
            "title": "Videos per channel, playlist or search",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many videos to take from each channel, playlist or search query. Single video links are always read.",
            "default": 20
          },
          "publishedAfter": {
            "title": "Only videos published after",
            "type": "string",
            "description": "Optional. A date (2026-01-31) or a period back from now (7 days, 2 weeks, 3 months). Use it on a schedule to read only a channel's new videos. Applies to channels, playlists and searches; video links you list yourself are always read."
          },
          "channelContentType": {
            "title": "Which channel uploads",
            "enum": [
              "videos",
              "shorts",
              "streams",
              "all"
            ],
            "type": "string",
            "description": "Which of a channel's uploads to list, newest first.",
            "default": "videos"
          },
          "languages": {
            "title": "Preferred languages",
            "type": "array",
            "description": "Caption languages in order of preference, as codes: en, es, pt-BR, ja. \"en\" also takes en-US or en-GB. Leave empty to take the video's own default track.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "fallbackToAnyLanguage": {
            "title": "Fall back to the video's own language",
            "type": "boolean",
            "description": "When none of the preferred languages exist, return the video's default track instead (the row says so in languageMatch and notes). Off: such videos come back as language_unavailable, with the list of tracks they do have.",
            "default": true
          },
          "preferManualCaptions": {
            "title": "Prefer captions typed by a person",
            "type": "boolean",
            "description": "Within one language, take uploaded captions over YouTube's auto-generated ones. Off: take auto-generated first.",
            "default": true
          },
          "mode": {
            "title": "What to return",
            "enum": [
              "transcript",
              "tracksOnly"
            ],
            "type": "string",
            "description": "Full transcripts, or only the list of caption and audio tracks each video has (cheaper, no caption download).",
            "default": "transcript"
          },
          "outputFormats": {
            "title": "Transcript formats",
            "type": "array",
            "description": "segments: timed lines (start, end, text). text: one plain string. srt and vtt: subtitle files as text.",
            "items": {
              "type": "string",
              "enum": [
                "segments",
                "text",
                "srt",
                "vtt"
              ],
              "enumTitles": [
                "Timed segments",
                "Plain text",
                "SRT",
                "WebVTT"
              ]
            },
            "default": [
              "segments",
              "text"
            ]
          },
          "includeWordTimestamps": {
            "title": "Word timestamps (auto-generated captions)",
            "type": "boolean",
            "description": "Add the start and end of every word to each segment. Only YouTube's auto-generated captions carry word timings.",
            "default": false
          },
          "includeChaptersAndHeatmap": {
            "title": "Chapters, heatmap and channel extras (extra charge)",
            "type": "boolean",
            "description": "One more request per video: YouTube's chapter list (including chapters it generated itself), the 'Most replayed' heatmap with the transcript of the most replayed part, the verified badge, and the subscriber and comment counts. Charged as chapters-heatmap on top of the row. Chapters written in the description are returned without it, free.",
            "default": false
          },
          "llmChunking": {
            "title": "Chunks for LLMs",
            "enum": [
              "none",
              "chapters",
              "length"
            ],
            "type": "string",
            "description": "Split each transcript into chunks with a start time and a deep link (&t=) to that moment. By chapter uses the video's chapters and splits long ones; videos without chapters are chunked by length.",
            "default": "none"
          },
          "chunkMaxCharacters": {
            "title": "Maximum characters per chunk",
            "minimum": 200,
            "maximum": 100000,
            "type": "integer",
            "description": "A chunk ends before it would exceed this. A caption line is never split.",
            "default": 4000
          },
          "useResidentialFallback": {
            "title": "Retry bot-checked videos through residential IPs",
            "type": "boolean",
            "description": "YouTube asks some datacenter IPs to 'confirm you're not a bot'. Each video is first retried on fresh datacenter IPs; with this on, a video that still gets the check is tried once or twice through a residential IP. Included in the price. Off: such videos come back as blocked and are not charged.",
            "default": true
          },
          "abortAfterConsecutiveFailures": {
            "title": "Stop after this many failures in a row",
            "minimum": 0,
            "type": "integer",
            "description": "Ends the run early when YouTube stops answering. Videos without captions, private or deleted videos do not count. 0 never stops early.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify's datacenter proxy by default. Every request asks YouTube for only the fields it reads, so a video takes about 10 to 30 KB.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}