{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Subtitle and Caption Crawler",
    "description": "Discover public YouTube caption tracks, translation languages, and optional timed subtitle content through bounded first-party player requests.",
    "version": "2.0",
    "x-build-id": "2DQQrZ3E9dBdo6QAJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/googleapi~youtube-subtitle-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-googleapi-youtube-subtitle-search-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-subtitle-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-googleapi-youtube-subtitle-search-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-subtitle-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-googleapi-youtube-subtitle-search-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, embed, live, youtu.be URLs, or 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 videoUrls.",
            "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 videoUrls.",
            "items": {
              "type": "string"
            }
          },
          "preferredLanguage": {
            "title": "Preferred caption language",
            "type": "string",
            "description": "BCP-47-style preference such as en, es, or pt-br. Manual captions are preferred over auto-generated tracks."
          },
          "includeLanguage": {
            "title": "Language preference alias",
            "type": "string",
            "description": "Compatibility alias for preferredLanguage."
          },
          "languagePreference": {
            "title": "Caption language alias",
            "type": "string",
            "description": "Compatibility alias for preferredLanguage."
          },
          "fetchSubtitleContent": {
            "title": "Fetch subtitle content",
            "type": "boolean",
            "description": "Download and normalize timed segments for the selected caption track.",
            "default": false
          },
          "includeContent": {
            "title": "Subtitle content alias",
            "type": "boolean",
            "description": "Compatibility alias for fetchSubtitleContent."
          },
          "includeMedia": {
            "title": "Include thumbnails",
            "type": "boolean",
            "description": "Include public thumbnail URLs and dimensions when available.",
            "default": true
          },
          "maxItems": {
            "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 maxItems."
          },
          "language": {
            "title": "Player response language",
            "type": "string",
            "description": "Two-to-eight character language code sent to the player endpoint."
          },
          "languageCode": {
            "title": "Player language alias",
            "type": "string",
            "description": "Compatibility alias for language."
          },
          "country": {
            "title": "Player country",
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country used for the player locale."
          },
          "countryCode": {
            "title": "Player country alias",
            "type": "string",
            "description": "Compatibility alias for country."
          },
          "locale": {
            "title": "Locale override",
            "type": "string",
            "description": "Optional locale in ll or ll-CC form."
          },
          "requestDelayMs": {
            "title": "Request delay (ms)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Bounded delay before each first-party player or caption request.",
            "default": 150
          },
          "maxRetries": {
            "title": "Maximum retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Bounded retries for transient first-party request failures.",
            "default": 2
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 10,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time allowed for one first-party request.",
            "default": 30
          },
          "maxResponseBytes": {
            "title": "Maximum response bytes",
            "minimum": 100000,
            "maximum": 20000000,
            "type": "integer",
            "description": "Maximum JSON or caption response size accepted.",
            "default": 8000000
          },
          "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 the first-party endpoint."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify proxy configuration for first-party player and caption requests.",
            "additionalProperties": true
          },
          "page": {
            "title": "Page",
            "minimum": 1,
            "type": "integer",
            "description": "One-based starting page or offset page for paginated sources.",
            "default": 1
          },
          "maxPages": {
            "title": "Maximum pages",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of source pages to inspect.",
            "default": 10
          },
          "authorizedSearch": {
            "title": "Authorized subtitle search (default off)",
            "type": "boolean",
            "description": "Enable source-backed subtitle search over authorized caption text. When enabled, only the supplied authorized caption body is searched; the restricted public transcript route is never used and no caption text is downloaded.",
            "default": false
          },
          "searchQuery": {
            "title": "Search query",
            "maxLength": 500,
            "type": "string",
            "description": "Term or phrase to find as an exact span in the authorized caption text. Required when authorizedSearch is enabled."
          },
          "authorizedCaption": {
            "title": "Authorized caption source",
            "type": "object",
            "description": "Caption body obtained through owner OAuth captions.download or supplied by the rights holder. This actor consumes the supplied text only; it does not call captions.list/captions.download or retry the restricted public route.",
            "properties": {
              "videoId": {
                "title": "Exact video ID",
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{11}$",
                "description": "Exact 11-character YouTube video ID the authorized caption text belongs to."
              },
              "language": {
                "title": "Caption language",
                "type": "string",
                "description": "BCP-47 language code of the authorized caption track, e.g. en or pt-br."
              },
              "format": {
                "title": "Caption format",
                "type": "string",
                "enum": [
                  "vtt",
                  "srt",
                  "json3",
                  "auto"
                ],
                "default": "auto",
                "description": "Format of the supplied caption body. auto detects WEBVTT, json3, or SRT."
              },
              "text": {
                "title": "Caption body text",
                "type": "string",
                "description": "Verbatim authorized caption body (VTT/SRT/json3). Track names, languages and captions.list metadata are not caption text and are not accepted as a substitute."
              },
              "authorization": {
                "title": "Authorization route",
                "type": "string",
                "enum": [
                  "owner_oauth_captions_download",
                  "rights_holder_file"
                ],
                "description": "How the caption text was authorized: owner OAuth captions.download, or a rights-holder-supplied VTT/SRT file."
              },
              "ownerOAuthVerified": {
                "title": "Owner OAuth verified",
                "type": "boolean",
                "default": false,
                "description": "Set true when owner OAuth with edit permission for this specific video was verified for the captions.download text."
              },
              "rightsHolderAuthorization": {
                "title": "Rights-holder authorization attested",
                "type": "boolean",
                "default": false,
                "description": "Set true when the rights holder documented permission to supply and search this VTT/SRT file."
              },
              "trackId": {
                "title": "Authoritative track ID",
                "type": "string",
                "description": "Genuine caption track identifier from the authorized source, when available. Never used as searchable text."
              },
              "coverage": {
                "title": "Declared transcript coverage",
                "type": "string",
                "enum": [
                  "full",
                  "partial"
                ],
                "description": "Whether the rights holder declares the supplied text covers the full video. Gaps in cue timings still trigger an honest partial disclosure."
              }
            },
            "additionalProperties": false
          },
          "maxSearchHits": {
            "title": "Maximum search hits",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of source-backed exact matches to emit, from 1 to 500.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}