GET
/
youtube
/
transcript
/
translate
import { Supadata } from '@supadata/js';

const supadata = new Supadata({
apiKey: 'YOUR_API_KEY',
});
const translated = await supadata.youtube.translate({
url: 'https://youtu.be/dQw4w9WgXcQ',
lang: 'es',
text: false,
});
console.log(translated);
{
  "content": [
    {
      "text": "Never gonna give you up...",
      "offset": 8150,
      "duration": 1200,
      "lang": "en"
    }
  ],
  "lang": "es"
}

Authorizations

x-api-key
string
header
required

Query Parameters

url
string<uri>

YouTube video URL. See supported URL formats.

Example:

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

videoId
string

YouTube video ID. Alternative to URL.

Example:

"dQw4w9WgXcQ"

text
boolean
default:false

When true, returns plain text transcript.

chunkSize
number

Maximum characters per transcript chunk (only when text=false)

Required range: 50 <= x <= 10000
Example:

1000

lang
string
required

Language code for translation (ISO 639-1). See Languages.

Example:

"en"

Response

200
application/json

Successfully translated transcript

The response is of type object.