{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript & Subtitles API — Channels, Search & SRT",
    "description": "Bulk YouTube transcript API: YouTube to text from videos, channels, playlists and search. Captions as text, timestamped segments, SRT/VTT or RAG chunks, with metadata and optional AI translation. Works as an MCP tool for AI agents. 99%+ success; you only pay for delivered transcripts.",
    "version": "0.1",
    "x-build-id": "JZPLYO9NZcExIzgOu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cazadores~youtube-transcript-bulk/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cazadores-youtube-transcript-bulk",
        "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/cazadores~youtube-transcript-bulk/runs": {
      "post": {
        "operationId": "runs-sync-cazadores-youtube-transcript-bulk",
        "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/cazadores~youtube-transcript-bulk/run-sync": {
      "post": {
        "operationId": "run-sync-cazadores-youtube-transcript-bulk",
        "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": "Video URLs or IDs",
            "type": "array",
            "description": "YouTube video URLs (watch, youtu.be, Shorts, live, embed) or 11-character video IDs.",
            "items": {
              "type": "string"
            }
          },
          "channels": {
            "title": "Channel URLs",
            "type": "array",
            "description": "Channel URLs (e.g. https://www.youtube.com/@handle). Transcripts of the channel's latest videos are extracted.",
            "items": {
              "type": "string"
            }
          },
          "playlists": {
            "title": "Playlist URLs",
            "type": "array",
            "description": "Playlist URLs. Transcripts of all videos in the playlist are extracted.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Search YouTube and extract transcripts of the top results (videos only). 'Max videos per source' applies to each query.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerSource": {
            "title": "Max videos per channel or playlist",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of videos taken from each channel or playlist. 0 = no limit.",
            "default": 50
          },
          "channelContentType": {
            "title": "Channel content",
            "enum": [
              "all",
              "videos",
              "shorts",
              "streams"
            ],
            "type": "string",
            "description": "Which uploads to take from channels.",
            "default": "all"
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Only process videos published on or after this date (YYYY-MM-DD). Older videos are skipped and not charged."
          },
          "languages": {
            "title": "Preferred languages",
            "type": "array",
            "description": "Transcript languages in order of preference (ISO codes like en, es, pt). The first available one is used.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "preferManual": {
            "title": "Prefer human-made captions",
            "type": "boolean",
            "description": "Use manually created captions when available instead of auto-generated ones.",
            "default": true
          },
          "translateTo": {
            "title": "Translate to",
            "type": "string",
            "description": "Optional language code (e.g. es). Uses YouTube's own captions in that language when they exist, otherwise YouTube auto-translation when available (best effort). If translation isn't possible, the original transcript is returned with a 'translationError' field.",
            "default": ""
          },
          "aiTranslation": {
            "title": "AI translation when YouTube can't translate",
            "type": "boolean",
            "description": "If YouTube has no captions or auto-translation in the requested language, translate the transcript with AI (timestamps preserved). Charged separately per 1,000 words translated; YouTube translations stay free.",
            "default": false
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "both",
              "text",
              "segments"
            ],
            "type": "string",
            "description": "text = full plain text, segments = timestamped segments, both = both.",
            "default": "both"
          },
          "chunkSeconds": {
            "title": "RAG chunk size (seconds)",
            "minimum": 0,
            "type": "integer",
            "description": "If greater than 0, adds a 'chunks' field grouping the transcript into blocks of this many seconds, ready for embeddings.",
            "default": 0
          },
          "subtitleFormats": {
            "title": "Subtitle files",
            "type": "array",
            "description": "Also return the transcript as ready-to-use subtitle files (fields 'srt' and 'vtt').",
            "items": {
              "type": "string",
              "enum": [
                "srt",
                "vtt"
              ],
              "enumTitles": [
                "SRT",
                "WebVTT"
              ]
            }
          },
          "includeMetadata": {
            "title": "Include video metadata",
            "type": "boolean",
            "description": "Adds title, channel, publish date, duration and view count.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Number of videos processed in parallel.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. The default (Apify residential) is included in the price and gives the best success rate; YouTube blocks most datacenter IPs.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "failIfSuccessRateBelow": {
            "title": "Fail run if success rate is below (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "For monitoring: mark the run as FAILED when fewer than this % of videos with captions succeed (0 = off).",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}