{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper — RAG-Ready",
    "description": "Turn YouTube into RAG-ready transcripts: chapter-grouped, chunk-ready paragraphs for LLM and search pipelines. Re-runs skip already-delivered videos to keep a corpus fresh, and failed videos are never billed. Accepts mixed video, playlist, and channel URLs. Unofficial; public data only.",
    "version": "0.1",
    "x-build-id": "J2h7yDCASIZJothNT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vonsensey~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vonsensey-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/vonsensey~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-vonsensey-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/vonsensey~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-vonsensey-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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "Video, playlist, or channel URLs",
            "type": "array",
            "description": "Mixed list of YouTube URLs. Individual videos, playlists, channels, and @handles are all accepted — each playlist or channel URL is expanded into its videos automatically.",
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "title": "Preferred languages",
            "type": "array",
            "description": "Ordered language preference for the transcript. BCP-47 tags or prefixes are accepted (e.g. \"en\" matches en, en-US, en-GB; \"pt-BR\" matches only Brazilian Portuguese). The first available match wins. Leave empty to take the video's default caption track.",
            "items": {
              "type": "string"
            }
          },
          "allLanguages": {
            "title": "All languages",
            "type": "boolean",
            "description": "Return every available caption track instead of just the best language match. Warning: this returns one dataset item per caption track, and each track is billed as one transcript.",
            "default": false
          },
          "includeShorts": {
            "title": "Include Shorts",
            "type": "boolean",
            "description": "When expanding channel URLs, also include Shorts. By default channel expansion covers long-form uploads only.",
            "default": false
          },
          "maxVideosPerSource": {
            "title": "Max videos per source",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of videos to take from each playlist or channel URL, applied per source URL independently. Direct video URLs are not affected.",
            "default": 100
          },
          "includeChapters": {
            "title": "Include chapters",
            "type": "boolean",
            "description": "Extract chapter markers and upload date for each video. Disabling this saves one request per video and leaves uploadDate null.",
            "default": true
          },
          "formats": {
            "title": "Extra transcript formats",
            "type": "array",
            "description": "Additional rendered formats to include on each dataset item. Structured JSON segments are always included.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "srt",
                "vtt"
              ],
              "enumTitles": [
                "Plain text",
                "SRT subtitles",
                "WebVTT subtitles"
              ]
            },
            "default": []
          },
          "onlyNewVideos": {
            "title": "Only new videos",
            "type": "boolean",
            "description": "Skip videos already delivered by previous runs sharing the same state label. Useful for scheduled re-runs that should only pick up new uploads.",
            "default": false
          },
          "stateLabel": {
            "title": "State label",
            "type": "string",
            "description": "Names the persistent delivered-state store used by \"Only new videos\". Runs sharing a label share the same delivered-video memory.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings for YouTube requests. Residential is the default because YouTube blocks most datacenter IPs for caption fetching (measured ~21% success on datacenter vs ~95% on residential). Keep residential unless you have your own proxy URLs.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "spikeConfig": {
            "title": "Spike configuration",
            "type": "object",
            "description": "Internal: proxy-economics spike configuration. Leave empty."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}