API Depot/APIs/YouTube Transcript

YouTube Transcript

liveasync

Fetch the full timestamped transcript of a YouTube video. Returns clean JSON with segments, start times, and the full concatenated text.

POST /v1/youtube/transcriptPer video

Request

FieldTypeDescription
url*stringYouTube URL (youtube.com/watch?v=ID or youtu.be/ID)
languagestringPreferred language code (default: en)

Job Result

The endpoint returns { job_id: integer } immediately. Poll GET /jobs/{job_id} until status: "completed" — the result below is in the result field.

FieldTypeDescription
video_idstringExtracted YouTube video ID
languagestringLanguage code of the fetched transcript
full_textstringAll transcript segments joined as a single string
segmentsarrayList of { text, start, duration } objects

Example

Request

{
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "language": "en"
}

Completed job result

{
  "video_id": "dQw4w9WgXcQ",
  "language": "en",
  "full_text": "We're no strangers to love ...",
  "segments": [
    {
      "text": "We're no strangers to love",
      "start": 0,
      "duration": 3.5
    },
    {
      "text": "You know the rules and so do I",
      "start": 3.5,
      "duration": 3
    }
  ]
}

Notes

  • Async endpoint — processing takes 2–10s depending on video length.
  • Works only for videos with transcripts enabled (auto-generated or manual).
  • Private or age-restricted videos will return a failed job.
  • Falls back to any available auto-generated track if the requested language is unavailable.

Try it