{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper: YouTube Transcripts and Subtitles",
    "description": "YouTube transcript scraper for videos, Shorts, channels, playlists and searches: the transcript as text, timed segments, paragraphs, chapters, SRT or VTT, with title, channel, views, likes and publish date on every row. No login, no API key. Videos without captions are free.",
    "version": "0.1",
    "x-build-id": "Eswl3qJnRigafhe0i"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/agenttoolworks~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-agenttoolworks-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/agenttoolworks~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-agenttoolworks-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/agenttoolworks~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-agenttoolworks-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": {
          "videos": {
            "title": "Videos",
            "type": "array",
            "description": "YouTube video URLs or video IDs, one per line: watch links, youtu.be links, Shorts, live replays, embeds, or the 11-character ID alone. Channel, playlist and search URLs pasted here are read as such.",
            "items": {
              "type": "string"
            }
          },
          "channels": {
            "title": "Channels",
            "type": "array",
            "description": "Channel handles (@3blue1brown), channel URLs or channel IDs. The channel's videos are read newest first, up to the maximum per source; narrow them with the dates below.",
            "items": {
              "type": "string"
            }
          },
          "playlists": {
            "title": "Playlists",
            "type": "array",
            "description": "Playlist URLs or playlist IDs. Videos are read in playlist order.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Keywords, as you would type them in YouTube's search. Each returns the videos YouTube's search shows a visitor, in its order.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerSource": {
            "title": "Max videos per channel, playlist or search",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Stop after this many videos for each channel, playlist or search (default 50, up to 20,000). Videos pasted one by one are always all read.",
            "default": 50
          },
          "maxItems": {
            "title": "Max transcripts in the run",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap on the transcripts charged in the whole run, besides the spending limit you set on Apify."
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "Preferred caption languages, best first, as codes (en, fr, es, pt-BR). The first one the video has is returned; an uploaded track is preferred over an auto-generated one. Empty means the video's own language.",
            "items": {
              "type": "string"
            }
          },
          "transcriptType": {
            "title": "Caption type",
            "enum": [
              "any",
              "manual",
              "auto"
            ],
            "type": "string",
            "description": "Which kind of captions to return.",
            "default": "any"
          },
          "languageFallback": {
            "title": "Fall back to the video's own language",
            "type": "boolean",
            "description": "On (default): when the video has none of the languages asked for, its own captions are returned and the row says so (languageFallbackUsed). Off: such a video gives a free row with status language_not_available.",
            "default": true
          },
          "outputFormats": {
            "title": "Transcript formats",
            "type": "array",
            "description": "Every format picked is a field of the video's row; the price is the same whatever you pick. Default: plain text and timed segments.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "segments",
                "paragraphs",
                "chapters",
                "chunks",
                "srt",
                "vtt",
                "words"
              ],
              "enumTitles": [
                "Plain text",
                "Timed segments (text, start, end, duration)",
                "Paragraphs with time ranges",
                "Chapters with the transcript of each",
                "Chunks for embeddings (RAG)",
                "SRT subtitles",
                "WebVTT subtitles",
                "Words with their own timestamps (auto-generated tracks)"
              ]
            },
            "default": [
              "text",
              "segments"
            ]
          },
          "chunkSize": {
            "title": "Chunk size (characters)",
            "minimum": 100,
            "maximum": 20000,
            "type": "integer",
            "description": "With the Chunks format: the target size of a chunk, cut at caption boundaries, each with its time range.",
            "default": 1000
          },
          "includeDetails": {
            "title": "Publish date, likes and category",
            "type": "boolean",
            "description": "On (default): each row also carries the publish date, like count, category and whether the video is a Short or unlisted, at no extra charge.",
            "default": true
          },
          "includeDescription": {
            "title": "Video description",
            "type": "boolean",
            "description": "On (default): each row carries the video's description.",
            "default": true
          },
          "dateFrom": {
            "title": "Published after",
            "type": "string",
            "description": "Only videos published on or after this date: 2026-01-31, or a period back from now such as 30 days, 2 weeks or 6 months. A video outside the dates is never charged."
          },
          "dateTo": {
            "title": "Published before",
            "type": "string",
            "description": "Only videos published on or before this date (2026-06-30)."
          },
          "channelContent": {
            "title": "Channel content",
            "type": "array",
            "description": "Which of a channel's uploads to read. Default: videos.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "shorts",
                "live"
              ],
              "enumTitles": [
                "Videos",
                "Shorts",
                "Live streams"
              ]
            },
            "default": [
              "videos"
            ]
          },
          "listOnly": {
            "title": "List videos only (free)",
            "type": "boolean",
            "description": "Only list the videos of the channels, playlists and searches, with ID, URL and title: no transcript is read and nothing is charged.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}