YouTube

Fetch a cleaned YouTube transcript

Fetch a YouTube transcript for a video (video_id accepts a bare 11-char id or any YouTube URL) in the requested language and origin (uploader_provided | auto_generated). The transcript is cleaned server-side (deduplicated, tags/HTML stripped, coarse [m:ss] timestamps) - roughly a tenth the size of the raw captions. format='inline' (default) returns it inline in the transcript field when under the size cap, otherwise omits it and sets transcript_omitted_reason; format='url' returns metadata + a presigned download_url only. download_url (plain-text transcript) is always present and expires in ~1 hour; call again to refresh. Cached 7 days server-side — repeat calls on the same (video_id, language_code, origin) tuple are free after the first.

post/api/v1/youtube/get

Request

  • Base URL: https://glim.sh
  • URL: https://glim.sh/api/v1/youtube/get
  • Auth: one of:
    • none
    • API key in header x-api-key
    • HTTP bearer
    • API key in query parameter apiKey

Request body

video_idstring required

YouTube video URL or 11-char video id (e.g. https://youtu.be/dQw4w9WgXcQ, https://www.youtube.com/watch?v=dQw4w9WgXcQ, or dQw4w9WgXcQ). Also accepted as ref or url.

language_codestring

ISO 639-1 language code (e.g. 'en', 'de', 'fr')

origin'uploader_provided' | 'auto_generated'

'uploader_provided' for human captions (default), 'auto_generated' for YouTube auto-captions.

format'inline' | 'url'

'inline' (default): include the transcript in the response when it fits the inline cap; otherwise omit it and set transcript_omitted_reason. 'url': never include the transcript; caller fetches download_url. download_url is always present.

Response

Cleaned transcript (inline by default, or via presigned download_url)

object required

Changes

No recorded changes to this operation across all 1 revision of this API.