API Reference YouTube Transcript Extract the transcript from a YouTube video. Supports multiple languages, timestamps, and both native captions and AI-generated transcripts when captions are unavailable.
GET /v1/youtube/transcript• 1 credit (native) · 2 credits/min (AI)
Parameters Name Type Required Default Description urlstringoptional — Full YouTube video URL. Use either url or videoId. videoIdstringoptional — YouTube video ID (e.g. dQw4w9WgXcQ). Use either url or videoId. langstringoptional en Preferred language code (ISO 639-1) modestringoptional auto Extraction mode: auto, native, or generate timestampsbooleanoptional false Include segment-level timestamps
Code Examples Python JavaScript cURL
Copyfrom supacrawlx import Client
client = Client("YOUR_API_KEY")
result = client.youtube.transcript(
"https://www.youtube.com/watch?v=dQw4w9WgXcQ",
lang="en"
)
print(result.text) Response {
"videoId": "dQw4w9WgXcQ",
"language": "en",
"text": "We're no strangers to love...",
"segments": [
{ "start": 0.0, "duration": 4.08, "text": "We're no strangers to love" }
],
"creditsUsed": 1
}