{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper – Download Subtitles & Captions",
    "description": "Extract transcripts, captions & subtitles from YouTube videos, channels or playlists — no API key. Timestamped or plain text, SRT/VTT export, 156-language translation, plus full video & channel metadata. Built for AI summaries, ChatGPT & research. Pay only for transcripts returned.",
    "version": "0.0",
    "x-build-id": "FeeD6oFS60T94M3LA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/harshmaur~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-harshmaur-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/harshmaur~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-harshmaur-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/harshmaur~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-harshmaur-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": "Individual YouTube videos. Accepts watch links (youtube.com/watch?v=…), youtu.be/… short links, and Shorts links. One transcript per video.",
            "items": {
              "type": "string"
            }
          },
          "channelUrls": {
            "title": "📺 Channels / @handles",
            "type": "array",
            "description": "Whole channels. Accepts @handles (e.g. @mkbhd), channel URLs (youtube.com/@handle, /channel/UC…, /c/Name). Fetches the channel's most recent videos — up to 'Max videos' below.",
            "items": {
              "type": "string"
            }
          },
          "playlistUrls": {
            "title": "🎵 Playlists",
            "type": "array",
            "description": "Playlist links (youtube.com/playlist?list=…). Fetches each playlist's videos — up to 'Max videos' below.",
            "items": {
              "type": "string"
            }
          },
          "maxVideos": {
            "title": "#️⃣ Max videos per channel / playlist",
            "minimum": 1,
            "type": "integer",
            "description": "How many videos to fetch from EACH channel or playlist. Does NOT affect the Video URLs above (those are always fetched). Default 50.",
            "default": 50
          },
          "dateFrom": {
            "title": "📅 Published after",
            "type": "string",
            "description": "Only fetch channel/playlist videos published on or after this date. Leave empty for no lower bound."
          },
          "dateTo": {
            "title": "📅 Published before",
            "type": "string",
            "description": "Only fetch channel/playlist videos published on or before this date. Leave empty for no upper bound."
          },
          "language": {
            "title": "🌐 Transcript language",
            "type": "string",
            "description": "ISO 639-1 code (e.g. en, es, hi, ja, fr). If the video has captions in this language we use them; otherwise YouTube auto-translates the transcript into it (156 languages supported). Leave empty for the video's original language."
          },
          "transcriptFormat": {
            "title": "📝 Transcript format",
            "enum": [
              "both",
              "segments",
              "text",
              "srt",
              "vtt"
            ],
            "type": "string",
            "description": "Shape of the transcript in each result. 'Both' gives the timestamped array AND joined plain text. SRT/VTT return a ready-to-use subtitle file string.",
            "default": "both"
          },
          "mcpConnector": {
            "title": "Send results to an app (MCP connector)",
            "type": "string",
            "description": "Pick an authorized MCP connector (Slack, Notion, Airtable, Google Sheets, …) to receive the transcripts. Your credentials stay in Apify and are never exposed to this actor (Apify's proxy injects them). Leave empty to scrape only. Tip: schedule this on a channel to auto-capture every new video's transcript into your workspace."
          },
          "mcpMode": {
            "title": "Delivery mode",
            "enum": [
              "perPost",
              "summary"
            ],
            "type": "string",
            "description": "perPost: one message/record per video transcript. summary: a single digest of the whole run.",
            "default": "perPost"
          },
          "mcpTarget": {
            "title": "Target page / database / channel",
            "type": "string",
            "description": "Where to write — the destination ID the tool needs: a Notion database/page ID, a Google Sheet ID, or a Slack channel. Leave blank for connectors that post to a default location. Advanced shapes go in Arguments JSON below."
          },
          "mcpMessage": {
            "title": "Message template",
            "type": "string",
            "description": "Template for each message. Use {{field}} placeholders from ANY transcript field — common ones: {{title}}, {{channelName}}, {{url}}, {{publishedAt}}, {{viewCount}}, {{language}}, {{transcriptText}}, {{transcriptSnippet}} (first 280 chars). Missing fields render empty.",
            "default": "*{{title}}* — {{channelName}}\n{{url}}"
          },
          "mcpTool": {
            "title": "Tool override (advanced)",
            "type": "string",
            "description": "Force a specific tool name on the connector (e.g. send_message, create_page, append_row). Leave empty to auto-detect the connector's write/notify tool."
          },
          "mcpArguments": {
            "title": "Tool arguments override (advanced)",
            "type": "object",
            "description": "Extra/override arguments merged into each tool call as JSON — e.g. {\"channel\": \"#yt-transcripts\"} for Slack. {{field}} placeholders work inside string values too, so you can nest live data into any shape — e.g. Notion: {\"properties\": {\"Title\": {\"title\": [{\"text\": {\"content\": \"{{title}}\"}}]}, \"Link\": {\"url\": \"{{url}}\"}}}."
          },
          "mcpMaxItems": {
            "title": "Max transcripts to send",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Safety cap on how many transcripts are piped to the connector per run (perPost mode). Protects against flooding the destination.",
            "default": 50
          },
          "mcpServerUrl": {
            "title": "MCP server URL (dev / diagnostic)",
            "type": "string",
            "description": "Advanced/testing only. Connect directly to a raw MCP server URL, bypassing the connector above. For real use prefer a connector — your credentials then stay in Apify. When set, this overrides the connector."
          },
          "mcpServerToken": {
            "title": "MCP server token (dev / diagnostic)",
            "type": "string",
            "description": "Bearer token for the dev MCP server URL above. A token entered here IS visible to the actor at runtime — for production use an MCP Connector instead. Ignored unless the URL is set."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}