You have a video ID and need to integrate a video download service without guessing its request format. This guide shows how to call the YouTube Downloader API, inspect its response, and handle the details you need before building a download workflow. The published response excerpt contains video metadata, but it does not show a video file or download URL.
What the endpoint does
The YouTube Downloader API provides a Download Video endpoint. It accepts a video ID and a required cgeo value, then returns a JSON response; the published example includes a title, duration, channel information, thumbnails, and availability information.
A media application could use those fields to present a video for review before a user takes further action. The excerpt does not establish how to retrieve the video bytes, so verify the complete response and download procedure on the API page before promising file downloads in your application.
Getting started on Zyla API Hub
Open the YouTube Downloader API listing on Zyla API Hub, create a free account if needed, and select Subscribe or Start Free Trial when available. Get your API key and use it as a bearer token in requests to the Hub endpoint.
Zyla’s catalog contains more than 10,000 public APIs. Access uses a subscription and quota model, not pay-per-call billing. For a first API, the stated trial is seven days or 50 requests; check the API page for current access options and pricing.
Call Download Video
The available endpoint uses GET and takes the following required query parameters:
id: the video ID. The listing request usesnqlH7B7MxI4.cgeo: a required string. The listing request usesDE.
The request URL is https://zylalabs.com/api/4105/youtube-downloader-api/5876/download-video. Send the Hub API key in the Authorization header, replacing YOUR_API_KEY with your own key:
curl -s -X GET "https://zylalabs.com/api/4105/youtube-downloader-api/5876/download-video?id=nqlH7B7MxI4&cgeo=DE" \
-H "Authorization: Bearer YOUR_API_KEY"
Published response excerpt
The following is the published response excerpt. It is truncated inside availableCountries, so it is not a complete JSON document to copy into a parser.
{"status":"OK","id":"1wYNFfgrXTI","title":"Eminem - When I'm Gone (Official Music Video)","lengthSeconds":"369","keywords":["EMINEM","EMINEM WHEN I\u2019M GONE","WHEN I\u2019M GONE","WHEN I\u2019M GONE EMINEM","WHEN I\u2019M GONE official music video","WHEN I\u2019M GONE remastered video","EMINEM remastered","EMINEM remastered videos","#remastered","hd music videos","remastered music videos","SLIM SHADY","\ud55c\uae00\uc790\ub9c9","\u65e5\u672c\u8a9e\u5b57\u5e55","subt\u00edtulos en espa\u00f1ol","T\u00fcrk\u00e7e Altyaz\u0131l\u0131","Ph\u1ee5 \u0111\u1ec1 ti\u1ebfng Vi\u1ec7t","Subtitles in Tagalog","Teks dalam Bahasa Indonesia","\u0909\u092a\u0936\u0940\u0930\u094d\u0937\u0915 \u0939\u093f\u0902\u0926\u0940 \u092e\u0947\u0902","Sarikata Dalam Bahasa Malaysia","\u0e04\u0e33\u0e1a\u0e23\u0e23\u0e22\u0e32\u0e22\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22","\uc5d0\ubbf8\ub134"],"channelTitle":"EminemVEVO","channelId":"UC20vb-R_px4CguHzzBPhoyQ","description":"REMASTERED IN HD!\nPlaylist Best of Eminem: https:\/\/goo.gl\/AquNpo\nSubscribe for more: https:\/\/goo.gl\/DxCrDV\n\nMusic video by Eminem performing When I'm Gone. (C) 2005 Aftermath Entertainment\/Interscope Records\n\n#Eminem #WhenImGone #Remastered #HipHop","thumbnail":[{"url":"https:\/\/i.ytimg.com\/vi\/1wYNFfgrXTI\/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLCnIsU52XXk2PVh8g9VP9Tk4-plZA","width":168,"height":94},{"url":"https:\/\/i.ytimg.com\/vi\/1wYNFfgrXTI\/hqdefault.jpg?sqp=-oaymwEbCMQBEG5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLBfSJ40mfsVIrojskM6xKE7v8nvSg","width":196,"height":110},{"url":"https:\/\/i.ytimg.com\/vi\/1wYNFfgrXTI\/hqdefault.jpg?sqp=-oaymwEcCPYBEIoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLBYiLd2BKwRk9Q6USNn0SLbtIiSGQ","width":246,"height":138},{"url":"https:\/\/i.ytimg.com\/vi\/1wYNFfgrXTI\/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLCS8ttGC-rVNpELcxJs-KSX9SeD4Q","width":336,"height":188},{"url":"https:\/\/i.ytimg.com\/vi_webp\/1wYNFfgrXTI\/maxresdefault.webp","width":1920,"height":1080}],"allowRatings":true,"viewCount":null,"isPrivate":false,"isUnpluggedCorpus":false,"isLiveContent":false,"isFamilySafe":true,"availableCountries":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","…
Use title and channelTitle to identify the video in a review screen. In this example, lengthSeconds is a string containing seconds, thumbnail contains image URLs and dimensions, and viewCount is null. Treat thumbnail URLs as images, not video download links.
There is an important discrepancy: the request’s id is nqlH7B7MxI4, while the response excerpt’s id is 1wYNFfgrXTI. Do not assume this excerpt is the output of that exact request. Inspect a live response and verify the returned video before using it in a workflow.
Read a response in Python
This example calls the same Hub URL using Python’s standard library and reads the fields shown in the excerpt. Replace the key before running it; the code expects a complete JSON response from the live endpoint, not the truncated excerpt above.
import json
from urllib.error import HTTPError, URLError
from urllib.request import Request, urlopen
url = (
"https://zylalabs.com/api/4105/youtube-downloader-api/"
"5876/download-video?id=nqlH7B7MxI4&cgeo=DE"
)
request = Request(
url,
headers={"Authorization": "Bearer YOUR_API_KEY"},
method="GET",
)
try:
with urlopen(request, timeout=30) as response:
data = json.load(response)
except HTTPError as error:
raise SystemExit(f"API request failed with HTTP status {error.code}")
except URLError as error:
raise SystemExit(f"Could not reach the API: {error.reason}")
except (json.JSONDecodeError, UnicodeDecodeError) as error:
raise SystemExit(f"Could not read the response as JSON: {error}")
print("Status:", data.get("status"))
print("Video ID:", data.get("id"))
print("Title:", data.get("title"))
print("Channel:", data.get("channelTitle"))
print("Length in seconds:", data.get("lengthSeconds"))
print("Thumbnails:", data.get("thumbnail"))
The sample uses get so an absent field does not immediately raise a key error. In an application, check the returned status and video ID before presenting the result as the requested video. Handle an absent or non-numeric duration before converting it for display.
Build a practical workflow
For a content review tool, accept a video ID, call Download Video with both required parameters, and show the returned title, channel, duration, and an appropriately sized thumbnail. Let the user confirm the result before taking a subsequent action, especially because the published request and response examples identify different videos.
For a media management application, retain the video ID alongside any metadata you choose to display. The excerpt includes privacy, live-content, and family-safety flags, but it does not establish that any of those fields grants permission to download or redistribute a video. Check the applicable rights and platform terms for your use case.
Budget requests against your subscription quota rather than treating each call as a separate purchase. If you cache metadata, choose a refresh policy appropriate for your application: titles, availability, and other video details can change. Do not cache the API key with publicly visible response data or expose it in browser code.
To use the API from Claude Code, Cursor, Windsurf, or another compatible agent client, configure the MCP endpoint with your Hub key: https://mcp.zylalabs.com/mcp?apikey=YOUR_API_KEY. Give the agent the video ID and required cgeo value, and review the returned data before acting on it. Treat the configured endpoint URL as a secret because it contains your key.
FAQ
Does the example download a video file?
No. The curl and Python examples call the Download Video endpoint and inspect its JSON response. The published excerpt does not show a video file or a download URL, so check the complete endpoint documentation and live response for the next step.
Which parameters are required?
Both id and cgeo are required strings. The example uses nqlH7B7MxI4 and DE, respectively.
Why does the response show a different video ID?
The published response excerpt contains a different ID from the published request. Verify the ID in your actual response rather than assuming the two examples describe the same video.
Is the API billed per call?
Access uses a subscription and quota model. Check the listing for current access options and pricing before choosing a plan.
Ready to test with your own key? Create a free Zyla account and Start 7-day trial on YouTube Downloader API. Review the listing’s current trial terms, get your API key, and inspect a live response before implementing the file-download step.