{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper: Channels & Playlists",
    "description": "Get transcripts of YouTube videos, Shorts, playlists, whole channels and search results as plain text, timed segments, SRT or WebVTT, with title, channel, views and publish date. Pick languages, or translate transcripts into one language (beta). Videos without captions are never charged.",
    "version": "1.0",
    "x-build-id": "1tTt4YpikHhrQdfMT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cairnware~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cairnware-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/cairnware~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-cairnware-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/cairnware~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-cairnware-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": "YouTube videos, playlists, channels or searches",
            "type": "array",
            "description": "Video links in any format (youtube.com/watch?v=..., youtu.be/..., /shorts/..., /embed/..., /live/..., m.youtube.com, music.youtube.com) or bare video IDs, one per line. You can also add playlist links (youtube.com/playlist?list=...) and channel links (youtube.com/@handle, /channel/UC..., /c/..., /user/...): each is replaced by its videos (channels: all public uploads, newest first; a /videos, /shorts or /streams tab link gives only that tab). You can also paste a search results link (youtube.com/results?search_query=...) to get its top video results. Listing them is free. Duplicates are removed.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search terms",
            "type": "array",
            "description": "Optional: search terms as you would type them on YouTube, one per line (e.g. \"sourdough starter for beginners\"). Each search's top video results are transcribed, in YouTube's order (videos only), up to \"Max videos per playlist, channel or search\". Same as pasting a youtube.com/results?search_query=... link above. Listing the results is free.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerSource": {
            "title": "Max videos per playlist, channel or search",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "For each playlist or channel link, take at most this many videos (channels: the newest ones). Only transcripts delivered are charged; your maximum cost per run also applies.",
            "default": 100
          },
          "languages": {
            "title": "Preferred languages",
            "type": "array",
            "description": "Caption languages in order of preference, as codes like en, es, de, pt-BR, zh-Hans. \"en\" also matches regional variants such as en-GB. For each language, captions written by the uploader are preferred over auto-generated ones. Leave empty to get each video's original language.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "fallbackToAnyLanguage": {
            "title": "Fall back to the original language",
            "type": "boolean",
            "description": "If a video has no captions in your preferred languages, return its original-language transcript instead (the row gets a warning). Turn off to get status \"no_transcript\" (not charged) for such videos.",
            "default": true
          },
          "includeAutoGenerated": {
            "title": "Include auto-generated captions",
            "type": "boolean",
            "description": "Use YouTube's automatic (speech recognition) captions when the uploader did not provide any. Most videos only have these. Turn off to accept human-made captions only.",
            "default": true
          },
          "translateTo": {
            "title": "Translate to (beta)",
            "type": "string",
            "description": "Optional: one language code (en, es, de, pt-BR, ja...) to get every transcript in that language. Videos that already have captions in it use them; the others get YouTube's own machine translation of the captions picked above (your preferred languages, else the original language). The row's \"translatedFrom\" shows the source language. Same price per transcript. Beta: YouTube throttles translation requests, so in our tests about half of the translated videos came back as free \"error\" rows (rerun those later); videos YouTube cannot translate are \"no_transcript\" (not charged). Leave empty for no translation."
          },
          "includeTimestamps": {
            "title": "Timestamped segments",
            "type": "boolean",
            "description": "Add \"segments\": every caption line with its start time and duration in seconds. The full plain text is always included in \"text\".",
            "default": true
          },
          "includeSrt": {
            "title": "SRT subtitles",
            "type": "boolean",
            "description": "Add the transcript as an SRT subtitle file in the \"srt\" field.",
            "default": false
          },
          "includeVtt": {
            "title": "WebVTT subtitles",
            "type": "boolean",
            "description": "Add the transcript as a WebVTT (.vtt) subtitle file in the \"vtt\" field, for HTML5 video players and most editors.",
            "default": false
          },
          "includeChapters": {
            "title": "Split by chapters",
            "type": "boolean",
            "description": "Add a chapters list: each of the video's chapters (the uploader's, else YouTube's automatic ones) with its title, start and end time and its part of the transcript. Handy for summaries and RAG. Videos without chapters get an empty list.",
            "default": false
          },
          "includeMetadata": {
            "title": "Full video details",
            "type": "boolean",
            "description": "Add publish date, like count, category, description, tags and thumbnail. Title, channel, duration and views are always included.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "YouTube blocks many datacenter IP addresses. Residential proxies give each retry a fresh IP and are strongly recommended; proxy traffic is included in the price.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many times a blocked or failed request is retried (exponential backoff, new proxy IP each time) before the video is returned with status \"error\".",
            "default": 6
          },
          "maxConcurrency": {
            "title": "Parallel videos",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many videos are processed at the same time.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}