What it does

  • Extracts full video transcripts as text
  • Supports multiple languages when available
  • Works with any public YouTube video URL

Pricing

**0.002perrequest(0.002 per request** (2 per 1,000 requests)

Authentication

Include your API key in the Authorization header:
Authorization: Bearer YOUR_LLMLAYER_API_KEY

Endpoint

POST /api/v1/youtube_transcript

SDK Usage

from llmlayer import LLMLayerClient

client = LLMLayerClient(api_key="your-api-key")

# Get transcript (default language)
response = client.get_youtube_transcript(
url="https://www.youtube.com/watch?v=dQw4w9WgXcQ"
)

print(response.transcript)

# Get transcript in specific language
response = client.get_youtube_transcript(
url="https://www.youtube.com/watch?v=dQw4w9WgXcQ",
language="es"
)

print(response.transcript)

# Save to file
with open('transcript.txt', 'w', encoding='utf-8') as f:
f.write(response.transcript)

Request Parameters

url
string
required
The YouTube video URLSupported formats:
  • https://www.youtube.com/watch?v=VIDEO_ID
  • https://youtu.be/VIDEO_ID
language
string
Language code for the transcript (e.g., “en”, “es”, “fr”)If not specified, returns the default transcript

Response

transcript
string
The full transcript text of the video
url
string
The YouTube video URL
language
string
The language code used for the transcript
cost
number
Cost in USD ($0.001)

Language Codes

Common language codes:
  • en - English
  • es - Spanish
  • fr - French
  • de - German
  • pt - Portuguese
  • it - Italian
  • ja - Japanese
  • ko - Korean
  • zh - Chinese

Limitations

  • Video must be public (not private or age-restricted)
  • Video must have captions/subtitles available
  • Requested language may not be available for all videos
  • Live streams may not have transcripts
  • Subject to rate limits based on your plan

Error Codes

Need Help? Join our Discord or email support@llmlayer.ai