Skip to main content
POST
https://api.scriptbase.app
/
api
/
v1
/
videos
/
batch
curl -X POST "https://api.scriptbase.app/api/v1/videos/batch" \
  -H "X-API-Key: sk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"videoIds": ["dQw4w9WgXcQ", "jNQXAC9IVRw", "9bZkp7q19f0"]}'
{
  "success": true,
  "data": {
    "videos": [
      {
        "id": "dQw4w9WgXcQ",
        "title": "Rick Astley - Never Gonna Give You Up",
        "description": "The official video for Rick Astley...",
        "duration": 213,
        "channel": {
          "id": "UCuAXFkgsw1L7xaCfnd5JJOw",
          "name": "Rick Astley"
        },
        "tags": [],
        "thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
        "uploadDate": "2009-10-25T06:57:33.000Z",
        "viewCount": "1500000000",
        "likeCount": "15000000",
        "transcriptLanguages": []
      },
      {
        "id": "jNQXAC9IVRw",
        "title": "Me at the zoo",
        "description": "The first video on YouTube...",
        "duration": 18,
        "channel": {
          "id": "UC4QobU6STFB0P71PMvOGN5A",
          "name": "jawed"
        },
        "tags": [],
        "thumbnail": "https://i.ytimg.com/vi/jNQXAC9IVRw/maxresdefault.jpg",
        "uploadDate": "2005-04-24T03:31:52.000Z",
        "viewCount": "300000000",
        "likeCount": "12000000",
        "transcriptLanguages": []
      }
    ]
  },
  "meta": {
    "creditsUsed": 3,
    "creditsRemaining": 997,
    "rateLimit": {
      "limit": 60,
      "remaining": 59,
      "resetAt": 1704326400
    }
  }
}

Overview

Fetch metadata 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 videos from
channelId
string
YouTube channel ID, handle, or URL to fetch videos from
limit
number
default:"10"
Maximum number of videos to process (1-5000, for playlist/channel sources)
includeTranscript
boolean
default:"false"
Include transcripts in response. Increases credit cost from 1 to 2 per video.
transcriptLang
string
Preferred transcript language code (ISO 639-1, e.g., ‘en’, ‘es’)

Credits

  • Without transcript: 1 credit per video
  • With transcript: 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/videos/batch" \
  -H "X-API-Key: sk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"videoIds": ["dQw4w9WgXcQ", "jNQXAC9IVRw", "9bZkp7q19f0"]}'
{
  "success": true,
  "data": {
    "videos": [
      {
        "id": "dQw4w9WgXcQ",
        "title": "Rick Astley - Never Gonna Give You Up",
        "description": "The official video for Rick Astley...",
        "duration": 213,
        "channel": {
          "id": "UCuAXFkgsw1L7xaCfnd5JJOw",
          "name": "Rick Astley"
        },
        "tags": [],
        "thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
        "uploadDate": "2009-10-25T06:57:33.000Z",
        "viewCount": "1500000000",
        "likeCount": "15000000",
        "transcriptLanguages": []
      },
      {
        "id": "jNQXAC9IVRw",
        "title": "Me at the zoo",
        "description": "The first video on YouTube...",
        "duration": 18,
        "channel": {
          "id": "UC4QobU6STFB0P71PMvOGN5A",
          "name": "jawed"
        },
        "tags": [],
        "thumbnail": "https://i.ytimg.com/vi/jNQXAC9IVRw/maxresdefault.jpg",
        "uploadDate": "2005-04-24T03:31:52.000Z",
        "viewCount": "300000000",
        "likeCount": "12000000",
        "transcriptLanguages": []
      }
    ]
  },
  "meta": {
    "creditsUsed": 3,
    "creditsRemaining": 997,
    "rateLimit": {
      "limit": 60,
      "remaining": 59,
      "resetAt": 1704326400
    }
  }
}

Error Codes

StatusCodeDescription
400INVALID_INPUTInvalid request body or no valid video IDs
401INVALID_API_KEYAPI key is missing or invalid
429QUOTA_EXCEEDEDInsufficient quota for batch operation
429RATE_LIMIT_EXCEEDEDToo many requests
  • Currently only videoIds is supported. Playlist and channel batch operations are coming soon.
  • Batches over 50 videos will return a jobId for async processing.
  • Use the Get Job Status endpoint to poll for results.