YouTube Transcript Extractor
Get captions and subtitles for a YouTube video with timestamps
/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
{
"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
Description
How to Use
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. Optionally set the `lang` parameter to request a specific subtitle language (e.g. `en`, `es`, `ja`).
3. Check the `lang` field in the response to confirm which language was returned, and `availableLangs` to see all options.
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
- Video search indexing — Make YouTube content searchable by extracting and indexing transcripts
- Content summarisation — Feed transcript text into AI models for automated summaries
- Quote extraction — Find specific quotes with precise timestamps for citation
- Language learning — Extract subtitles in target languages for study material
- Video show notes — Generate timestamped notes and highlights from YouTube videos
Frequently Asked Questions
Can I get transcripts for any YouTube video?
Is there a non-YouTube transcript endpoint?
Are timestamps accurate for auto-generated captions?
Start using YouTube Transcript Extractor now
Get your free API key and make your first request in under a minute.