{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Video Subtitles Scraper With Keyword Search",
    "description": "YouTube Video Subtitles Scraper extracts captions, subtitles, video titles, channels, and metadata from YouTube videos. Search by keywords to find relevant videos and collect subtitle data for content research, SEO, transcription, and analysis.",
    "version": "0.1",
    "x-build-id": "EDeYofouKMNUk6BgW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/api-empire~youtube-video-subtitles-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-api-empire-youtube-video-subtitles-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/api-empire~youtube-video-subtitles-scraper/runs": {
      "post": {
        "operationId": "runs-sync-api-empire-youtube-video-subtitles-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/api-empire~youtube-video-subtitles-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-api-empire-youtube-video-subtitles-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": "🔗 YouTube Video URLs",
            "type": "array",
            "description": "One YouTube VIDEO URL per line - standard (watch?v=), short (youtu.be/), or Shorts links. Example: https://www.youtube.com/watch?v=dQw4w9WgXcQ. Each row is written to the output table as soon as that video is done.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "🔁 YouTube URLs (legacy key)",
            "type": "array",
            "description": "Backward-compatible alias of videoUrls above, so input built for the original actor keeps working unchanged. If both are filled, videoUrls is used first and these are appended.",
            "items": {
              "type": "string"
            }
          },
          "preferredCaptionLanguage": {
            "title": "🌍 Preferred Caption Language",
            "type": "string",
            "description": "Language code to prefer when a video has more than one caption track (examples: 'en' English, 'es' Spanish, 'fr' French). If the video has no track in this language, the actor falls back to the best available track automatically. Default is 'en'."
          },
          "language": {
            "title": "🗣️ Language (legacy key)",
            "type": "string",
            "description": "Backward-compatible alias of preferredCaptionLanguage above. Used only when preferredCaptionLanguage is left empty.",
            "default": "en"
          },
          "maxWorkers": {
            "title": "⚙️ Maximum Concurrent Workers",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of videos processed in parallel (1-10). Higher values finish a batch faster. Default is 4.",
            "default": 4
          },
          "searchKeywords": {
            "title": "🔎 Keywords / Phrases To Find",
            "type": "array",
            "description": "One keyword or phrase per line to search for inside every video's transcript (e.g. 'never', 'give you up'). Leave empty to skip the search and only fetch the transcript. Example: searchKeywords=['never','up'] on a video whose transcript repeats 'never' 5 times -> 5 matches, each with its own timestamp and https://youtu.be/<id>?t=<seconds> link.",
            "items": {
              "type": "string"
            }
          },
          "caseSensitiveSearch": {
            "title": "🔠 Case-Sensitive Search",
            "type": "boolean",
            "description": "When on, 'Music' and 'music' are treated as different keywords. Default is off (case-insensitive).",
            "default": false
          },
          "wholeWordOnly": {
            "title": "🧩 Whole Word / Phrase Only",
            "type": "boolean",
            "description": "When on, 'cat' will not match inside 'category'. Default is off (substring matching allowed).",
            "default": false
          },
          "contextWindowSeconds": {
            "title": "⏱️ Context Window (seconds)",
            "minimum": 0,
            "maximum": 120,
            "type": "integer",
            "description": "How many seconds of transcript before and after a match to include in that match's contextText. Example: contextWindowSeconds=5 pulls the surrounding ~10 seconds of dialogue around each hit. Default is 5."
          },
          "maxMatchesPerVideo": {
            "title": "🚫 Max Matches Returned Per Video",
            "minimum": 0,
            "type": "integer",
            "description": "Caps how many individual match rows are returned in matches[] for a single video (earliest first). 0 = unlimited. This only trims the returned list - totalMatches, matchedKeywords and keywordDensityPer1000Words always reflect the true, uncapped count. Default is 0 (unlimited)."
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy Configuration",
            "type": "object",
            "description": "Configure proxy preferences for better reliability when needed. Leave default settings for normal use."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}