{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript and Timed Text Scraper",
    "description": "Extract public manual or auto-generated YouTube captions as one validated transcript record per video.",
    "version": "1.2",
    "x-build-id": "QvmJIUusbPpaLOmGT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/googleapi~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-googleapi-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/googleapi~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-googleapi-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/googleapi~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-googleapi-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": {
          "videoUrls": {
            "title": "Video URLs or IDs",
            "maxItems": 100,
            "type": "array",
            "description": "YouTube watch, Shorts, live, embed, youtu.be URLs, or raw 11-character video IDs.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "videoUrl": {
            "title": "Single video URL alias",
            "type": "string",
            "description": "Compatibility alias for one videoUrls value."
          },
          "videoIds": {
            "title": "Video ID aliases",
            "maxItems": 100,
            "type": "array",
            "description": "Compatibility alias for raw YouTube video IDs.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{11}$"
            }
          },
          "urls": {
            "title": "URL aliases",
            "maxItems": 100,
            "type": "array",
            "description": "Compatibility alias for public YouTube video URLs.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URL aliases",
            "maxItems": 100,
            "type": "array",
            "description": "Compatibility alias for public YouTube video URLs.",
            "items": {
              "type": "string"
            }
          },
          "sourceUrls": {
            "title": "Source URL aliases",
            "maxItems": 100,
            "type": "array",
            "description": "Compatibility alias for public YouTube video URLs.",
            "items": {
              "type": "string"
            }
          },
          "watchUrls": {
            "title": "Watch URL aliases",
            "maxItems": 100,
            "type": "array",
            "description": "Compatibility alias for public YouTube video URLs.",
            "items": {
              "type": "string"
            }
          },
          "language": {
            "title": "Preferred caption language",
            "pattern": "^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{2,8})?$",
            "type": "string",
            "description": "BCP-47-style caption-language preference such as en, es, or pt-BR."
          },
          "preferredLanguage": {
            "title": "Caption language alias",
            "pattern": "^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{2,8})?$",
            "type": "string",
            "description": "Compatibility alias for language."
          },
          "includeLanguage": {
            "title": "Caption language alias",
            "pattern": "^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{2,8})?$",
            "type": "string",
            "description": "Compatibility alias for language."
          },
          "languagePreference": {
            "title": "Caption language alias",
            "pattern": "^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{2,8})?$",
            "type": "string",
            "description": "Compatibility alias for language."
          },
          "languageCode": {
            "title": "Player language alias",
            "pattern": "^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{2,8})?$",
            "type": "string",
            "description": "Compatibility alias for the player response language."
          },
          "playerLanguage": {
            "title": "Player response language",
            "pattern": "^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{2,8})?$",
            "type": "string",
            "description": "Language sent to YouTube's public player endpoint."
          },
          "preferAutoGenerated": {
            "title": "Allow auto-generated captions",
            "type": "boolean",
            "description": "Use an auto-generated track only when preferred and fallback manual tracks are unavailable.",
            "default": true
          },
          "includeTimestamps": {
            "title": "Include timed segments",
            "type": "boolean",
            "description": "Include the structured segments array when outputFormat is segments or both.",
            "default": true
          },
          "outputFormat": {
            "title": "Transcript output format",
            "enum": [
              "segments",
              "full_text",
              "both"
            ],
            "type": "string",
            "description": "Return timed segments, full text, or both in the single per-video record."
          },
          "maxVideos": {
            "title": "Maximum videos",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum unique videos to process, from 1 to 100."
          },
          "limit": {
            "title": "Result limit alias",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Compatibility alias for maxVideos."
          },
          "includeContent": {
            "title": "Fetch transcript content",
            "type": "boolean",
            "description": "Download the selected caption track and include transcript metrics.",
            "default": true
          },
          "fetchTranscriptContent": {
            "title": "Transcript content alias",
            "type": "boolean",
            "description": "Compatibility alias for includeContent."
          },
          "includeMedia": {
            "title": "Include thumbnails",
            "type": "boolean",
            "description": "Include public thumbnail URLs and dimensions when available.",
            "default": true
          },
          "requestDelayMs": {
            "title": "Request delay (ms)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Bounded delay before each public player or timed-text request."
          },
          "maxRetries": {
            "title": "Maximum retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Bounded retries for transient public requests."
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 10,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time allowed for one public request."
          },
          "maxResponseBytes": {
            "title": "Maximum response bytes",
            "minimum": 100000,
            "maximum": 20000000,
            "type": "integer",
            "description": "Maximum player or timed-text response size accepted."
          },
          "browserWaitMs": {
            "title": "Browser caption wait (ms)",
            "minimum": 250,
            "maximum": 10000,
            "type": "integer",
            "description": "Bounded wait for the public browser player to expose its current caption tracks when direct timed text is empty.",
            "default": 1500
          },
          "userAgent": {
            "title": "User agent",
            "type": "string",
            "description": "One ordinary browser user-agent value sent to first-party YouTube endpoints."
          },
          "country": {
            "title": "Player country",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country sent to the public player."
          },
          "countryCode": {
            "title": "Player country alias",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Compatibility alias for country."
          },
          "locale": {
            "title": "Locale override",
            "pattern": "^[A-Za-z]{2,8}(?:-[A-Za-z]{2})?$",
            "type": "string",
            "description": "Optional locale in ll or ll-CC form."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify Proxy configuration for first-party player and timed-text requests.",
            "additionalProperties": true
          },
          "page": {
            "title": "Page",
            "minimum": 1,
            "type": "integer",
            "description": "One-based starting page or offset page for paginated sources.",
            "default": 1
          },
          "maxItems": {
            "title": "Maximum items",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of business records to emit.",
            "default": 25
          },
          "maxPages": {
            "title": "Maximum pages",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of source pages to inspect.",
            "default": 10
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}