Skip to main content
POST
/
youtube
/
transcript
/
v2
Get YouTube transcript
curl --request POST \
  --url https://{deployment}/api/v1/youtube/transcript/v2 \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "format": "json",
  "preferred_lang": "en",
  "with_metadata": false
}
'
{
  "video_id": "dQw4w9WgXcQ",
  "format": "json",
  "content": "[{\"text\":\"We're no strangers to love\",\"start\":0.0,\"duration\":3.5}]",
  "success": true,
  "retry_info": {
    "total_attempts": 1,
    "failed_attempts": 0
  }
}

Authorizations

X-API-KEY
string
header
required

Your deployment's API key (MMK_API_KEY).

Body

application/json

Provide either video_url or video_id.

video_url
string

Full YouTube URL. Use this or video_id.

video_id
string

11-character YouTube video ID. Use this or video_url.

preferred_lang
string

Preferred caption language (ISO code, e.g. en, ko). Falls back to the default track when unavailable.

format
enum<string>
default:xml

Output format for content.

Available options:
xml,
json,
vtt,
srt
with_metadata
boolean
default:false

Include video metadata in the response. Metadata fields require a Pro license.

Response

Transcript result

video_id
string
format
string
content
string

The transcript rendered in the requested format.

success
boolean
error
string
metadata
object
retry_info
object

Diagnostics about transcript/metadata fetch attempts.