下載API
視頻數據 API的工作原理
1
提交請求:
一個或多個 YouTube 視頻 URLs;
雲存儲詳細信息。
2
獲取 API 響應,確認您的視頻下載請求已被成功接受。
3
我們的繫統處理完視頻後,立即在指定的雲存儲位置獲取視頻。
輸入參數值
名字
類型
是否必需
描述
例子
starturls
string
Yes
要下載的 YouTube 影片 url 列表
api_key
string
Yes
用於身份驗證的代理 API 密钥
"xxxxx"
storage_type
string
Yes
对象存儲類型(default、s3_compatible)
"default"
storage_url
string
Yes
具有憑證的雲存儲 URL
quality
string
Yes
video選擇下載的視頻質量
"720"
提交單個作業
端點
復制
POST https://downloader.lunaproxy.com/api/request
輸入
在 JSON 有效負載中提供作業參數,如以下示例所示:
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 兼容的存儲設置
如果要將結果傳送到與 S3 兼容的存儲位置,則必須在負載的storage_url
值中包含存儲桶的 ACCESS_KEY:SECRET
身份驗證字符串:https://ACCESS_KEY:SECRET_KEY@storage-endpoint/bucket-name/path
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?