{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper",
    "description": "Extract YouTube transcripts with millisecond timestamps. Give it a video, a channel, a playlist or a search keyword and get raw caption segments plus merged paragraphs, ready for RAG, search and analysis. Incremental mode skips videos you already have, so a scheduled run does not bill you twice.",
    "version": "0.1",
    "x-build-id": "h8jca49PnKsCap6uz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/garnet_puppet~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-garnet_puppet-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/garnet_puppet~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-garnet_puppet-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/garnet_puppet~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-garnet_puppet-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",
        "properties": {
          "urls": {
            "title": "YouTube URLs",
            "type": "array",
            "description": "Any mix of YouTube links. Video and Shorts links are scraped directly; channel and playlist links are expanded into their videos automatically.",
            "items": {
              "type": "string"
            }
          },
          "searchKeywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Search YouTube for each keyword and scrape transcripts from the top results. No video URL needed.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "previewOnly": {
            "title": "Preview only (no transcript charges)",
            "type": "boolean",
            "description": "List which videos would be scraped and how many would be charged, without fetching any transcript. Only the actor start event is billed; no transcript charges are made.",
            "default": false
          },
          "outputFormat": {
            "title": "Transcript format",
            "enum": [
              "json",
              "text",
              "srt",
              "vtt"
            ],
            "type": "string",
            "description": "Adds a ready-to-use transcript string to each record. Timestamps, segments and paragraphs are always included as well.",
            "default": "json"
          },
          "scrapeShorts": {
            "title": "Include Shorts",
            "type": "boolean",
            "description": "When expanding a channel, also include Shorts, added after regular videos. Max videos per source applies to the combined list, so a low limit may leave no room for Shorts. Shorts links given directly are always scraped.",
            "default": false
          },
          "chunkBy": {
            "title": "Paragraph boundaries",
            "enum": [
              "time",
              "chapter"
            ],
            "type": "string",
            "description": "Chapter mode splits paragraphs on the video's own chapters when it has them, and falls back to fixed length otherwise.",
            "default": "time"
          },
          "maxVideosPerSource": {
            "title": "Max videos per source",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Upper limit of videos taken from each channel, playlist or search. Defaults to 30."
          },
          "maxPagesPerSource": {
            "title": "Max pages per source",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many result pages to fetch from each channel, playlist or search.",
            "default": 10
          },
          "videoUrls": {
            "title": "Video URLs",
            "type": "array",
            "description": "Deprecated: use the \"YouTube URLs\" field instead. Still accepted so existing runs keep working. YouTube video links or IDs. Leave empty to use the example videos.",
            "items": {
              "type": "string"
            }
          },
          "channelUrls": {
            "title": "Channel URLs",
            "type": "array",
            "description": "Deprecated: use the \"YouTube URLs\" field instead. Still accepted so existing runs keep working. Channel links. Both forms work: https://www.youtube.com/@handle and https://www.youtube.com/channel/UC... The most recent videos are processed.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "title": "Preferred languages",
            "type": "array",
            "description": "Language codes in order of preference, for example en, de, tr. Falls back to the first available track.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "translateTo": {
            "title": "Translate transcript to",
            "type": "string",
            "description": "Language code to translate the transcript into, for example es or de. Uses YouTube's own translation, so no extra cost. If a video does not offer that language, the original transcript is returned and a warning lists what it does offer."
          },
          "preferManual": {
            "title": "Prefer human-written captions",
            "type": "boolean",
            "description": "Human-written captions are cleaner than auto-generated ones. Turn off to accept whichever comes first.",
            "default": true
          },
          "includeTranscript": {
            "title": "Include transcript",
            "type": "boolean",
            "description": "Turn off to fetch only title, channel and thumbnail at the lower metadata price.",
            "default": true
          },
          "chunkSeconds": {
            "title": "Paragraph length (seconds)",
            "minimum": 5,
            "maximum": 600,
            "type": "integer",
            "description": "Target length of each merged paragraph. Raw segments are always returned as well.",
            "default": 40
          },
          "maxVideosPerChannel": {
            "title": "Max videos per channel",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Deprecated: use the \"Max videos per source\" field instead. Still accepted so existing runs keep working. Upper limit of videos taken from each channel. Defaults to 30."
          },
          "incremental": {
            "title": "Incremental mode",
            "type": "boolean",
            "description": "Skip videos already fetched with a transcript in a previous run. Keeps scheduled runs cheap. Metadata-only runs (Include transcript off) are not recorded this way and are charged again every time.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}