You need to turn a YouTube Shorts link into a downloadable 720p file, reliably, by the end of the week. By the time you finish this guide, you’ll trigger a download job from a Shorts URL, poll for completion, and fetch a time-limited download_url you can hand to your app or your users.
What this API does and when to use it
The YouTube Premium Download API on Zyla API Hub converts an official YouTube /shorts/ URL into a downloadable file job. You hand it a Shorts URL and request format=720; the API creates a job, gives you a progress_url to poll, and returns a download_url once processing is complete. It also provides basic metadata like a thumbnail, and there’s an information path for title/duration when you need details about the content.
Typical uses:
- Server-side video ingestion pipelines that need a consistent 720p asset.
- Internal tools to archive Shorts for analysis, moderation, or creative workflows.
- Agentic workflows where an MCP-compatible IDE/tool triggers a download and hands back a link.
Important constraints you should design for:
- Provide the official Shorts URL (for example, https://www.youtube.com/shorts/f1HbBexbLtc) and request format=720.
- Poll every 3–5 seconds until the reported progress reaches 1000. That’s the ready state.
- Signed download links expire in about two hours. Fetch and use them promptly, or regenerate by re-polling and re-downloading.
- Live streams are not supported.
Getting started on Zyla API Hub
Zyla API Hub hosts more than 10,000 public APIs under one account and API key. You subscribe per listing. There is no free plan, but your first Hub API includes a 7-day free trial (up to 50 requests). To begin:
- Open the YouTube Premium Download API page on Zyla: YouTube Premium Download API on Zyla.
- Click Subscribe (or Start Free Trial if available) and get your Bearer API key.
- You can manage your account and other APIs anytime at zylalabs.com.
Endpoints you will use
The download workflow centers on the Downloader path of the YouTube Premium Download API. From the listing, use the Downloader docs to trigger a job with the Shorts URL and format=720:
- Docs for the Downloader: Downloader
High-level behavior:
- You call the Downloader with the official Shorts URL and set format=720.
- The API responds with a JSON payload that includes:
- job id: the server-side job identifier.
- thumbnail: a thumbnail URL representing the video.
- progress_url: a URL you poll every 3–5 seconds.
- Poll progress_url until progress reaches 1000.
- When progress is 1000, the payload includes a download_url to fetch the file.
There is also a path that provides basic info such as title and duration. Use it when your UX needs to render context before the download finishes. If you don’t need the metadata, go straight to Downloader.
A complete Shorts-to-720p flow
Below is an official example that takes the Shorts URL https://www.youtube.com/shorts/f1HbBexbLtc with format=720, starts a job, and shows you how to poll and download. Copy this as-is and replace YOUR_API_KEY with your key from Zyla. The curl call and JSON response come directly from the API’s documentation.
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://zylalabs.com/api/13563/youtube-premium-download-api/30203/downloader?url=https://www.youtube.com/shorts/f1HbBexbLtc&format=720"
What the JSON tells you (fields you’ll actually use):
- job id: useful for logging or correlating retries on your side.
- thumbnail: a quick way to show the user which Short is being processed.
- progress_url: the URL you poll every 3–5 seconds. Keep polling until progress is 1000.
- progress: the integer progress indicator (0 to 1000). Treat anything under 1000 as not-ready.
- download_url: present when progress is 1000. This is a signed link that expires in about two hours.
Error handling tips:
- If the API returns success=false or omits expected fields, log the job id (if present) and back off. Many transient errors resolve by retrying the poll within the 3–5s cadence.
- If progress reaches 1000 but download_url is missing, poll once more. Signed URLs can be late by a beat.
- If the download fails due to link expiration, re-poll progress_url to get a fresh download_url.
One flow, two places to plug in
You can trigger the job directly from your backend or from an MCP-compatible agent that calls APIs for you. The underlying sequence is the same: trigger Downloader with a Shorts URL + format=720, poll progress_url to 1000, use download_url within ~2 hours.
Go live in four steps
- Register (Register) — your first Hub API includes a 7-day trial (up to 50 requests).
- Copy your Bearer key and subscribe on the listing.
- Call Downloader (Downloader) with a Shorts URL and format=720.
- Poll progress_url every 3–5 seconds until progress is 1000, then fetch download_url.
Python snippet: poll the progress_url and fetch the file
The official example above shows how to kick off the job. The code below focuses on the second stage: polling the progress_url and downloading when ready. It makes no assumptions about undocumented parameters—just consumes the URLs and fields returned by the API.
import time
import requests
def poll_progress(progress_url, headers=None, interval_seconds=4, timeout_seconds=300):
"""
Poll progress_url every interval_seconds until progress == 1000 or timeout.
Returns the latest JSON payload.
"""
start = time.time()
while True:
resp = requests.get(progress_url, headers=headers or {})
resp.raise_for_status()
data = resp.json()
# Defensive checks: progress and download_url may not always be present
prog = data.get("progress")
if isinstance(prog, int) and prog >= 1000:
return data
if time.time() - start > timeout_seconds:
raise TimeoutError(f"Timed out waiting for job. Last payload: {data}")
time.sleep(interval_seconds)
def download_file(url, dest_path, headers=None):
with requests.get(url, headers=headers or {}, stream=True) as r:
r.raise_for_status()
with open(dest_path, "wb") as f:
for chunk in r.iter_content(chunk_size=8192):
if chunk:
f.write(chunk)
# Usage:
# 1) Kick off the job using the API call from the official example (above), capturing 'progress_url'.
# 2) Then:
# progress_payload = poll_progress(progress_url, headers={"Authorization": "Bearer YOUR_API_KEY"})
# download_url = progress_payload.get("download_url")
# if not download_url:
# raise RuntimeError("download_url missing even though progress reached 1000.")
# download_file(download_url, "short-720p.mp4")
Notes:
- Use a 3–5 second polling interval to balance latency and server load.
- Set a reasonable timeout for your use case, and log the entire payload on timeout to aid debugging.
- If you have multiple concurrent downloads, respect your infrastructure’s bandwidth and file I/O limits.
Real-world tips that save time
- Always pass the official Shorts URL. Using a watch?v= style URL for Shorts can yield different behavior; stick to the /shorts/ form like https://www.youtube.com/shorts/f1HbBexbLtc.
- Request format=720 explicitly when starting the job if you need 720p output.
- Do not cache the download_url long-term; it expires in about two hours. If a client needs to re-download later, re-poll and fetch a fresh URL.
- Back off during polling if you see intermittent network errors. A fixed 4-second interval is a good baseline.
- Use the basic info path (title/duration) when you need to render UI before download is ready. If you don’t need metadata, skip it.
- Exclude live streams from your queue—live content is not supported by this downloader.
Calling the API from an AI agent via MCP
If you prefer to run this flow from an AI-enabled IDE or an agent, the Zyla MCP endpoint lets MCP-compatible clients call subscribed APIs with your key. It works with Claude Code, Cursor, Windsurf, and other MCP clients.
- MCP endpoint: MCP
How to use it:
- Configure your client to call the MCP endpoint with apikey=YOUR_API_KEY.
- Invoke the YouTube Premium Download API’s Downloader with the Shorts URL and format=720.
- Poll the progress_url until progress is 1000, then fetch the download_url within two hours.
This is the same workflow as the direct HTTP path, just routed through an MCP-compatible runtime so your agent can orchestrate it in-context.
Testing checklist before you ship
- Run a full end-to-end test with the official example Shorts URL and confirm a valid 720p file downloads.
- Verify your UI shows the thumbnail and a “processing” state while progress is under 1000.
- Assert that you handle success=false or missing fields by retrying poll cycles and logging job ids.
- Simulate an expired link by waiting past two hours; ensure your retry path re-polls and fetches a new download_url.
- Ensure your server enforces reasonable concurrency limits for simultaneous downloads.
Where to find everything
- API listing: YouTube Premium Download API
- Downloader docs: Downloader
- Zyla homepage: zylalabs.com
FAQ
Does this work for any YouTube URL?
Use the official Shorts URL (the /shorts/ form). The documented example uses https://www.youtube.com/shorts/f1HbBexbLtc with format=720.
When should I stop polling?
Stop when the progress value reaches 1000. Poll every 3–5 seconds until then, and then use the download_url.
How long does the download_url remain valid?
Signed links expire in about two hours. If it expires, re-poll progress_url to fetch a fresh download_url.
Are live streams supported?
No. Live streams are not supported by this downloader.
Is there a free plan?
There is no free plan. Your first Hub API includes a 7-day free trial (up to 50 requests). Check the API page for current access options and pricing.
Ready to ship your Shorts-to-720p integration? Create a free account, subscribe to the YouTube Premium Download API, and get your key today: Register. You can also orchestrate calls from an MCP-compatible client using the endpoint above to keep the entire flow inside your agent’s workspace.