{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript API & MCP Server",
    "description": "Low-cost YouTube transcript API for MCP tools: videos, Shorts, playlists, and channels with no YouTube API key. $0.0009 per successful transcript; failures are free.",
    "version": "0.1",
    "x-build-id": "i7zUWxOHlkUECI9A3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lexxer~transcriptpack-youtube-transcripts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lexxer-transcriptpack-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/lexxer~transcriptpack-youtube-transcripts/runs": {
      "post": {
        "operationId": "runs-sync-lexxer-transcriptpack-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/lexxer~transcriptpack-youtube-transcripts/run-sync": {
      "post": {
        "operationId": "run-sync-lexxer-transcriptpack-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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "YouTube sources",
            "type": "array",
            "description": "Public video, Shorts, playlist, or channel URLs. Raw 11-character video IDs are also accepted through the API.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "languages": {
            "title": "Preferred transcript languages",
            "type": "array",
            "description": "Language codes in priority order, for example en, de, or en-US.",
            "items": {
              "type": "string",
              "minLength": 2,
              "maxLength": 16
            },
            "default": [
              "en"
            ]
          },
          "translateTo": {
            "title": "Translate transcript to",
            "type": "string",
            "description": "Optional YouTube translation language code. Translation only works when the chosen caption track supports it."
          },
          "formats": {
            "title": "Output formats",
            "type": "array",
            "description": "Choose only what you need to keep dataset rows compact.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "segments",
                "paragraphs",
                "chunks",
                "markdown",
                "srt",
                "vtt"
              ],
              "enumTitles": [
                "Plain text",
                "Timestamped segments",
                "Readable paragraphs",
                "AI-ready chunks",
                "Markdown",
                "SRT captions",
                "WebVTT captions"
              ]
            },
            "default": [
              "text",
              "chunks",
              "markdown"
            ]
          },
          "includeMetadata": {
            "title": "Include video metadata",
            "type": "boolean",
            "description": "Add the title, channel, channel URL, and thumbnail when YouTube provides them.",
            "default": true
          },
          "maxVideos": {
            "title": "Maximum videos",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Safety limit across all supplied sources.",
            "default": 25
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Keep this low to reduce YouTube blocking risk. The default is intentionally conservative.",
            "default": 3
          },
          "chunkSizeCharacters": {
            "title": "Chunk size in characters",
            "minimum": 500,
            "maximum": 30000,
            "type": "integer",
            "description": "Approximate maximum chunk length. This is deterministic character-based chunking, not model-specific token counting.",
            "default": 6000
          },
          "chunkOverlapCharacters": {
            "title": "Chunk overlap in characters",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Approximate context repeated between neighboring chunks. Must be smaller than chunk size.",
            "default": 300
          },
          "preserveFormatting": {
            "title": "Preserve supported caption formatting",
            "type": "boolean",
            "description": "Retain supported basic caption formatting where available.",
            "default": false
          },
          "proxyMode": {
            "title": "Proxy strategy",
            "enum": [
              "residential-fallback",
              "residential",
              "direct"
            ],
            "type": "string",
            "description": "Residential proxy use is enforced only for customer-paid Standby PPE. Fallback tries direct access first to reduce the customer's proxy bill.",
            "default": "residential-fallback"
          },
          "proxyCountryCode": {
            "title": "Residential proxy country",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Optional two-letter country code such as US, DE, or AT. Leave empty for Apify's default residential pool."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}