Skip to main content
POST
/
api
/
v2
/
youtube_transcript
YouTube Transcript API - Extract video transcripts
curl --request POST \
  --url https://api.llmlayer.dev/api/v2/youtube_transcript \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "language": "en"
}
'
{
"transcript": "<string>",
"url": "<string>",
"title": "<string>",
"description": "<string>",
"author": "<string>",
"views": 123,
"likes": 123,
"date": "<string>",
"cost": 123,
"language": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer token authentication using your LLMLayer API key. Include in Authorization header as: Bearer YOUR_LLMLAYER_API_KEY

Body

application/json
url
string<uri>
required

YouTube video URL (supports youtube.com and youtu.be)

Example:

"https://www.youtube.com/watch?v=dQw4w9WgXcQ"

language
string | null

Language code for transcript (e.g., 'en', 'es', 'fr'). If not specified, uses video's default language.

Example:

"en"

Response

Extracted transcript with video metadata

transcript
string
required

Full video transcript text

url
string
required

YouTube video URL

title
string | null

Video title

description
string | null

Video description

author
string | null

Channel name/author

views
integer | null

View count

likes
integer | null

Like count

date
string | null

Upload date

cost
number | null

Cost in USD (value from COST_YOUTUBE_TRANSCRIPT constant)

language
string | null

Language of the returned transcript