Skip to main content
POST
https://api.scriptbase.app
/
api
/
v1
/
transcript
/
batch
curl -X POST "https://api.scriptbase.app/api/v1/transcript/batch" \
  -H "X-API-Key: sk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"videoIds": ["dQw4w9WgXcQ", "jNQXAC9IVRw"], "format": "text"}'
{
  "success": true,
  "data": {
    "results": [
      {
        "videoId": "dQw4w9WgXcQ",
        "success": true,
        "format": "json",
        "segments": [
          {
            "text": "We're no strangers to love",
            "offset": 0,
            "duration": 2500
          },
          {
            "text": "You know the rules and so do I",
            "offset": 2500,
            "duration": 3000
          }
        ]
      },
      {
        "videoId": "jNQXAC9IVRw",
        "success": false,
        "error": "Transcript not available"
      }
    ],
    "summary": {
      "total": 2,
      "successful": 1,
      "failed": 1
    }
  },
  "meta": {
    "creditsUsed": 4,
    "creditsRemaining": 996,
    "rateLimit": {
      "limit": 60,
      "remaining": 59,
      "resetAt": 1704326400
    }
  }
}

Overview

Fetch transcripts for multiple YouTube videos in a single request. For batches exceeding 50 videos, the request is processed asynchronously and returns a job ID.

Authentication

X-API-Key
string
required
Your API key

Request Body

videoIds
string[]
Array of YouTube video IDs or URLs (max 50 for sync processing). One of videoIds, playlistId, or channelId is required.
playlistId
string
YouTube playlist ID or URL to fetch transcripts from
channelId
string
YouTube channel ID, handle, or URL to fetch transcripts from
limit
number
default:"10"
Maximum number of videos to process (1-5000, for playlist/channel sources)
format
string
default:"json"
Output format: json, text, srt, or vtt
lang
string
Preferred language code (ISO 639-1, e.g., ‘en’, ‘es’, ‘fr’)

Credits

  • Cost: 2 credits per video

Response

success
boolean
Whether the request was successful
data
object
meta
object
curl -X POST "https://api.scriptbase.app/api/v1/transcript/batch" \
  -H "X-API-Key: sk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"videoIds": ["dQw4w9WgXcQ", "jNQXAC9IVRw"], "format": "text"}'
{
  "success": true,
  "data": {
    "results": [
      {
        "videoId": "dQw4w9WgXcQ",
        "success": true,
        "format": "json",
        "segments": [
          {
            "text": "We're no strangers to love",
            "offset": 0,
            "duration": 2500
          },
          {
            "text": "You know the rules and so do I",
            "offset": 2500,
            "duration": 3000
          }
        ]
      },
      {
        "videoId": "jNQXAC9IVRw",
        "success": false,
        "error": "Transcript not available"
      }
    ],
    "summary": {
      "total": 2,
      "successful": 1,
      "failed": 1
    }
  },
  "meta": {
    "creditsUsed": 4,
    "creditsRemaining": 996,
    "rateLimit": {
      "limit": 60,
      "remaining": 59,
      "resetAt": 1704326400
    }
  }
}

Error Codes

StatusCodeDescription
400INVALID_INPUTInvalid request body or parameters
401INVALID_API_KEYAPI key is missing or invalid
429QUOTA_EXCEEDEDInsufficient quota for batch operation
429RATE_LIMIT_EXCEEDEDToo many requests
  • Batches over 50 videos will return a jobId for async processing (status code 202).
  • Use the Get Job Status endpoint to poll for results.
  • Not all videos have transcripts. The response includes both successful and failed results.
  • Credits are charged for all videos in the batch, regardless of transcript availability.