📺

YouTube Transcript Extractor

Get captions and subtitles for a YouTube video with timestamps

GET 1 credit /v1/youtube/transcript
curl "https://youtube.toolkitapi.io/v1/youtube/transcript?url=https://www.youtube.com/watch?v=jNQXAC9IVRw&lang=en"
import httpx

resp = httpx.get(
    "https://youtube.toolkitapi.io/v1/youtube/transcript?url=https://www.youtube.com/watch?v=jNQXAC9IVRw&lang=en",
)
print(resp.json())
const resp = await fetch("https://youtube.toolkitapi.io/v1/youtube/transcript?url=https://www.youtube.com/watch?v=jNQXAC9IVRw&lang=en", {
});
const data = await resp.json();
console.log(data);
# See curl example
Response 200 OK
{
  "id": "jNQXAC9IVRw",
  "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "title": null,
  "lang": "en",
  "availableLangs": ["en", "es", "pt"],
  "content": [
    {"text": "All right, so here we are in front of the elephants", "offset": 0.0, "duration": 4.5, "lang": "en"},
    {"text": "and the cool thing about these guys", "offset": 4.5, "duration": 2.8, "lang": "en"},
    {"text": "is that they have really really really long trunks", "offset": 7.3, "duration": 3.2, "lang": "en"}
  ]
}

Try It Live

Live Demo

Description

Get captions and subtitles for a YouTube video with timestamps

How to Use

1

1. Pass a YouTube video URL or video ID in the `url` query parameter. Standard URLs, short URLs (youtu.be), and bare video IDs are all accepted.

2

2. Optionally set the `lang` parameter to request a specific subtitle language (e.g. `en`, `es`, `ja`).

3

3. Check the `lang` field in the response to confirm which language was returned, and `availableLangs` to see all options.

4

4. Process the `content` array — each segment includes `text`, `offset` (start time in seconds), and `duration`.

About This Tool

The YouTube Transcript Extractor retrieves captions and subtitles for any YouTube video and returns them as timestamped segments. It supports both manually uploaded captions and YouTube's auto-generated subtitles.

Use this endpoint when you need the spoken content of a YouTube video for text analysis, search indexing, content repurposing, or accessibility workflows. The response includes timing information so you can link text back to specific moments in the video.

You can request a specific language, and the API reports all available subtitle languages so you can make a follow-up request in a different language if needed.

Why Use This Tool

Frequently Asked Questions

Can I get transcripts for any YouTube video?
Most public YouTube videos with captions (manual or auto-generated) are supported. Videos without any captions, private videos, or age-restricted content will return a `transcript-not-found` error.
Is there a non-YouTube transcript endpoint?
The current Media API is YouTube-first. Use this endpoint (or batch transcript endpoints) for transcript extraction workflows.
Are timestamps accurate for auto-generated captions?
Auto-generated caption timestamps are generally accurate to within 1–2 seconds. Manually uploaded captions may have more precise timing depending on how they were created.

Start using YouTube Transcript Extractor now

Get your free API key and make your first request in under a minute.