{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper",
    "description": "YouTube transcript scraper and API: get any video's transcript in about 3 seconds as text, timestamps, SRT or VTT subtitles, in its own language or translated. Built for AI agents, MCP and n8n. No captions, no charge. $2.99 per 1,000 on the Free plan, from $1.49 on paid plans.",
    "version": "0.0",
    "x-build-id": "7LXecILRZAY4Iwdov"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nokia2k~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nokia2k-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/nokia2k~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-nokia2k-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/nokia2k~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-nokia2k-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": {
          "videoUrls": {
            "title": "📺 YouTube videos",
            "type": "array",
            "description": "Add video links or 11-character video IDs, one per line, or paste a whole list at once. Regular, short (youtu.be), Shorts, live, embed and mobile links all work, with or without extra parameters. Duplicates are fetched once.",
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "title": "🌐 Transcript language",
            "type": "array",
            "description": "Leave it on <b>Original language</b> to get each video in the language it is spoken in: you do not need to know the language in advance. Or pick one or more languages in order of preference, and the first one the video has is used. You can also type any language code (<code>pt-BR</code>, <code>es-419</code>) or a language name (<code>Spanish</code>, <code>español</code>, <code>German</code>). Captions written by people are preferred over auto-generated ones. Every row tells you which language was returned and which other languages the video has.",
            "items": {
              "type": "string",
              "enumSuggestedValues": [
                "auto",
                "en",
                "es",
                "pt",
                "pt-BR",
                "fr",
                "de",
                "it",
                "nl",
                "ru",
                "uk",
                "pl",
                "tr",
                "ar",
                "hi",
                "bn",
                "ur",
                "id",
                "ms",
                "vi",
                "th",
                "fil",
                "ja",
                "ko",
                "zh",
                "zh-Hans",
                "zh-Hant",
                "fa",
                "he",
                "el",
                "sv",
                "no",
                "da",
                "fi",
                "cs",
                "sk",
                "hu",
                "ro",
                "bg",
                "sr",
                "hr",
                "sl",
                "lt",
                "lv",
                "et",
                "ca",
                "gl",
                "eu",
                "ta",
                "te",
                "mr",
                "gu",
                "kn",
                "ml",
                "pa",
                "ne",
                "si",
                "km",
                "my",
                "sw",
                "am",
                "af",
                "az",
                "kk",
                "uz",
                "ka",
                "hy",
                "sq",
                "mk",
                "is",
                "mn"
              ],
              "enumTitles": [
                "🎬 Original language of the video (recommended)",
                "English (en)",
                "Spanish (es)",
                "Portuguese (pt)",
                "Portuguese (Brazil) (pt-BR)",
                "French (fr)",
                "German (de)",
                "Italian (it)",
                "Dutch (nl)",
                "Russian (ru)",
                "Ukrainian (uk)",
                "Polish (pl)",
                "Turkish (tr)",
                "Arabic (ar)",
                "Hindi (hi)",
                "Bengali (bn)",
                "Urdu (ur)",
                "Indonesian (id)",
                "Malay (ms)",
                "Vietnamese (vi)",
                "Thai (th)",
                "Filipino (fil)",
                "Japanese (ja)",
                "Korean (ko)",
                "Chinese (zh)",
                "Chinese (Simplified) (zh-Hans)",
                "Chinese (Traditional) (zh-Hant)",
                "Persian (fa)",
                "Hebrew (he)",
                "Greek (el)",
                "Swedish (sv)",
                "Norwegian (no)",
                "Danish (da)",
                "Finnish (fi)",
                "Czech (cs)",
                "Slovak (sk)",
                "Hungarian (hu)",
                "Romanian (ro)",
                "Bulgarian (bg)",
                "Serbian (sr)",
                "Croatian (hr)",
                "Slovenian (sl)",
                "Lithuanian (lt)",
                "Latvian (lv)",
                "Estonian (et)",
                "Catalan (ca)",
                "Galician (gl)",
                "Basque (eu)",
                "Tamil (ta)",
                "Telugu (te)",
                "Marathi (mr)",
                "Gujarati (gu)",
                "Kannada (kn)",
                "Malayalam (ml)",
                "Punjabi (pa)",
                "Nepali (ne)",
                "Sinhala (si)",
                "Khmer (km)",
                "Burmese (my)",
                "Swahili (sw)",
                "Amharic (am)",
                "Afrikaans (af)",
                "Azerbaijani (az)",
                "Kazakh (kk)",
                "Uzbek (uz)",
                "Georgian (ka)",
                "Armenian (hy)",
                "Albanian (sq)",
                "Macedonian (mk)",
                "Icelandic (is)",
                "Mongolian (mn)"
              ]
            },
            "default": [
              "auto"
            ]
          },
          "outputFormats": {
            "title": "📄 Output formats",
            "type": "array",
            "description": "Choose how each transcript is returned. You can pick several: the price per transcript stays the same.",
            "items": {
              "type": "string",
              "enum": [
                "segments",
                "text",
                "timestampedText",
                "srt",
                "vtt"
              ],
              "enumTitles": [
                "Segments: start, duration, end and text for every caption line (JSON)",
                "Text: the whole transcript as one clean paragraph",
                "Timestamped text: one line per caption, [MM:SS] text",
                "SRT subtitle file content",
                "WebVTT subtitle file content"
              ]
            },
            "default": [
              "segments",
              "text"
            ]
          },
          "combinedFile": {
            "title": "📚 Also give me everything as one Markdown file",
            "type": "boolean",
            "description": "Saves all transcripts of the run into one file, <code>ALL_TRANSCRIPTS.md</code>, with a heading, the channel, the date and the link for every video. Upload it to ChatGPT, Claude, NotebookLM or your knowledge base in one go. You find it in the run's <b>Storage &gt; Key-value store</b> tab. Large runs are split into files of about 8 MB. The price stays the same.",
            "default": false
          },
          "saveFiles": {
            "title": "💾 Also save subtitle files I can download",
            "type": "boolean",
            "description": "Saves a ready-to-use file per video for each text format you selected above: <code>.srt</code>, <code>.vtt</code> and <code>.txt</code>. Each row gets a <code>files</code> field with direct download links, and all files are listed in the run's <b>Storage &gt; Key-value store</b> tab. The price per transcript stays the same.",
            "default": false
          },
          "translateTo": {
            "title": "🔁 Translate to",
            "type": "string",
            "description": "Pick a language to get YouTube's own machine translation when the video has no captions in that language. If the video already has captions in it, those are returned instead, because they are better than a machine translation. YouTube does not offer translation for every video: when it does not, you get the original language and a note in <code>message</code>.",
            "default": "none"
          },
          "fallbackToAnyLanguage": {
            "title": "If my language is missing, give me the original language",
            "type": "boolean",
            "description": "When on, a video without captions in the languages you picked still returns its transcript in its original language, and the <code>language</code> and <code>message</code> fields tell you which one. Turn it off to skip those videos instead. Skipped videos are not charged.",
            "default": true
          },
          "captionType": {
            "title": "Caption type",
            "enum": [
              "any",
              "manual",
              "auto"
            ],
            "type": "string",
            "description": "Choose which captions are accepted. Auto-generated captions are produced by YouTube's speech recognition and have no punctuation in many languages.",
            "default": "any"
          },
          "mergeSegmentsSeconds": {
            "title": "Merge caption lines into blocks",
            "minimum": 0,
            "maximum": 3600,
            "type": "integer",
            "description": "YouTube captions come in lines of a few words. Set a number of seconds, for example 30, to join them into longer blocks. This is useful for chapters, search indexes and chunking for RAG and vector databases: each block becomes one RAG chunk with its start and end time. Use 0 to keep the original lines.",
            "default": 0
          },
          "includeMetadata": {
            "title": "Include video details",
            "type": "boolean",
            "description": "Adds channel, duration, view count, description, keywords and thumbnail to every row. The video title is always included.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}