{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper",
    "description": "YouTube Transcript Scraper: get transcripts of up to 10 YouTube videos or Shorts per run, in any language, as text, timestamped text, SRT or VTT. $0.02 each.",
    "version": "0.1",
    "x-build-id": "bUNfkqhIU0qO2ngNB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ecommerce_leads~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ecommerce_leads-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/ecommerce_leads~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ecommerce_leads-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/ecommerce_leads~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ecommerce_leads-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": [
          "videoIds"
        ],
        "properties": {
          "videoIds": {
            "title": "Video URLs or IDs (max 10)",
            "maxItems": 10,
            "type": "array",
            "description": "<b>Up to 10 videos per run.</b> Defaults to Rick Astley's \"Never Gonna Give You Up\" if left out. The videos to get transcripts for, one per line. Need more? Start another run, or call the API once per batch of 10.<br><br>Any YouTube link works: <code>watch?v=</code>, <code>youtu.be/</code>, <code>/shorts/</code>, <code>/live/</code> or <code>/embed/</code>. The 11-character video ID on its own works too. Extra URL parameters such as <code>&amp;t=30s</code> or <code>&amp;list=</code> are ignored, and a video listed twice is fetched and charged only once.<br><br><b>API example:</b> <code>\"videoIds\": [\"dQw4w9WgXcQ\", \"https://youtu.be/jNQXAC9IVRw\", \"https://www.youtube.com/shorts/tPEE9ZwTmy0\"]</code>",
            "default": [
              "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
            ],
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "title": "Transcript language(s)",
            "type": "array",
            "description": "The languages you want, in order of preference, as ISO language codes such as <code>en</code>, <code>es</code>, <code>de</code>, <code>fr</code>, <code>pt-BR</code> or <code>ja</code>. For each video the actor goes down your list and uses the first language the video has.<br><br>Regional variants match each other: <code>en</code> finds <code>en-GB</code> or <code>en-US</code>, and <code>pt-BR</code> finds <code>pt</code>. An exact code match is always tried first.<br><br><b>Default:</b> <code>[\"en\"]</code><br><b>API example:</b> <code>\"languages\": [\"es\", \"en\"]</code> means Spanish if the video has it, otherwise English.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "includeAutoGenerated": {
            "title": "Use auto-generated captions",
            "type": "boolean",
            "description": "YouTube has two kinds of captions: ones the creator uploaded, and ones YouTube makes with speech recognition (\"auto-generated\"). For each language, creator captions are always preferred.<br><br><b>true</b> (default): if a language has only auto-generated captions, use them. Most videos have only these, so leave this on unless you need human-written text.<br><b>false</b>: use creator-uploaded captions only. Videos without them are skipped and not charged.<br><br><b>API example:</b> <code>\"includeAutoGenerated\": false</code>",
            "default": true
          },
          "fallbackToAnyLanguage": {
            "title": "Fall back to any language",
            "type": "boolean",
            "description": "What to do when a video has none of your <code>languages</code>.<br><br><b>true</b> (default): return the transcript in a language the video does have. Check the <code>language</code> field of each result to see which one you got.<br><b>false</b>: skip the video. Nothing is stored and you are not charged. The run log lists the languages the video had.<br><br><b>API example:</b> <code>\"fallbackToAnyLanguage\": false</code> to get only the languages you asked for.",
            "default": true
          },
          "outputFormat": {
            "title": "Transcript format",
            "enum": [
              "segments",
              "text",
              "timestamped",
              "srt",
              "vtt"
            ],
            "type": "string",
            "description": "How each transcript is written.<br><br><b>segments</b> (default): <code>transcript</code> is plain text, and a separate <code>segments</code> field lists every caption line with its time, eg <code>{\"start\": 18.64, \"duration\": 3.24, \"text\": \"We're no strangers to love\"}</code>. In the results, open the <b>Timed segments</b> tab to see one row per line.<br><b>text</b>: the whole transcript as one paragraph, no times. Good for AI, search and word counts.<br><b>timestamped</b>: one line per caption with its time, eg <code>[0:18] We're no strangers to love</code>.<br><b>srt</b>: a complete SRT subtitle file, ready to save as <code>.srt</code>.<br><b>vtt</b>: a complete WebVTT subtitle file, ready to save as <code>.vtt</code>.<br><br><b>API example:</b> <code>\"outputFormat\": \"timestamped\"</code>",
            "default": "segments"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}