YouTube

YouTube transcript API with AI fallback

Send a URL to the YouTube transcript API and get JSON, text, SRT or VTT. transcript1 uses the video's captions when a usable track exists. Otherwise, it transcribes the audio with AI.

  • Captions first, AI transcription as the fallback
  • The same price either way: 1 credit per minute
  • watch, youtu.be, Shorts and embed links

How it works

Every common YouTube link
Watch pages, youtu.be short links, Shorts, embeds and live links all resolve to the same video, with or without www.
Captions when they exist
With source set to auto, creator captions win over auto-generated ones. Auto-translated tracks are never used.
AI transcription when they do not
When no usable caption track exists, transcript1 uses speech-to-text. Set source to stt to always transcribe the audio.
You see where the text came from
Every transcription reports transcript_source: youtube_captions or speech_to_text.
One price
1 credit per media minute, rounded up, for captions and AI transcription alike. Failed and canceled transcriptions are not charged.

Request

Call the YouTube transcript API from your code

POST the video URL with your API key, from Python or any HTTP client. wait=60 holds the request open for up to 60 seconds. Read an unfinished job later by id.

cURL
curl -X POST "https://api.transcript1.com/v1/transcriptions?wait=60" \
  -H "Authorization: Bearer $TRANSCRIPT1_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"platform":"youtube","url":"https://youtu.be/dQw4w9WgXcQ"}'

Response

Check transcript_source in the response

A transcript made from captions says so, and says whether the track was creator-uploaded or auto-generated. billed_minutes is the media duration rounded up.

Response (shortened)
{
  "id": "tr_8fK2Lm0PqRsTuVwXyZaBcD",
  "status": "completed",
  "transcript_source": "youtube_captions",
  "caption_kind": "auto_generated",
  "language": "en",
  "billed_minutes": 4,
  "transcript": {
    "text": "Welcome back to the channel. Today we are looking at how transcripts are made.",
    "segments": [
      { "start": 0, "end": 4.2, "speaker": null, "language": "en", "text": "Welcome back to the channel." }
    ]
  }
}

Control

Choose captions or AI transcription

source is auto by default. Use captions to fail with no_captions (and no charge) when a video has no usable track, or stt to always transcribe the audio.

Request body
{
  "platform": "youtube",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "source": "stt"
}

Start with 60 free minutes

60 free minutes after you verify your email. No card required.

Get your API key

Frequently asked questions

Something missing? Ask support

Does the YouTube transcript API work without captions?

Yes. With source set to auto, the default, transcript1 transcribes the audio when no usable caption track exists. Set source to captions if you would rather such videos fail than use AI transcription.

Which YouTube links are accepted?

Watch pages, youtu.be short links, Shorts, embeds and live links. Channel pages and playlist-only links return 422 invalid_url.

Can I transcribe a private video?

No. Only public and unlisted videos can be fetched. Private, age-restricted and live videos fail. For a file you own, upload it instead.

How much does a YouTube transcript cost?

1 credit per minute, rounded up, for captions or AI transcription. New accounts get 60 free minutes once, after email verification. No card required.

Is this the youtube-transcript-api Python package?

No. transcript1 is a hosted REST API. To use the YouTube transcript API from Python, send an HTTP request with your API key.