{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Search Transcripts: Keyword to Video Transcripts",
    "description": "Search YouTube for any keyword and get the transcripts of the top videos as text, Markdown or RAG chunks, in YouTube's order, with title, channel, duration and views. Filters by upload date, length and sort; daily alerts with only new videos.",
    "version": "1.0",
    "x-build-id": "QMab5abkeEFDvbwRY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fguiraud~youtube-search-transcripts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fguiraud-youtube-search-transcripts",
        "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/fguiraud~youtube-search-transcripts/runs": {
      "post": {
        "operationId": "runs-sync-fguiraud-youtube-search-transcripts",
        "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/fguiraud~youtube-search-transcripts/run-sync": {
      "post": {
        "operationId": "run-sync-fguiraud-youtube-search-transcripts",
        "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": {
          "searchQueries": {
            "title": "YouTube searches",
            "type": "array",
            "description": "Get transcripts of the videos YouTube shows for a search, e.g. \"python tutorial\" or \"AI agents\". Results keep YouTube's order (searchRank). Combine with Only new videos and a schedule to get new videos about a topic as text.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerSearch": {
            "title": "Max videos per search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many results to take from each search (20 per page). Searching is free; you pay only for transcripts returned.",
            "default": 10
          },
          "sortBy": {
            "title": "Search: sort by",
            "enum": [
              "relevance",
              "date",
              "views",
              "rating"
            ],
            "type": "string",
            "description": "Order of the search results.",
            "default": "relevance"
          },
          "uploadDate": {
            "title": "Search: upload date",
            "enum": [
              "any",
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Only videos uploaded in this period.",
            "default": "any"
          },
          "videoDuration": {
            "title": "Search: video length",
            "enum": [
              "any",
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "Only videos of this length.",
            "default": "any"
          },
          "onlyNewVideos": {
            "title": "Only new videos",
            "type": "boolean",
            "description": "Skip videos of these channels, playlists and searches that earlier runs already processed. Ideal on a schedule: each run returns (and charges) only new videos.",
            "default": false
          },
          "videos": {
            "title": "YouTube videos",
            "type": "array",
            "description": "Video links (youtube.com/watch?v=..., youtu.be/..., Shorts, live, embed) or 11-character video IDs. One per line. Channel and playlist links pasted here also work.",
            "items": {
              "type": "string"
            }
          },
          "channels": {
            "title": "YouTube channels or playlists",
            "type": "array",
            "description": "Get the newest videos of whole channels or playlists: @handle, youtube.com/@handle, youtube.com/channel/UC..., or a playlist link. Combine with Only new videos and a schedule to get every new upload as text.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerChannel": {
            "title": "Max videos per channel or playlist",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "How many of the newest videos to take from each channel or playlist. Listing is free; you pay only for transcripts returned.",
            "default": 10
          },
          "languages": {
            "title": "Preferred languages",
            "type": "array",
            "description": "Language codes in order of preference (en, es, pt, de, fr...). 'es' also matches regional tracks such as 'es-419'. Empty = the video's own captions.",
            "items": {
              "type": "string"
            }
          },
          "fallbackToOtherLanguage": {
            "title": "Fall back to another language",
            "type": "boolean",
            "description": "If none of the preferred languages exists, return the video's captions in its own language (billed). Turn off to skip those videos instead (not billed).",
            "default": true
          },
          "preferManualCaptions": {
            "title": "Prefer human captions",
            "type": "boolean",
            "description": "Use captions written by the creator when they exist, and auto-generated ones otherwise. Turn off to prefer auto-generated captions.",
            "default": true
          },
          "aiFallback": {
            "title": "Transcribe videos without captions with AI",
            "type": "boolean",
            "description": "When a video has no captions at all, download its audio and transcribe it with open-source Whisper (99 languages, auto-detected). Billed $0.010 per minute of audio instead of the transcript price; each video is rounded up to the next minute. Off by default. The run uses 2 GB of memory when this is on.",
            "default": false
          },
          "maxAiMinutesPerVideo": {
            "title": "Max minutes per AI transcription",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Videos without captions that are longer than this are not transcribed with AI (and not billed). Protects your budget from very long videos.",
            "default": 60
          },
          "outputs": {
            "title": "Output formats",
            "type": "array",
            "description": "text (paragraphs), segments (start/end/text), srt, vtt, markdown (with [HH:MM:SS] timestamps) and chunks (for RAG).",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "segments",
                "srt",
                "vtt",
                "markdown",
                "chunks"
              ],
              "enumTitles": [
                "Plain text",
                "Timestamped segments",
                "SRT subtitles",
                "WebVTT subtitles",
                "Markdown with timestamps",
                "Chunks for RAG"
              ]
            },
            "default": [
              "text",
              "segments"
            ]
          },
          "includeMetadata": {
            "title": "Include video details",
            "type": "boolean",
            "description": "Channel ID, duration, views, keywords and description (free).",
            "default": true
          },
          "chunkSize": {
            "title": "Chunk size (characters)",
            "minimum": 200,
            "type": "integer",
            "description": "Target size of each chunk when 'chunks' is selected.",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Parallel videos",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many videos are processed at the same time.",
            "default": 5
          },
          "failOnError": {
            "title": "Fail the run on errors",
            "type": "boolean",
            "description": "Mark the run as FAILED when a video fails after all retries or no transcript is returned. Videos without captions do not count. Useful for monitoring pipelines.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "YouTube blocks data-center IPs, so residential proxies are used by default (included in the price)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}