YouTube Video Batch Download API

/download/create/batch API endpoint allows you to create batch download tasks for multiple YouTube videos.

API Details

Endpoint POST https://download.abcproxy.com/download/create/batch

Description

This API creates a batch download job for multiple YouTube videos specified by their video IDs. The downloaded videos will be stored in the specified cloud storage and a callback will be sent to the provided URL upon completion.


Request

HTTP Request



curl -X POST "https://download.abcproxy.com/download/create/batch" \
  -H "Content-Type: application/json" \
  -d '{
    "video_ids": ["9cQBNYsCqQs", "KGOsWPF4Wfs"],
    "proxy_api_key": "xxxxx",
    "storage_type": "oss",
    "storage_url": "https://ACCESS_KEY:[email protected]/your-bucket/your-folder",
    "callback_url": "https://your-callback-url.com"
  }'

Parameters

Request Body

Name
Type
Required
Description
Example

video_ids

string[]

Yes

List of YouTube video IDs to download

["9cQBNYsCqQs", "KGOsWPF4Wfs"]

proxy_api_key

string

Yes

Proxy API key for authentication

"xxxxx"

storage_type

string

Yes

Object storage type (default, minio, oss, s3_compatible)

"oss"

storage_url

string

Yes

Cloud storage URL with credentials

"https://ACCESS_KEY:[email protected]/your-bucket/your-folder"

callback_url

string

Yes

URL to receive callback notification

"https://your-callback-url.com"


Response

Success 200

Response Body

{
  "code": 200,
  "msg": "Success",
  "data": {
    "batch_id": "25ba9534-bb83-4496-ac5b-6bc94f83e963"
  }
}

Response Fields

Field
Type
Description

code

integer

Response code (200 for success)

msg

string

Response message

data.batch_id

string

Unique ID for the batch download job


Error Responses

Common Errors

HTTP Status
Error Code
Description

400

Missing required parameters

One or more required parameters are missing

401

Invalid proxy API key

The provided proxy API key is invalid

500

Internal server error

An error occurred while processing the request

Error Example

{
  "code": 400,
  "msg": "Missing required parameters: video_ids",
  "data": null
}

Notes

  1. The storage_type parameter accepts the following values:

    • default: Default storage

    • minio: Minio object storage

    • oss: Alibaba Cloud OSS

    • s3_compatible: S3-compatible storage

  2. The storage_url should include authentication credentials in the format: https://ACCESS_KEY:SECRET_KEY@storage-endpoint/bucket-name/path

  3. The callback URL will receive a POST request when the batch job completes, containing the job status and details.