{
  "openapi": "3.0.1",
  "info": {
    "title": "Free YouTube Transcript API - Subtitles, AI Translation & Audio",
    "description": "YouTube transcripts and subtitles in bulk, even when YouTube says no: AI translation when YouTube refuses, audio transcription for videos without captions. Timestamps, SRT, VTT. Callable from AI agents via Apify MCP.",
    "version": "0.2",
    "x-build-id": "mN2Q0lIMAUyGpzpRU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/luisbendeckdev~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-luisbendeckdev-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/luisbendeckdev~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-luisbendeckdev-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/luisbendeckdev~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-luisbendeckdev-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": [
          "videos"
        ],
        "properties": {
          "videos": {
            "title": "Videos, playlists or channels",
            "type": "array",
            "description": "YouTube links or 11-character video IDs. Watch, youtu.be, Shorts, embed and live links all work. Playlist links (youtube.com/playlist?list=...) and channel links (youtube.com/@name, /channel/UC...) are expanded into their videos, newest first.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerSource": {
            "title": "Max videos per playlist or channel",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many videos to take from each playlist or channel link. Listing videos is free; you pay only for transcripts delivered.",
            "default": 50
          },
          "languages": {
            "title": "Preferred languages",
            "type": "array",
            "description": "Language codes in order of preference, such as en, es or pt-BR. Leave empty to get the video's own language.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "translate": {
            "title": "Translate if the language is missing",
            "type": "boolean",
            "description": "If the video has no transcript in your first preferred language, translate one into it. We try YouTube's own translation first (included in the price). If YouTube refuses, we translate the original transcript with an AI model and keep every timestamp (paid Apify plans only). If translation is impossible, you get the original transcript free of charge, marked with translationStatus. If off, the video is reported as an error instead.",
            "default": true
          },
          "audioFallback": {
            "title": "Transcribe audio when there are no captions",
            "type": "boolean",
            "description": "Many videos have no captions at all. With this on, we download the audio and transcribe it with Whisper (large-v3-turbo), with timestamps, then translate it if you asked for another language. Paid Apify plans only (free of our charges during launch; see Pricing). Videos with captions never use this.",
            "default": true
          },
          "audioOverAutoCaptions": {
            "title": "Transcribe the audio even when YouTube has automatic captions",
            "type": "boolean",
            "description": "YouTube's automatic captions can be poor (fast speech, music, older videos). With this on, videos that only have automatic captions are transcribed from the audio with Whisper instead. Costs audio minutes (see Pricing). Paid Apify plans only.",
            "default": false
          },
          "skipYouTubeTranslation": {
            "title": "Always use AI translation, not YouTube's",
            "type": "boolean",
            "description": "YouTube's machine translation of automatic captions can be hard to understand. With this on, we translate with AI line by line and keep every timestamp. Paid Apify plans only.",
            "default": false
          },
          "maxAudioMinutes": {
            "title": "Max audio minutes per video",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Videos without captions that are longer than this are skipped (free of charge) instead of transcribed from audio, so a long video never surprises you on the bill.",
            "default": 60
          },
          "preferManualCaptions": {
            "title": "Prefer human-made captions",
            "type": "boolean",
            "description": "Use creator-uploaded captions over YouTube's automatic ones when both exist in the same language.",
            "default": true
          },
          "includeText": {
            "title": "Plain text",
            "type": "boolean",
            "description": "The full transcript as one block of text. Best for AI, summaries and search.",
            "default": true
          },
          "includeTimestampedText": {
            "title": "Text with timestamps",
            "type": "boolean",
            "description": "Text with a [mm:ss] marker about every 30 seconds. Good for citing moments in a video.",
            "default": false
          },
          "includeSegments": {
            "title": "Timed segments",
            "type": "boolean",
            "description": "A list of caption lines, each with start time and duration in seconds.",
            "default": true
          },
          "includeSrt": {
            "title": "SRT subtitles",
            "type": "boolean",
            "description": "A ready-to-use .srt subtitle file as text.",
            "default": false
          },
          "includeVtt": {
            "title": "Include WebVTT subtitles",
            "type": "boolean",
            "description": "Add a `vtt` field with WebVTT subtitles, ready for HTML5 players and video editors.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max parallel videos",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many videos to fetch at the same time.",
            "default": 5
          },
          "maxRetries": {
            "title": "Retries per video",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many times to retry a video with a fresh IP when YouTube blocks a request.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "YouTube blocks most datacenter IPs, so residential proxies are recommended.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}