{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper - Subtitles, Captions & Channels",
    "description": "Extract YouTube transcripts, subtitles & captions in bulk — from video URLs, entire channels, playlists, or search. Timestamped segments, SRT/VTT, auto + manual captions, translation to 100+ languages, rich video metadata, and monitoring for new uploads. No login, no API key, no browser.",
    "version": "0.1",
    "x-build-id": "UMS0wJEiSTLM3ph9j"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-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/scrapesage~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-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/scrapesage~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-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 or IDs",
            "type": "array",
            "description": "YouTube video URLs or 11-character video IDs. All formats work: watch URLs, youtu.be, Shorts, embeds, live URLs.",
            "items": {
              "type": "string"
            }
          },
          "channelUrls": {
            "title": "Channel URLs or @handles",
            "type": "array",
            "description": "Channels to expand into their latest videos — @handle, full URL, or UC… channel ID. Combine with Monitor mode to transcribe only newly uploaded videos on a schedule.",
            "items": {
              "type": "string"
            }
          },
          "playlistUrls": {
            "title": "Playlist URLs or IDs",
            "type": "array",
            "description": "Playlists to expand into videos (playlist URL or PL…/UU… ID).",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "YouTube search keywords — each query is expanded into its top result videos.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs (auto-detected)",
            "type": "array",
            "description": "Paste any YouTube URLs — video, Shorts, playlist, channel, or search-results pages are detected automatically.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchSort": {
            "title": "Search sort order",
            "enum": [
              "relevance",
              "date",
              "views",
              "rating"
            ],
            "type": "string",
            "description": "How search-query results are ordered before taking the top videos.",
            "default": "relevance"
          },
          "language": {
            "title": "Preferred transcript language",
            "type": "string",
            "description": "ISO language code (en, es, de, fr, pt, hi, ja, ko, zh…). The scraper picks a human-written track in this language first, then auto-generated captions (see fallbacks below).",
            "default": "en"
          },
          "fallbackToAutoCaptions": {
            "title": "Fall back to auto-generated captions",
            "type": "boolean",
            "description": "When no human-written track exists in the preferred language, use YouTube's auto-generated (ASR) captions.",
            "default": true
          },
          "fallbackToAnyLanguage": {
            "title": "Fall back to any available language",
            "type": "boolean",
            "description": "When nothing exists in the preferred language at all, take the video's default/original caption track instead of skipping the video.",
            "default": true
          },
          "translateTo": {
            "title": "Translate transcripts to",
            "type": "string",
            "description": "Optional ISO language code — uses YouTube's own caption translation (100+ languages, e.g. en, es, fr, de, pt, ar, hi, ja). Leave empty for the original language."
          },
          "includeSegments": {
            "title": "Include timestamped segments",
            "type": "boolean",
            "description": "Include the segments array ({ start, dur, end, text } in seconds) alongside the plain-text transcript.",
            "default": true
          },
          "includeSrt": {
            "title": "Include SRT subtitle file content",
            "type": "boolean",
            "description": "Add an srt field with ready-to-save SubRip subtitles.",
            "default": false
          },
          "includeVtt": {
            "title": "Include WebVTT subtitle file content",
            "type": "boolean",
            "description": "Add a vtt field with ready-to-save WebVTT subtitles.",
            "default": false
          },
          "includeVideoMetadata": {
            "title": "Include rich video metadata",
            "type": "boolean",
            "description": "Title, channel, views, likes, publish date, duration, category, keywords and chapters on every record (no extra requests — it comes from the same page).",
            "default": true
          },
          "monitorMode": {
            "title": "Monitor mode (only new videos)",
            "type": "boolean",
            "description": "Remember every video already delivered and emit only videos not seen in previous runs. Combine with an Apify Schedule on channel/playlist/search inputs to get transcripts of new uploads only — the schedule triggers the runs, monitor mode deduplicates across them.",
            "default": false
          },
          "maxResults": {
            "title": "Max results (total)",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many records in total. 0 = no limit (opt-in; mind the run timeout on huge sweeps).",
            "default": 25
          },
          "maxVideosPerSource": {
            "title": "Max videos per channel/playlist/search",
            "minimum": 0,
            "type": "integer",
            "description": "Per-source expansion cap so one huge channel can't crowd out the others. 0 = use the global limit.",
            "default": 25
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxies strongly recommended — YouTube limits caption downloads from datacenter IPs.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}