{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper + English Translation",
    "description": "Get YouTube transcripts in the language actually spoken, in its own script, plus an English version for 60+ languages. Urdu in Urdu script, RTL-safe Arabic, clean Japanese and Chinese. Timestamps, SRT/VTT, RAG chunks, Shorts. From $2 per 1,000 videos. Failed videos are free.",
    "version": "1.2",
    "x-build-id": "03PqpHFxJ8d3uc1db"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/panix~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-panix-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/panix~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-panix-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/panix~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-panix-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",
        "required": [
          "videoUrls"
        ],
        "properties": {
          "videoUrls": {
            "title": "YouTube video URLs or IDs",
            "type": "array",
            "description": "Any format works: watch?v=, youtu.be, /shorts/, /live/, /embed/, links with &t= or &list=, or a bare 11-character video ID. Duplicates are removed automatically.",
            "items": {
              "type": "string"
            }
          },
          "outputLevel": {
            "title": "What do you need?",
            "enum": [
              "original",
              "captions",
              "english"
            ],
            "type": "string",
            "description": "Original: the transcript in the language and script the video is spoken in ($2.00 per 1,000 videos). Captions: adds timestamps, YouTube's own caption text, SRT/VTT, Markdown and RAG chunks ($3.00 per 1,000). English: adds an English version for 60+ languages. English videos and the creator's own English subtitles cost nothing extra; offline machine translation is $0.50 per 1,000 minutes of video. Each run also has a start fee of $0.001 per GB of memory.",
            "default": "captions"
          },
          "language": {
            "title": "Caption language (optional)",
            "pattern": "^$|^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})?$",
            "type": "string",
            "description": "Leave empty to get the language the video is actually spoken in (recommended). Or enter a code such as en, es, de, hi, ur, pt-BR to pick that caption track when the video has it; otherwise the original language is returned with requestedLanguageFound: false."
          },
          "fixUrduScript": {
            "title": "Write Urdu in Urdu script",
            "type": "boolean",
            "description": "YouTube captions Urdu speech with its Hindi recognizer, in Hindi (Devanagari) script. When the video is detected as Urdu, transcriptOriginal is converted to Urdu (Perso-Arabic) script. YouTube's text is kept in transcriptCaption.",
            "default": true
          },
          "preferManualCaptions": {
            "title": "Prefer human-made captions",
            "type": "boolean",
            "description": "When a video has both human-made and auto-generated captions in the same language, use the human-made ones. Turn off to prefer auto-generated captions (closer to the exact spoken words).",
            "default": true
          },
          "removeNonSpeechTags": {
            "title": "Remove [Music], [Applause] and ♪ tags",
            "type": "boolean",
            "description": "Strip sound descriptions so the text contains only spoken words. Useful for LLM and search pipelines.",
            "default": false
          },
          "includeSegments": {
            "title": "Timestamped segments (Captions and English levels)",
            "type": "boolean",
            "description": "A segments array with start, end and duration (seconds) and text for every caption line, plus englishSegments on the English level.",
            "default": true
          },
          "includeMetadata": {
            "title": "Video metadata and chapters",
            "type": "boolean",
            "description": "Title, channel, duration, views, keywords, thumbnail, description and chapters. Included at no extra cost.",
            "default": true
          },
          "includeSrt": {
            "title": "SRT subtitle file (Captions and English levels)",
            "type": "boolean",
            "description": "Adds a ready-to-use .srt subtitle string (and srtEnglish on the English level). Right-to-left languages get direction marks so players show punctuation correctly.",
            "default": false
          },
          "includeVtt": {
            "title": "WebVTT subtitle file (Captions and English levels)",
            "type": "boolean",
            "description": "Adds a ready-to-use .vtt subtitle string (and vttEnglish on the English level).",
            "default": false
          },
          "includeMarkdown": {
            "title": "Markdown document (Captions and English levels)",
            "type": "boolean",
            "description": "The whole transcript as clean Markdown: a title header, timestamped paragraphs and chapter headings. Good for notes, Notion, docs and LLM prompts.",
            "default": false
          },
          "includeChunks": {
            "title": "RAG-ready chunks (Captions and English levels)",
            "type": "boolean",
            "description": "Splits the transcript into chunks for vector databases (Pinecone, Qdrant, Supabase, Weaviate). Chunks never cross a chapter boundary, and each has start/end times and a deep link to that moment of the video. On the English level each chunk also has textEnglish.",
            "default": false
          },
          "chunkSizeWords": {
            "title": "Chunk size (words)",
            "minimum": 50,
            "maximum": 2000,
            "type": "integer",
            "description": "Target words per chunk; for Chinese, Japanese and Thai, characters. Roughly 1 English word = 1.3 tokens.",
            "default": 300
          },
          "chunkOverlapWords": {
            "title": "Chunk overlap (words)",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Words repeated at the start of the next chunk so context is not lost at the edges. Capped at half the chunk size.",
            "default": 30
          },
          "maxConcurrency": {
            "title": "Parallel videos",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many videos are fetched at the same time.",
            "default": 10
          },
          "maxRetries": {
            "title": "Retries per video",
            "minimum": 0,
            "maximum": 6,
            "type": "integer",
            "description": "Extra attempts, each from a fresh IP, when YouTube blocks a request. Retries are always free.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Residential proxy is on by default and included in the price. YouTube blocks most datacenter IPs, so only change this if you bring your own residential proxy.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}