{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript API: Subtitles, SRT, Text, Markdown",
    "description": "Get YouTube transcripts from video, Shorts, channel or playlist URLs: timestamped segments, plain text, Markdown, SRT, metadata. No API key, no login. MCP-ready for Claude, Cursor, ChatGPT and AI agents. YouTube Data API alternative. Pay per result, errors are free: $0.80 per 1,000 videos.",
    "version": "0.1",
    "x-build-id": "8aOgvk8ICu9kcaR96"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/actose~youtube-transcripts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-actose-youtube-transcripts",
        "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/actose~youtube-transcripts/runs": {
      "post": {
        "operationId": "runs-sync-actose-youtube-transcripts",
        "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/actose~youtube-transcripts/run-sync": {
      "post": {
        "operationId": "run-sync-actose-youtube-transcripts",
        "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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "YouTube URLs",
            "type": "array",
            "description": "Video URLs (watch, youtu.be, Shorts, live, embed), bare 11-character video IDs, channel URLs (@handle, /channel/UC…, /c/…, /user/…) or playlist URLs (?list=…). Channels return their latest uploads.",
            "items": {
              "type": "string"
            }
          },
          "language": {
            "title": "Transcript language",
            "type": "string",
            "description": "Preferred language code (ISO 639-1, e.g. en, fr, de, es, pt, ja). Regional variants match too (en matches en-US, en-GB).",
            "default": "en"
          },
          "fallbackToAnyLanguage": {
            "title": "Fall back to any available language",
            "type": "boolean",
            "description": "If the video has no transcript in your language, return the original-language transcript instead of an error. The returned language is shown in the `language` field.",
            "default": true
          },
          "translateIfMissing": {
            "title": "Translate when the language is missing",
            "type": "boolean",
            "description": "If no transcript exists in your language, ask YouTube for its machine translation into that language (when available). Takes priority over the fallback above.",
            "default": false
          },
          "preferManualCaptions": {
            "title": "Prefer human-made captions",
            "type": "boolean",
            "description": "Use creator-uploaded subtitles when available, auto-generated captions otherwise. Disable to prefer auto-generated captions.",
            "default": true
          },
          "maxVideosPerChannelOrPlaylist": {
            "title": "Max videos per channel or playlist",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many videos to transcribe for each channel (latest uploads first) or playlist URL.",
            "default": 20
          },
          "includeTimestamps": {
            "title": "Include timestamped segments",
            "type": "boolean",
            "description": "Add the `segments` array (start, duration, end in seconds + text) to each item. The plain `text` field is always included.",
            "default": true
          },
          "includeMarkdown": {
            "title": "Add LLM-ready Markdown",
            "type": "boolean",
            "description": "Add a `markdown` field: title, channel, date and the transcript in ~1-minute paragraphs with [mm:ss] timestamps. Ready to paste into ChatGPT, Claude or a knowledge base.",
            "default": true
          },
          "ragChunkWords": {
            "title": "RAG chunk size (words)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "If above 0, add a `chunks` array: the transcript split into pieces of about this many words, each with start/end seconds and a timestamped YouTube link for citations. 0 = off. 200 to 500 suits most embedding models.",
            "default": 0
          },
          "onlyNew": {
            "title": "Only new videos (for scheduled runs)",
            "type": "boolean",
            "description": "Skip videos already transcribed by your previous runs of this actor in the same language (remembered in your key-value store named \"youtube-transcripts-state\"). Ideal with a schedule on a channel or playlist: you only pay for new uploads.",
            "default": false
          },
          "saveSrtFile": {
            "title": "Save SRT subtitle file",
            "type": "boolean",
            "description": "Store a ready-to-use .srt file per video in the key-value store and return its download link in `srtFileUrl`.",
            "default": true
          },
          "fetchPublishDate": {
            "title": "Fetch publish date and category",
            "type": "boolean",
            "description": "Adds `publishDate`, `uploadDate` and `category`. Costs one extra small request per video when needed.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Parallel videos",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many videos are processed at the same time. Lower it if you see many blocks in the log.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "YouTube limits requests from cloud servers. Apify datacenter proxy is used first (included).",
            "default": {
              "useApifyProxy": true
            }
          },
          "residentialFallback": {
            "title": "Residential proxy fallback",
            "type": "boolean",
            "description": "When YouTube blocks the datacenter IPs, retry the blocked video through residential proxy. No extra charge for you: the price per video stays the same.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}