{
  "openapi": "3.0.1",
  "info": {
    "title": "Youtube Transcript Scraper",
    "version": "0.0",
    "x-build-id": "Psi4urtSl2weUX2pC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/excellent_mustang~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-excellent_mustang-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/excellent_mustang~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-excellent_mustang-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/excellent_mustang~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-excellent_mustang-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": {
          "videos": {
            "title": "Videos, playlists, channels or searches",
            "minItems": 1,
            "maxItems": 1000,
            "uniqueItems": true,
            "type": "array",
            "description": "One entry per source. Accepts video URLs (watch, youtu.be, /shorts/, /embed/, /live/), bare 11-character video IDs, playlist URLs or IDs, channel URLs, @handles, and search queries written as \"search:your query\". Playlists, channels and searches are expanded into their videos automatically.",
            "default": [
              "https://www.youtube.com/watch?v=jNQXAC9IVRw"
            ],
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "title": "Preferred languages",
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "Language codes in priority order, e.g. en, en-GB, es, de. The first available match wins. Use the fallback option below to decide what happens when none of them exist.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "preferManualCaptions": {
            "title": "Prefer human-written captions",
            "type": "boolean",
            "description": "When a language has both a human-written and an auto-generated track, take the human-written one. It is markedly more accurate, especially for punctuation and proper nouns.",
            "default": true
          },
          "allowAutoGenerated": {
            "title": "Allow auto-generated captions",
            "type": "boolean",
            "description": "Fall back to YouTube's automatic speech recognition when no human-written track exists. Turn this off to accept only human-written captions.",
            "default": true
          },
          "anyLanguageFallback": {
            "title": "Fall back to any available language",
            "type": "boolean",
            "description": "If none of your preferred languages exist, return whatever track the video does have rather than reporting a failure.",
            "default": true
          },
          "includeSegments": {
            "title": "Include timestamped segments",
            "type": "boolean",
            "description": "Add the segments array, each entry carrying start, duration, end and text. Turn off for a smaller dataset when you only need the plain text.",
            "default": true
          },
          "includeTimestampedText": {
            "title": "Include timestamped plain text",
            "type": "boolean",
            "description": "Add a single string with a [mm:ss] marker before each line. Convenient for pasting into an LLM prompt.",
            "default": false
          },
          "includeSrt": {
            "title": "Include SRT subtitles",
            "type": "boolean",
            "description": "Add a ready-to-use .srt subtitle string.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum transcripts",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Total number of videos to process in this run.",
            "default": 1000
          },
          "maxVideosPerSource": {
            "title": "Maximum videos per playlist/channel/search",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap how many videos are taken from any single playlist, channel or search query, so one large channel cannot consume the whole run.",
            "default": 200
          },
          "includeShorts": {
            "title": "Include Shorts from channels",
            "type": "boolean",
            "description": "Also pull a channel's Shorts tab, not just its long-form Videos tab.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Parallel video requests. The default of 5 is deliberately conservative: YouTube rate-limits aggressively, and a slower run that succeeds beats a fast one that gets throttled.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Defaults to Apify Proxy with the RESIDENTIAL group, because YouTube returns 'Sign in to confirm you're not a bot' to the datacenter IPs that Apify runs on. Residential bandwidth is billed to your Apify account (about $8/GB; this Actor uses roughly 40 KB per video, so about $0.30 per 1,000 videos). You can switch to datacenter proxy or no proxy, but expect most videos to come back with status IP_BLOCKED.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}