Subject: availableLangs field only returns the requested language instead of all available subtitles

Hi Supadata Team,

I've been using your Transcript API and noticed an issue with the availableLangs field in the response.

Issue Description

When I request a YouTube video transcript with mode=auto or a specific lang parameter, the availableLangs field in the response only contains the language that was returned, not all the subtitle languages available on YouTube.

Expected Behavior

The availableLangs field should return all available subtitle languages for the video, regardless of which language was requested. This would allow users to:

  1. Know what languages are available before making a request

  2. Let users manually select a different language if their preferred one isn't available

Actual Behavior

// Request: GET /v1/transcript?url=...&mode=auto&lang=ko
// Response:
{
"lang": "zh",
"availableLangs": ["zh"], // ❌ Only shows "zh", but video has ko, en, ja, etc.
"content": [...]
}

Even though the YouTube video has multiple subtitle languages (Korean, English, Japanese, etc.), the API only returns ["zh"] in availableLangs.

Steps to Reproduce

  1. Find a YouTube video with multiple subtitle languages

  2. Call the API with mode=auto or any specific lang

  3. Check the availableLangs field - it only contains the returned language

Suggested Fix

Please return all available subtitle languages from YouTube in the availableLangs field, not just the one that was returned. This is critical for applications that need to offer language selection to users.

Example of Expected Response

{
"lang": "zh",
"availableLangs": ["ko", "en", "zh", "ja", "es"], // βœ… All available languages
"content": [...]
}

Thank you for looking into this!

Best regards, Steve

Please authenticate to join the conversation.

Upvoters
Status

In Review

Board
πŸ’‘

Feature Request

Date

2 days ago

Author

tcytcy111

Subscribe to post

Get notified by email when there are changes.