Video download API

How Video Data API works


1

Submit a request

One or more YouTube video URLs;

Cloud storage details.

2

Get the API response with the confirmation that your request to download a video has been successfully accepted.

3

Get the videos in the specified cloud storage location as soon as they're processed by our system.

Input parameter values

Name

Type

Required

Description

Example

starturls

string

Yes

List of YouTube video IDs to download

api_key

string

Yes

Proxy API key for authentication

"xxxxx"

storage_type

string

Yes

Object storage type (default, s3_compatible)

"default"

storage_url

string

Yes

Cloud storage URL with credentials

quality

string

Yes

Select the quality of the downloaded video

"720"

Submitting a single job

Endpoint

Copy

POST https://downloader.lunaproxy.com/api/request

Input

Provide the job parameters in a JSON payload as shown in the example below:

curl 'https://downloader.lunaproxy.com/api/request' -H "Content-Type: application/json" -d '{\"api_key\":\"*********\",\"startUrls\": \"[\"https://www.youtube.com/watch?v=CwHXoLs0RHs\",\"https://www.youtube.com/watch?v=0zQew4hlQK8\"]\"}'

S3-compatible storage setup

If you'd like to get your results delivered to an S3-compatible storage location, you will have to include your bucket's ACCESS_KEY:SECRET auth string in the storage_url value in the payload:

curl 'https://downloader.lunaproxy.com/api/request' -H "Content-Type: application/json" -d '{\"api_key\":\"******\",\"startUrls\": \"[\"https://www.youtube.com/watch?v=CwHXoLs0RHs\",\"https://www.youtube.com/watch?v=0zQew4hlQK8\"]\",\"storage_url\":\"https://ACCESS_KEY:SECRET_KEY@storage-endpoint/bucket-name/path\"}'

Last updated

Was this helpful?