import { Supadata } from '@supadata/js';
const supadata = new Supadata({
apiKey: 'YOUR_API_KEY',
});
const batchResults = await supadata.youtube.batch.getBatchResults(JOB_ID);
console.log(batchResults);
{
"status": "completed",
"results": [
{
"videoId": "dQw4w9WgXcQ",
"transcript": {
"content": [
{
"text": "Never gonna give you up...",
"offset": 8150,
"duration": 1200,
"lang": "en"
}
],
"lang": "en",
"availableLangs": [
"en",
"es",
"zh-TW"
]
},
"video": {
"id": "dQw4w9WgXcQ",
"title": "Rick Astley - Never Gonna Give You Up (Official Music Video)",
"description": "The official music video for \"Never Gonna Give You Up\"...",
"duration": 213,
"channel": {
"id": "UCuAXFkgsw1L7xaCfnd5JJOw",
"name": "Rick Astley"
},
"tags": [
"Rick Astley",
"Official Video",
"Music"
],
"thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
"uploadDate": "2009-10-25T00:00:00.000Z",
"viewCount": 1234567890,
"likeCount": 12345678,
"transcriptLanguages": [
"en",
"es",
"fr"
]
},
"errorCode": "not-found"
}
],
"stats": {
"total": 10,
"succeeded": 8,
"failed": 2
},
"completedAt": "2025-04-03T06:59:53.428Z"
}
Get the status and results of a YouTube batch job.
import { Supadata } from '@supadata/js';
const supadata = new Supadata({
apiKey: 'YOUR_API_KEY',
});
const batchResults = await supadata.youtube.batch.getBatchResults(JOB_ID);
console.log(batchResults);
{
"status": "completed",
"results": [
{
"videoId": "dQw4w9WgXcQ",
"transcript": {
"content": [
{
"text": "Never gonna give you up...",
"offset": 8150,
"duration": 1200,
"lang": "en"
}
],
"lang": "en",
"availableLangs": [
"en",
"es",
"zh-TW"
]
},
"video": {
"id": "dQw4w9WgXcQ",
"title": "Rick Astley - Never Gonna Give You Up (Official Music Video)",
"description": "The official music video for \"Never Gonna Give You Up\"...",
"duration": 213,
"channel": {
"id": "UCuAXFkgsw1L7xaCfnd5JJOw",
"name": "Rick Astley"
},
"tags": [
"Rick Astley",
"Official Video",
"Music"
],
"thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
"uploadDate": "2009-10-25T00:00:00.000Z",
"viewCount": 1234567890,
"likeCount": 12345678,
"transcriptLanguages": [
"en",
"es",
"fr"
]
},
"errorCode": "not-found"
}
],
"stats": {
"total": 10,
"succeeded": 8,
"failed": 2
},
"completedAt": "2025-04-03T06:59:53.428Z"
}
The batch job ID
Successfully retrieved the status and results (if completed)
Response for batch job results
Was this page helpful?