{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper: Chapter Extractor",
    "description": "A powerful automation actor that extracts full transcripts from YouTube videos with timestamps and speaker data. It enables content analysis, keyword extraction, translation, and SEO research, helping creators and analysts access precise, structured video text data instantly.",
    "version": "0.1",
    "x-build-id": "kDdjVYBxOeKxKqqZv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/simpleapi~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-simpleapi-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/simpleapi~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-simpleapi-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/simpleapi~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-simpleapi-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",
            "type": "array",
            "description": "Add one or more YouTube links to extract transcripts (and chapters) from. Each completed video appears in your dataset automatically. (Also accepts the base actor's `urls` field name for backward compatibility.) ⚡",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeAutoCaptions": {
            "title": "🇺🇸 Include Auto-Generated Captions",
            "type": "boolean",
            "description": "Include YouTube's auto-generated English captions when a manually-created English transcript isn't available. Default is true. (Also accepts the base field name `includeEnglishAG`.)"
          },
          "includeNonEnglishCaptions": {
            "title": "🌍 Include Non-English Captions",
            "type": "boolean",
            "description": "Include transcripts in languages other than English. Default is false. (Also accepts the base field name `includeNonEnglish`.)"
          },
          "transcriptStyle": {
            "title": "📝 Transcript Style",
            "enum": [
              "timestamp",
              "text"
            ],
            "type": "string",
            "description": "Choose transcript style: 'timestamp' includes time markers, while 'text' returns clean plain text. Default is 'text'. (Also accepts the base field name `outputFormat`.)"
          },
          "detectChapters": {
            "title": "📚 Detect Chapters",
            "type": "boolean",
            "description": "When ON, each video's real chapter markers (title + start/end time) are extracted and the transcript is aggregated per chapter. When OFF, only the base transcript fields are produced. Default: true.",
            "default": true
          },
          "chapterSource": {
            "title": "🔖 Chapter Source",
            "enum": [
              "official",
              "descriptionFallback",
              "both"
            ],
            "type": "string",
            "description": "'official' = only use YouTube's own creator-defined chapter markers (from the video's marker list). 'descriptionFallback' = only parse '00:00 Intro'-style timestamp lines from the video description. 'both' (default) = try official markers first, and only fall back to the description parser when no official markers exist. Only used when Detect Chapters is ON.",
            "default": "both"
          },
          "summarizeChapters": {
            "title": "🤖 Summarize Chapters (AI, opt-in)",
            "type": "boolean",
            "description": "When ON (and a key is available via chapterAiApiKey or a matching provider env var), each detected chapter gets a one-line AI summary of its transcript slice (aiSummary field). Off by default — with no key, aiSummary is simply left null and every other chapter/transcript field is unaffected.",
            "default": false
          },
          "chapterAiModel": {
            "title": "🔑 Chapter Summary AI Model",
            "enum": [
              "claude-haiku-4-5",
              "claude-sonnet-5",
              "claude-opus-4-8",
              "claude-fable-5",
              "gpt-4o-mini",
              "gpt-4o",
              "gpt-4.1-mini",
              "gpt-4.1",
              "o3-mini",
              "o1",
              "gemini-2.0-flash-lite",
              "gemini-2.0-flash",
              "gemini-1.5-pro",
              "gemini-2.5-flash",
              "gemini-2.5-pro",
              "grok-2-latest",
              "grok-3-mini",
              "grok-3",
              "grok-beta",
              "deepseek-chat",
              "deepseek-reasoner",
              "sonar",
              "sonar-pro",
              "sonar-reasoning",
              "mistral-small-latest",
              "mistral-large-latest"
            ],
            "type": "string",
            "description": "Model used to generate the one-line per-chapter summary. Provider is auto-detected from the name: claude-*=Anthropic, gpt-*/o1/o3=OpenAI, gemini-*=Google, grok-*=xAI, deepseek-*=DeepSeek, sonar*=Perplexity, mistral-*=Mistral. Only used when Summarize Chapters is ON.",
            "default": "claude-haiku-4-5"
          },
          "chapterAiApiKey": {
            "title": "🔐 Chapter Summary AI Key",
            "type": "string",
            "description": "API key for chapterAiModel. Falls back to the matching environment variable if left blank (ANTHROPIC_API_KEY / OPENAI_API_KEY / GEMINI_API_KEY or GOOGLE_API_KEY / XAI_API_KEY or GROK_API_KEY / DEEPSEEK_API_KEY / PERPLEXITY_API_KEY or PPLX_API_KEY / MISTRAL_API_KEY). Leave blank with no env var = chapter summaries are skipped (null); chapters and transcripts still work normally."
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration 🌐",
            "type": "object",
            "description": "Optional proxy setup for stable access. Uses Apify Residential Proxy by default when needed.",
            "default": {}
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}