{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper + AI Summary & Chapters",
    "description": "Get YouTube transcripts (manual or auto-generated subtitles, any language) with timestamps from video URLs, playlists or channels, as text, SRT, VTT or segments. Optional AI summary, chapters, key insights and translation. 98%+ success rate. Pay per transcript.",
    "version": "0.1",
    "x-build-id": "LIC0d50Rt3wWttUAe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maxencebernerd~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maxencebernerd-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/maxencebernerd~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-maxencebernerd-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/maxencebernerd~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-maxencebernerd-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": "Video URLs",
            "type": "array",
            "description": "YouTube video URLs in any form: `youtube.com/watch?v=…`, `youtu.be/…`, Shorts, live replays, embeds, mobile links.",
            "items": {
              "type": "string"
            }
          },
          "videoIds": {
            "title": "Video IDs",
            "type": "array",
            "description": "11-character YouTube video ids (e.g. `dQw4w9WgXcQ`). Handy for pipelines that already store ids.",
            "items": {
              "type": "string"
            }
          },
          "playlistUrls": {
            "title": "Playlist URLs",
            "type": "array",
            "description": "Playlist URLs or ids (`https://www.youtube.com/playlist?list=PL…`). Up to `maxVideosPerChannel` videos are taken from each playlist, in playlist order.",
            "items": {
              "type": "string"
            }
          },
          "channelUrls": {
            "title": "Channel URLs",
            "type": "array",
            "description": "Channel URLs or handles: `https://www.youtube.com/@mkbhd`, `@mkbhd`, `youtube.com/channel/UC…`, `/c/name`, `/user/name`.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerChannel": {
            "title": "Max videos per channel or playlist",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper limit of videos taken from each channel or playlist. Cost scales with the number of transcripts obtained ($0.005 each).",
            "default": 50
          },
          "channelSort": {
            "title": "Channel video order",
            "enum": [
              "latest",
              "popular"
            ],
            "type": "string",
            "description": "`latest`: newest uploads first; `popular`: most viewed first (the order YouTube shows on the channel's Videos tab).",
            "default": "latest"
          },
          "includeShorts": {
            "title": "Include Shorts from channels",
            "type": "boolean",
            "description": "Also take videos from the channel's Shorts tab (after the regular videos). Shorts given directly by URL are always processed.",
            "default": false
          },
          "language": {
            "title": "Transcript language",
            "type": "string",
            "description": "ISO 639-1 code of the caption track to fetch (`en`, `fr`, `pt-BR`…). Leave empty for the video's original spoken language. When the requested language does not exist for a video, the row is returned with status `no_transcript`, the list of available languages, and is not charged — never a transcript in another language. Use `translateTo` (AI section) for translations."
          },
          "preferManual": {
            "title": "Prefer manual captions",
            "type": "boolean",
            "description": "When both a manually created track and an auto-generated one exist in the chosen language, take the manual one (better punctuation and accuracy).",
            "default": true
          },
          "fallbackToAutoGenerated": {
            "title": "Accept auto-generated captions",
            "type": "boolean",
            "description": "Use YouTube's automatic captions when no manual track exists. Turn off to get only human-made subtitles (most videos will then return `no_transcript`).",
            "default": true
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "all",
              "segments",
              "text",
              "srt",
              "vtt"
            ],
            "type": "string",
            "description": "Which transcript representations to include in each row: `segments` (start, end, text), `text` (continuous text with reconstructed punctuation and paragraphs), `srt`, `vtt`, or `all`.",
            "default": "all"
          },
          "includeMetadata": {
            "title": "Extended metadata",
            "type": "boolean",
            "description": "Title, channel, duration, views, description, tags and thumbnail are always included for free. This option adds the publish date, like count, category and unlisted flag through one extra request, charged $0.0005 per video (event `metadata-fetched`).",
            "default": true
          },
          "enableSummary": {
            "title": "Generate a summary",
            "type": "boolean",
            "description": "Three-level summary: one sentence, one paragraph, key points. $0.02 per video per 20-minute block (event `summary-generated`).",
            "default": false
          },
          "summaryLanguage": {
            "title": "Summary language",
            "type": "string",
            "description": "Language of the summary, insights and chapter titles (ISO 639-1, e.g. `en`). Defaults to the transcript language."
          },
          "enableChapters": {
            "title": "Generate chapters",
            "type": "boolean",
            "description": "4 to 15 timestamped chapters (by duration) in YouTube's description format (`0:00 Title`), ready to paste. $0.02 per video per 20-minute block (event `chapters-generated`).",
            "default": false
          },
          "enableInsights": {
            "title": "Extract insights",
            "type": "boolean",
            "description": "Entities (people, brands, products, places), timestamped quotes, questions covered, topics, sentiment, calls to action, links and promotions mentioned. $0.03 per video per 20-minute block (event `insights-extracted`).",
            "default": false
          },
          "translateTo": {
            "title": "Translate transcript to",
            "type": "string",
            "description": "ISO 639-1 code (`en`, `fr`, `es`, `de`, `pt`, `ja`…). Adds a full translation of the transcript text. $0.04 per 1,000 words of transcript, rounded up (event `translation-generated`)."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "YouTube blocks datacenter IP ranges: keep residential proxies (default). About 60 KB of proxy traffic per video.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "maxConcurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Videos processed in parallel, each on its own proxy session. Higher is faster; lower is gentler on rate limits.",
            "default": 5
          },
          "debugDumpRaw": {
            "title": "Debug: store raw responses",
            "type": "boolean",
            "description": "Saves raw YouTube responses in the key-value store (RAW-* records). For troubleshooting only.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}