YTAPI.devDocs
Last updated Sep 13, 2026
||MarkdownView as Markdown|Agent setup

Run batch

runBatch(params, options?): BatchResponse

POST/v1/batch1 Credit

Each task runs in isolation. The batch itself does not fail as a whole: inspect success on every result. You are billed 1 credit per successful task.

API Token

The preferred authorization scheme for the YouTube Transcript API. Create a key with transcripts:read in the developer dashboard.

Example: Authorization: Bearer YOUR_API_KEY

See Authentication for scopes and rate limits.

transcripts:read
ParametersExpand Collapse
tasks:BatchTask[]

Body param:

Up to 10 task objects.

id?:string

Caller-defined id echoed on the result.

type:string

transcript or video_info.

video_id:string

11-character YouTube video ID.

format?:string

Transcript format when type is transcript.

mode?:string

Video lookup mode when type is video_info (fast or full).

ReturnsExpand Collapse
total_tasks:number

Number of tasks submitted.

successful_tasks:number

Tasks with "success": true.

failed_tasks:number

Isolated failures (missing captions, invalid ids).

total_latency_ms:number

Wall-clock time for the whole batch.

results:BatchResult[]

Per-task outcome, including id, video_id, type, success, latency_ms, and data.

Fair credit accounting

Only tasks with "success": true consume credits.