OS Manuals

/usr/bin/youtube_transcript_api

User-friendly AI Interface (Supports Ollama, OpenAI API, ...)

From open-webui 0.9.6-r1 (os), captured 2026-11-05 by running youtube_transcript_api --help (exit 0). permalink

usage: youtube_transcript_api [-h] [--version] [--list-transcripts] [--languages [LANGUAGES ...]]
                              [--exclude-generated] [--exclude-manually-created]
                              [--format {json,pretty,text,webvtt,srt}] [--translate TRANSLATE]
                              [--webshare-proxy-username WEBSHARE_PROXY_USERNAME]
                              [--webshare-proxy-password WEBSHARE_PROXY_PASSWORD]
                              [--http-proxy URL] [--https-proxy URL]
                              video_ids [video_ids ...]

This is a python API which allows you to get the transcripts/subtitles for a given YouTube video.
It also works for automatically generated subtitles and it does not require a headless browser,
like other selenium based solutions do!

positional arguments:
  video_ids             List of YouTube video IDs.

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  --list-transcripts    This will list the languages in which the given videos are available in.
  --languages [LANGUAGES ...]
                        A list of language codes in a descending priority. For example, if this is
                        set to "de en" it will first try to fetch the german transcript (de) and
                        then fetch the english transcript (en) if it fails to do so. As I can't
                        provide a complete list of all working language codes with full certainty,
                        you may have to play around with the language codes a bit, to find the one
                        which is working for you!
  --exclude-generated   If this flag is set transcripts which have been generated by YouTube will
                        not be retrieved.
  --exclude-manually-created
                        If this flag is set transcripts which have been manually created will not
                        be retrieved.
  --format {json,pretty,text,webvtt,srt}
  --translate TRANSLATE
                        The language code for the language you want this transcript to be
                        translated to. Use the --list-transcripts feature to find out which
                        languages are translatable and which translation languages are available.
  --webshare-proxy-username WEBSHARE_PROXY_USERNAME
                        Specify your Webshare "Proxy Username" found at
                        https://dashboard.webshare.io/proxy/settings
  --webshare-proxy-password WEBSHARE_PROXY_PASSWORD
                        Specify your Webshare "Proxy Password" found at
                        https://dashboard.webshare.io/proxy/settings
  --http-proxy URL      Use the specified HTTP proxy.
  --https-proxy URL     Use the specified HTTPS proxy.
Options (11)
OptionDescriptionSource
-h, --helpshow this help message and exithelp
--versionshow program's version number and exithelp
--list-transcriptsThis will list the languages in which the given videos are available in.help
--exclude-generatedIf this flag is set transcripts which have been generated by YouTube will not be retrieved.help
--exclude-manually-createdIf this flag is set transcripts which have been manually created will not be retrieved.help
--format jsonhelp
--translate TRANSLATEThe language code for the language you want this transcript to be translated to.help
--webshare-proxy-username WEBSHARE_PROXY_USERNAMESpecify your Webshare "Proxy Username" found at https://dashboard.webshare.io/proxy/settingshelp
--webshare-proxy-password WEBSHARE_PROXY_PASSWORDSpecify your Webshare "Proxy Password" found at https://dashboard.webshare.io/proxy/settingshelp
--http-proxy URLUse the specified HTTP proxy.help
--https-proxy URLUse the specified HTTPS proxy.help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.