You need a reliable way to turn a social-media video URL into a downloadable file this week. By the end of this guide, you’ll call one API to request a video in your chosen format and resolution, then poll a second API to retrieve the direct download URL—ready to save to storage, attach to a CMS, or hand off to a background worker.
What this API does and when to use it
The Social Media API Video Download API lets you submit a video URL from platforms like Youtube, Facebook, Instagram, SoundCloud, TikTok, X/Twitter, and Twitch, choose a target format/quality, and then retrieve the downloadable link once processing completes. It supports popular resolutions and audio formats including 144, 240, 360, 480, 720, 1080, 1440, 4k, mp3, wav, ogg, and webm. Typical use cases include:
- Automated ingestion of creator-submitted URLs into your media pipeline
- Pre-generating assets in a specific resolution for a mobile app
- Creating audio-only extracts for podcast or transcription workflows
- Building internal tools to archive and categorize social clips
On Zyla API Hub, every API uses the same subscription-and-quota model under a single account and key. That means you can integrate this API now and later add other media or social endpoints without onboarding a new provider. Zyla hosts more than 10,000 public APIs across categories, but this guide stays focused on media downloads.
Getting started on Zyla API Hub
To ship this integration quickly:
- Open the API’s listing: Start 7-day trial on Social Media API Video Download API.
- Click Subscribe or start the 7-day trial (or 50 requests—check the listing for what’s currently offered).
- Copy your API key. Authentication is a single header: Authorization: Bearer YOUR_API_KEY.
Billing is subscription + quota, not pay-per-call. There is no Free Plan. For current access options and pricing, check the API page above. If you want to browse more media and social integrations later, visit Zyla API Hub.
Endpoint overview
This API offers a two-step flow:
- Request a video in your desired format and quality via Download, which returns an ID for your job.
- After waiting ~30 seconds, poll Get Video Download URL using the returned ID to retrieve the final downloadable link.
1) Download (submit a video for processing)
- Method: GET
- URL: https://zylalabs.com/api/10960/social-media-api-video-download/20671/download
- Description: Download Videos in any format and quality. Works with Youtube Shorts too.
- Supported formats: 144, 240, 360, 480, 720, 1080, 1440, 4k, mp3, wav, ogg, webm
- Supported websites: Youtube, Facebook, Instagram, SoundCloud, TikTok, X/Twitter, Twitch
- Required query params:
- download (string): the source video URL (e.g., a Youtube link)
- format (string): target format or resolution (e.g., 720)
Official cURL example:
curl -s -X GET "https://zylalabs.com/api/10960/social-media-api-video-download/20671/download?download=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D4iuPJ1pdNkY&format=720" \
-H "Authorization: Bearer YOUR_API_KEY"
Official JSON response:
{
"success": true,
"id": "v2_stream_72b78f7ca6c4f1f267cb",
"title": "Team Feature: Algeria | The Rise of \"Mazadona,\" Algeria’s Secret World Cup Weapon",
"thumbnail": "https://i.ytimg.com/vi/4iuPJ1pdNkY/hqdefault.jpg",
"format": "mp4 [720p]"
}
What matters for your integration:
- success: boolean indicating the request was accepted.
- id: the processing identifier you will use in the next endpoint. Persist it.
- title, thumbnail, format: helpful for logging, UX, or file naming.
2) Get Video Download URL (poll for the final link)
- Method: GET
- URL: https://zylalabs.com/api/10960/social-media-api-video-download/20672/get-video-download-url
- Description: Retrieve the downloadable URL using the ID from the Download step.
- Important: After obtaining the ID from the previous endpoint, you must wait 30 seconds before using it here. Processing typically takes 30 seconds to 1 minute and may vary with queue load.
- Required query params:
- getVideo (string): the ID returned by Download, e.g., v2_stream_72b78f7ca6c4f1f267cb
Official cURL example:
Official JSON response:
What matters for your integration:
- status: check for "completed" before attempting to use the URL.
- progress: an integer progress indicator; useful for polling backoff and UX.
- downloads: an array; use the object with type "primary". Its url is the direct download link.
End-to-end: request, wait, fetch URL
The Download endpoint triggers processing and returns an id. You must then wait for at least 30 seconds before calling Get Video Download URL. Many teams implement a simple polling loop with backoff or a fixed wait and a small number of retries, depending on queue times in your workload.
Python example
The sample below performs both steps. It:
- Sends a GET to Download with the video URL and chosen format
- Waits 30 seconds
- Calls Get Video Download URL with the returned id
- Prints the final downloadable URL when available
import time
import urllib.parse
import requests
API_KEY = "YOUR_API_KEY"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}
# 1) Request processing for a specific video and format
video_url = "https://www.youtube.com/watch?v=4iuPJ1pdNkY"
format_value = "720"
download_endpoint = (
"https://zylalabs.com/api/10960/social-media-api-video-download/20671/download"
)
params = {
"download": video_url,
"format": format_value,
}
resp = requests.get(download_endpoint, headers=HEADERS, params=params, timeout=60)
resp.raise_for_status()
data = resp.json()
if not data.get("success"):
raise RuntimeError(f"Download request failed: {data}")
job_id = data.get("id")
title = data.get("title")
fmt = data.get("format")
print(f"Requested: {title} ({fmt}), job id: {job_id}")
# 2) Wait at least 30 seconds before fetching the download URL
time.sleep(30)
poll_endpoint = (
"https://zylalabs.com/api/10960/social-media-api-video-download/20672/get-video-download-url"
)
poll_params = {"getVideo": job_id}
poll_resp = requests.get(poll_endpoint, headers=HEADERS, params=poll_params, timeout=60)
poll_resp.raise_for_status()
poll_data = poll_resp.json()
status = poll_data.get("status")
progress = poll_data.get("progress")
print(f"Status: {status}, progress: {progress}")
downloads = poll_data.get("downloads") or []
primary = next((d for d in downloads if d.get("type") == "primary"), None)
if primary and primary.get("url"):
print(f"Download URL: {primary['url']}")
else:
print("No download URL yet. Try polling again after a short delay.")
Practical integration notes
- Polling cadence: The API notes you must wait 30 seconds after receiving the id. If you need robustness, wait 30–45 seconds, then poll once. If status is not "completed", wait and poll again. The sample response shows progress at 100 when complete.
- Formats: The format parameter accepts entries like 720, 1080, 4k for video quality and mp3, wav, ogg, webm for audio or container choices. Choose based on your storage and playback targets.
- Supported sources: Youtube, Facebook, Instagram, SoundCloud, TikTok, X/Twitter, and Twitch. If you’re building a universal downloader UI, validate the input URL’s domain before sending it to the API.
- Metadata handling: title and thumbnail from the Download response are useful for previews in your UI while processing is underway; cache them with the job id.
- Storage: The Get Video Download URL response returns a direct link in downloads[0].url (where type is "primary"). Save the resulting file to your object storage or hand it to your media pipeline.
- Error handling: If success is false or status indicates the job isn’t ready, avoid tight loops. Apply exponential backoff to reduce unnecessary requests.
- Quotas: Access is via subscription + quota, not pay-per-call. Check your remaining quota in the Zyla dashboard and the API listing; avoid over-polling to conserve quota.
Real-world workflows
Creator upload with URL normalization
When a creator submits a content URL, your backend can:
- Parse and validate the URL domain (must be one of the supported sites).
- Call Download with format=720 for a mobile-friendly baseline.
- Store id, title, and thumbnail and show a “preparing download” status to the user.
- After 30–60 seconds, poll Get Video Download URL and persist the final url into a “ready” state for delivery or further processing.
Audio extracts for transcription or podcasting
If you only need audio, set format to mp3, wav, or ogg. Then run your transcription service or attach the audio to your feed generator. This avoids fetching the full-resolution video file when you only need audio.
Batch ingest for editorial curation
For weekly curation tasks, enqueue video URLs in a job queue. Workers request Download jobs first, then sleep for at least 30 seconds, and finally poll Get Video Download URL to fetch the final link. Persist title and thumbnail for editorial previews.
Calling the API from an AI agent (MCP)
If you prefer to orchestrate calls via an MCP-compatible client (e.g., Claude Code, Cursor, Windsurf), you can route requests through the Zyla MCP endpoint. Provide your key via the query parameter when initializing the MCP connection and call the same Hub URLs shown above with the Authorization header.
Docs and entry point: MCP. This allows AI agents to invoke the exact GET requests you saw earlier, using your Zyla API key for auth, within your agent’s tool execution environment.
How to choose formats and manage timing
- Choosing resolutions: 720 is a strong default for web and mobile. Use 1080 or higher for smart TV apps or editorial masters. If bandwidth is constrained, 360 or 480 reduces transfer size.
- Choosing audio formats: mp3 is widely supported; wav can be convenient for uncompressed pipelines; ogg suits some open-source stacks.
- Timing considerations: The service notes a required wait of 30 seconds after obtaining the id. Processing completes in roughly 30 seconds to 1 minute depending on queue load. Design your workers to handle this delay gracefully.
Security and reliability tips
- Authorization: Always include Authorization: Bearer YOUR_API_KEY on every call. Keep the key in your secret manager.
- URL handling: Use standard URL encoding for the download parameter to avoid truncation of query strings (as in the official cURL).
- Retries: Network calls can fail transiently. Implement limited retries with backoff on 5xx responses or timeouts, especially for the polling step.
- Observability: Log the job id, title, and chosen format when calling Download. When polling, log status and progress to identify slowdowns and queue spikes.
- Storage lifecycle: After you obtain the final URL and store the media, consider expiring the original link in your system and rely on your own storage for downstream serving.
Quick reference: parameters and responses
Download
- HTTP method: GET
- URL: https://zylalabs.com/api/10960/social-media-api-video-download/20671/download
- Required params:
- download: full video URL (e.g., https://www.youtube.com/watch?v=4iuPJ1pdNkY)
- format: desired format or quality (e.g., 720, 1080, 4k, mp3, wav, ogg, webm)
- Auth: Authorization: Bearer YOUR_API_KEY
- Response fields:
- success: boolean
- id: job identifier for the next step
- title: video title
- thumbnail: thumbnail URL
- format: human-readable format descriptor
Get Video Download URL
- HTTP method: GET
- URL: https://zylalabs.com/api/10960/social-media-api-video-download/20672/get-video-download-url
- Required params:
- getVideo: the id from the Download step
- Auth: Authorization: Bearer YOUR_API_KEY
- Behavior: wait 30 seconds before first call; processing usually takes 30–60 seconds.
- Response fields:
- success: boolean
- status: e.g., "completed"
- progress: integer percent
- downloads: array of objects with type, url, and has_ssl
Troubleshooting common issues
- Immediate polling returns no URL: Ensure you waited at least 30 seconds after the Download response. If still incomplete, wait and poll again.
- Unsupported URL: Verify the domain is one of the supported websites (Youtube, Facebook, Instagram, SoundCloud, TikTok, X/Twitter, Twitch). Normalize or validate URLs before sending.
- Incorrect format: Use one of the supported formats exactly as listed (e.g., 720, 1080, 4k, mp3, wav, ogg, webm). Avoid adding file extensions unless specified in the accepted values.
- Quota exceeded: The API is subscription + quota. Monitor usage in your Zyla dashboard and upgrade if necessary.
FAQ
How long should I wait before calling Get Video Download URL?
Wait at least 30 seconds after receiving the id from the Download endpoint. Processing typically completes in 30 seconds to 1 minute depending on queue load.
Which sites are supported?
Youtube, Facebook, Instagram, SoundCloud, TikTok, X/Twitter, and Twitch.
Which formats can I request?
144, 240, 360, 480, 720, 1080, 1440, 4k, mp3, wav, ogg, webm.
What authentication is required?
Use the header Authorization: Bearer YOUR_API_KEY on every request.
Is this pay-per-call?
No. Access is subscription + quota. Check the API page for current access options and pricing.
Ship it
If you’re ready to turn social links into downloadable media today, start with the two endpoints in this guide and wire them into your worker or webhook flow. Create your account and get a key here: Start 7-day trial on Social Media API Video Download API. Then iterate on formats and polling intervals to match your app’s performance goals.