{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper - Bulk Videos & Shorts to Text",
    "description": "Get the transcript of any YouTube video or Short from its URL. Returns the full text with timed segments, language, title and channel. Export as plain text, timestamped text, SRT or VTT subtitles. Bulk URLs, manual and auto-generated captions. You pay only for transcripts delivered.",
    "version": "0.0",
    "x-build-id": "IMlkQ4w6T7cX86jPR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/eiv~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-eiv-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/eiv~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-eiv-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/eiv~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-eiv-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": {
          "targets": {
            "title": "YouTube URLs",
            "type": "array",
            "description": "Videos, Shorts, channels, playlists or search result pages, one per line. Also accepted: bare video IDs (dQw4w9WgXcQ), channel IDs (UC...), @handles and playlist IDs (PL...). A channel gives its newest videos; paste its /shorts or /streams URL for those tabs instead.",
            "items": {
              "type": "string"
            }
          },
          "searchKeywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Search YouTube for each keyword and transcribe the top results, in YouTube's own order. To filter the search (upload date, length, sort), paste the URL of a filtered YouTube search under \"YouTube URLs\" instead.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerSource": {
            "title": "Max videos per channel, playlist or search",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "How many videos to take from each channel tab (newest first), playlist (in its order) or search (in YouTube's order). With Shorts or live streams included, a channel gives up to this many from each tab. Videos you list directly are always all transcribed.",
            "default": 20
          },
          "includeShorts": {
            "title": "Include Shorts",
            "type": "boolean",
            "description": "Channels: also list up to the per-source number of Shorts from the Shorts tab. Searches: keep Shorts in the results. Shorts you paste directly are always transcribed.",
            "default": false
          },
          "includeLiveStreams": {
            "title": "Include past live streams",
            "type": "boolean",
            "description": "Channels: also list up to the per-source number of past live streams from the Live tab. Streams are long, so their transcripts are big.",
            "default": false
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Only videos published on or after this day: a date (2025-01-31) or a relative age (30 days, 6 months). Channels stop listing once they reach older videos. Applies to every video, including ones you list directly."
          },
          "publishedBefore": {
            "title": "Published before",
            "type": "string",
            "description": "Only videos published on or before this day: a date (2025-12-31) or a relative age (1 year)."
          },
          "startUrls": {
            "title": "Start URLs (for chaining Actors)",
            "type": "array",
            "description": "The same URLs in the list shape other Actors output, so a previous Actor's results (a YouTube search or channel scraper, for example) can be fed straight in. Use this or the field above.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "languages": {
            "title": "Preferred languages",
            "type": "array",
            "description": "Caption language codes in order of preference, e.g. en, es, pt-BR. The first one a video has is returned, uploaded captions before auto-generated ones. Leave empty for the video's own original-language track.",
            "items": {
              "type": "string"
            }
          },
          "transcriptType": {
            "title": "Caption type",
            "enum": [
              "any",
              "manual",
              "generated"
            ],
            "type": "string",
            "description": "Any: uploaded captions when they exist, otherwise auto-generated ones. Uploaded only: written by the creator. Auto-generated only: YouTube's speech recognition, which follows the spoken words most closely.",
            "default": "any"
          },
          "fallbackToOtherLanguage": {
            "title": "Fall back to another language",
            "type": "boolean",
            "description": "When a video has none of the preferred languages, return its original-language track (marked isPreferredLanguage: false). Off: return an uncharged NO_MATCHING_LANGUAGE row instead.",
            "default": true
          },
          "outputFormat": {
            "title": "Transcript format",
            "enum": [
              "text",
              "timestamped",
              "srt",
              "vtt"
            ],
            "type": "string",
            "description": "What the \"text\" field holds: plain text (best for AI and search), text with [0:12] timestamps, or a ready SRT or WebVTT subtitle file.",
            "default": "text"
          },
          "includeSegments": {
            "title": "Include timed segments",
            "type": "boolean",
            "description": "Adds \"segments\": every caption line with its start and duration in seconds. Turn off to halve the size of each row when you only need the text.",
            "default": true
          },
          "includeDetails": {
            "title": "Include publish date, likes and chapters",
            "type": "boolean",
            "description": "Reads each video's watch page for its publish date, like and comment counts, channel handle and subscribers, hashtags and chapters. Included in the price; turn off for slightly faster runs.",
            "default": true
          },
          "splitByChapters": {
            "title": "Split transcript by chapter",
            "type": "boolean",
            "description": "Adds each chapter's part of the transcript to \"chapters\", ready for chunking in AI and RAG pipelines. Needs video details on; videos without chapters get an empty list.",
            "default": false
          },
          "maxItems": {
            "title": "Max transcripts",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many transcripts in total. You pay per transcript, so this is also your cost cap for the run.",
            "default": 10000
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Used for the transcript requests. YouTube refuses about four in ten of them from datacenter addresses, and region-locks some videos, so the default is residential proxy in the United States; it is included in the price. Pick another country for videos published only there.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          },
          "maxConcurrency": {
            "title": "Videos at once",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many videos are transcribed at the same time. Higher is faster for big lists; the price per transcript is the same.",
            "default": 10
          },
          "requestTimeoutSecs": {
            "title": "Request timeout",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "How long to wait for one response before giving up on it.",
            "default": 30
          },
          "maxRetries": {
            "title": "Retries per request",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retries for failed connections. YouTube's refusals are handled separately, by moving to a fresh address.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}