{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper: Captions, Subtitles & Timestamps",
    "description": "Get YouTube transcripts as text plus timestamped segments from video links, keyword searches or a channel's latest videos. Caption language, title and channel on every row. Videos without captions are never charged. Pay per transcript.",
    "version": "1.0",
    "x-build-id": "gzoiceJmVqSOqFcHB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vncntlabs~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vncntlabs-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/vncntlabs~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-vncntlabs-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/vncntlabs~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-vncntlabs-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": {
          "videos": {
            "title": "YouTube video links or IDs",
            "type": "array",
            "description": "Watch, youtu.be, Shorts, embed or live links, or bare 11-character video IDs. One transcript row per video.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Or search YouTube for keywords",
            "type": "array",
            "description": "Get transcripts of the top YouTube search results for each keyword (up to 20 keywords).",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerKeyword": {
            "title": "Videos per keyword",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many top search results to transcribe for each keyword.",
            "default": 10
          },
          "excludeShorts": {
            "title": "Skip Shorts in search results",
            "type": "boolean",
            "description": "Leave YouTube Shorts out of keyword and channel results (they often have little speech).",
            "default": false
          },
          "channels": {
            "title": "Or get a channel's latest videos",
            "type": "array",
            "description": "YouTube channels as @handle, channel link (youtube.com/@name or /channel/UC...) or UC... channel ID (up to 10). Videos are found through YouTube search for the channel, newest first, so very large or very old back catalogs may not be complete. One row per channel shows how many videos were found.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerChannel": {
            "title": "Videos per channel",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many of each channel's videos to transcribe.",
            "default": 20
          },
          "channelSort": {
            "title": "Channel videos order",
            "enum": [
              "newest",
              "relevance"
            ],
            "type": "string",
            "description": "Which of the channel's videos to take first.",
            "default": "newest"
          },
          "language": {
            "title": "Caption language",
            "pattern": "^([a-z]{2,3}(-[A-Za-z]{2,4})?)?$",
            "type": "string",
            "description": "Language code of the caption track you want, e.g. en, es, de, pt. Leave empty for the video's own language. If the video has no captions in that language you get a no_captions row (not charged)."
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Country for keyword searches (and the YouTube region captions are read from). Name or 2-letter code, e.g. United States, GB, Germany.",
            "default": "United States"
          },
          "includeSegments": {
            "title": "Include timestamped segments",
            "type": "boolean",
            "description": "Add every caption line with start, duration and end (seconds).",
            "default": true
          },
          "includeTimestampedText": {
            "title": "Include [mm:ss] transcript text",
            "type": "boolean",
            "description": "Add one text field with a [mm:ss] timestamp before every line, ready for notes or AI prompts.",
            "default": false
          },
          "fastMode": {
            "title": "Fast mode",
            "type": "boolean",
            "description": "Use the provider's priority queue. Standard is usually done within 1-2 minutes per 100 videos; fast mode helps big batches with tight timeouts. Fast-mode transcripts are charged as 'Transcript (fast mode)' instead of 'Transcript'.",
            "default": false
          },
          "maxVideos": {
            "title": "Maximum videos per run",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on videos processed per run (links and search results together). You are only charged for transcripts delivered.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}