{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript API & Scraper — YouTube Subtitles, Speech AI",
    "description": "YouTube videos, Shorts and live VODs to text: captions first, speech-to-text when a video has none (on by default; $0.008 per started minute, only when it runs). JSON, plain text, SRT or VTT. From $1.20 per 1,000 transcripts, no API key, no cookies. Never charged for a video we can't transcribe.",
    "version": "1.0",
    "x-build-id": "Zv8ZRtA3aOPIsNgfG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/steadyfetch~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-steadyfetch-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/steadyfetch~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-steadyfetch-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/steadyfetch~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-steadyfetch-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",
        "required": [
          "videoUrls"
        ],
        "properties": {
          "videoUrls": {
            "title": "Video URLs or IDs",
            "type": "array",
            "description": "YouTube video links (https://www.youtube.com/watch?v=…, https://youtu.be/…, /shorts/…, /live/…) or bare 11-character video IDs. Never charged for a video we cannot transcribe or one this account already has. Leave it untouched in the console and click Start for a one-video sample (youtube.com/watch?v=jNQXAC9IVRw), charged like any run. With a format, a language or a limit set below, that sample runs under your settings instead, plus one uncharged row naming what you set; either way it is charged at your plan’s per-transcript price. This is the one required field, so it needs a real value; every optional field below accepts null and reads it as “use the default”, so a template that leaves fields unset still runs.",
            "default": [
              "_demo"
            ],
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Dataset ID (chain a scraper run)",
            "type": "string",
            "description": "Paste the default dataset ID of a finished scraper run and every YouTube link in its rows is transcribed — no script, no copy-paste. With Apify’s \"Connect actor\" integration this is filled in for you, which is the cleanest way to schedule a chain. A link already in \"Video URLs or IDs\" is never transcribed twice, and a bare 11-character string in someone else’s row is never read as a video ID."
          },
          "datasetItems": {
            "title": "Dataset items (paste rows)",
            "type": "array",
            "description": "Paste rows from a scraper run instead of chaining by ID, and every YouTube link in them is transcribed. Works with any scraper’s output shape, including nested posts. Anything that is not a list of rows is ignored with one uncharged row saying so."
          },
          "language": {
            "title": "Preferred caption language",
            "type": "string",
            "description": "Two-letter language code (en, es, ja) or a regional code (pt-BR). If the video has no captions in that language, the video's own default caption track (its original language) is used instead, and the row tells you which language you got."
          },
          "format": {
            "title": "Output format",
            "type": "string",
            "description": "json keeps timestamped segments, text returns the transcript only, srt and vtt add a ready-to-download subtitle string on the row. Leave it out, or send null, to get json. Anything else is not recognised: nothing is transcribed, nothing is charged, and one row names the formats that exist.",
            "default": "json"
          },
          "enableSpeechFallback": {
            "title": "Use speech-to-text when a video has no captions",
            "type": "boolean",
            "description": "On: caption-less videos are transcribed with speech-to-text, which charges speech-to-text minutes on top of the transcript. Off: caption-less videos come back as uncharged rows and you never pay a speech-to-text minute.",
            "default": true
          },
          "maxSpeechMinutes": {
            "title": "Max speech-to-text minutes",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on speech-to-text minutes for the whole run. Videos that would go past it are skipped as uncharged rows naming this limit. 0 means no speech-to-text at all. Ask for more than this actor allows in one run and the run still starts: it continues at the actor's own ceiling of 100,000 minutes, with one uncharged row saying what was asked and what bound it.",
            "default": 60
          },
          "maxItems": {
            "title": "Max videos",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on how many videos this run processes. Ask for more than this actor serves in one run and the run still starts: it continues at the actor's own ceiling of 5,000 videos, with one uncharged row saying what was asked and what bound it.",
            "default": 100
          },
          "newItemsOnly": {
            "title": "New items only",
            "type": "boolean",
            "description": "Turn this ON for a scheduled run and it delivers only videos this account has never had — the rest are left out of the dataset entirely, so your Sheet, webhook or database gets one row per new video and nothing to de-duplicate. OFF (default): every video runs as usual; one your account already has comes back from the earlier run, not charged (`repeat: true`), so a re-run of the same list is a complete archive that only pays for what is new. Either way a repeat costs nothing, and the run’s status line says how many were skipped. Only a video this actor actually delivered a transcript for counts; one it could not reach does not, so the next run tries it again.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}