{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Video Transcript & API: Full Text, Timestamps, SRT",
    "description": "Get a YouTube video transcript from the link of a video or Short, without an API key: full text for AI, timestamped segments, SRT and VTT, language of your choice, video details. $5 per 1,000 transcripts; videos without captions are free.",
    "version": "0.1",
    "x-build-id": "UECUN0klH7GpzxY8d"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/quarra~youtube-video-transcript/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-quarra-youtube-video-transcript",
        "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/quarra~youtube-video-transcript/runs": {
      "post": {
        "operationId": "runs-sync-quarra-youtube-video-transcript",
        "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/quarra~youtube-video-transcript/run-sync": {
      "post": {
        "operationId": "run-sync-quarra-youtube-video-transcript",
        "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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "Videos",
            "maxItems": 20000,
            "type": "array",
            "description": "One per line: video URLs (watch, youtu.be, Shorts, live, embed) or 11-character video IDs. Channel and playlist links work too and are expanded into their videos, newest first for channels (up to 10 per link).",
            "items": {
              "type": "string",
              "maxLength": 2000
            }
          },
          "languages": {
            "title": "Preferred languages",
            "maxItems": 20,
            "type": "array",
            "description": "Language codes in order of preference (en, fr, pt-BR, es…). For each one, captions written by the creator first, then auto-generated. Empty: the language spoken in the video. Every record says which language you got (language, isAutoGenerated) and lists all tracks.",
            "items": {
              "type": "string",
              "maxLength": 35
            }
          },
          "useAnyLanguage": {
            "title": "Fall back to the spoken language",
            "type": "boolean",
            "description": "When none of your languages exists on a video, return its transcript in the language spoken (requestedLanguageFound: false). Off: return a free missing record listing the available languages instead.",
            "default": true
          },
          "transcriptFormat": {
            "title": "Transcript format",
            "enum": [
              "both",
              "text",
              "segments"
            ],
            "type": "string",
            "description": "transcript is the whole text in one string; segments is a list of {start, end, duration, text} in seconds.",
            "default": "both"
          },
          "includeSrt": {
            "title": "Add SRT subtitles",
            "type": "boolean",
            "description": "Add an srt field with the transcript as a ready-to-save .srt subtitle file.",
            "default": false
          },
          "includeVtt": {
            "title": "Add WebVTT subtitles",
            "type": "boolean",
            "description": "Add a vtt field with the transcript as a ready-to-save .vtt subtitle file.",
            "default": false
          },
          "removeSoundTags": {
            "title": "Remove sound tags",
            "type": "boolean",
            "description": "Remove non-speech tags such as [Music], [Applause] or (laughter) from the text and segments. Handy before feeding transcripts to an LLM.",
            "default": false
          },
          "includeDescription": {
            "title": "Add description and tags",
            "type": "boolean",
            "description": "Add the video's full description and its tags (keywords). Title, channel, date, duration, views, likes and chapters are always included.",
            "default": false
          },
          "excludeMusicVideos": {
            "title": "Skip music videos",
            "type": "boolean",
            "description": "Skip videos whose YouTube category is Music before their transcript is downloaded (never charged). YouTube's automatic captions transcribe song lyrics as speech; turn this on if you only want spoken content. Interviews or lessons filed under Music are skipped too.",
            "default": false
          },
          "maxItems": {
            "title": "Max transcripts in total",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Optional cap for the whole run, counted in charged transcripts (a video over 10 hours counts one per 10 hours started). Respected exactly. Free records (no captions, errors) do not count; a run that keeps meeting videos without a transcript stops early and says why (see Pricing in the README). Empty = no cap."
          },
          "proxyConfiguration": {
            "title": "Connection",
            "type": "object",
            "description": "Connection. Keep the default (automatic). Costs are included in the price.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}