Home / Blog / Video downloader API
Building a bot, an archiving tool, or an offline-first app? This free video downloader API turns any YouTube, TikTok, or Instagram URL into direct MP4 download links with a single GET request — no signup, no API key, no SDK. Tested live below with real requests and responses.
Endpoint: GET https://ahm7xmakki.com/api/alldl?url=VIDEO_URL
Returns: JSON with a links array of direct download URLs
Auth: none. Playground: ahm7xmakki.com/alldl
URL-encode the video link and pass it as the url parameter:
curl "https://ahm7xmakki.com/api/alldl?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ"
A successful response looks like this:
{
"success": true,
"links": [
"https://.../video_720p.mp4",
"https://.../video_360p.mp4"
]
}
Pick the quality you want from links and download it like any file:
# Get the first (usually best-quality) link with jq
URL=$(curl -s "https://ahm7xmakki.com/api/alldl?url=VIDEO_URL" | jq -r '.links[0]')
curl -L "$URL" -o video.mp4
async function getDownloadLinks(videoUrl) {
const api = "https://ahm7xmakki.com/api/alldl?url=" + encodeURIComponent(videoUrl);
const res = await fetch(api);
const data = await res.json();
if (!data.success || !data.links?.length) {
throw new Error(data.message || "No links found");
}
return data.links; // array of direct MP4 URLs
}
// Example: render download buttons
const links = await getDownloadLinks("https://www.tiktok.com/@user/video/123");
links.forEach((l, i) => {
const a = document.createElement("a");
a.href = l; a.textContent = `Download option ${i + 1}`;
a.download = ""; document.body.appendChild(a);
});
import requests, urllib.parse
def download_video(page_url, out="video.mp4", quality=0):
api = "https://ahm7xmakki.com/api/alldl?url=" + urllib.parse.quote(page_url, safe="")
data = requests.get(api, timeout=60).json()
if not data.get("success") or not data.get("links"):
raise RuntimeError(data.get("message", "No download links"))
direct = data["links"][quality]
with requests.get(direct, stream=True, timeout=120) as r:
r.raise_for_status()
with open(out, "wb") as f:
for chunk in r.iter_content(1024 * 256):
f.write(chunk)
return out
download_video("https://www.instagram.com/reel/ABC123/")
| Platform | Example URL pattern | Notes |
|---|---|---|
| YouTube | youtube.com/watch?v=… | Multiple qualities returned |
| TikTok | tiktok.com/@user/video/… | Watermark-free where available |
instagram.com/reel/… | Reels and posts | |
| 100+ others | Various | See the playground for the full list |
If a URL can't be resolved, you get success: false with a human-readable message — for example, an invalid or private video URL:
{
"success": false,
"message": "Url parsing is failed! Please check url.",
"links": []
}
Always check success before using links. Common causes: private/deleted videos, geo-blocked content, or a malformed URL (remember to URL-encode it).
Users send a link, the bot replies with the direct MP4. The whole backend is one API call — no yt-dlp server to maintain.
Pre-download videos for flights, commutes, or low-bandwidth regions. Queue links overnight, download on Wi-Fi.
Researchers and journalists archive public videos before they disappear. Automate it with a cron job and the Python snippet above.
Pull source clips programmatically, then process with ffmpeg — trim, watermark, or re-encode without manual downloads.
This is a shared free service with per-IP rate limits (a 429 means slow down and retry). For batch jobs, add a few seconds of delay between requests and cache results — don't re-resolve the same URL twice.
The most popular use of this API is a chat bot: user sends a link, bot replies with the video. Here's the core logic in Python with python-telegram-bot:
import urllib.parse, requests
from telegram import Update
from telegram.ext import Application, MessageHandler, filters, ContextTypes
API = "https://ahm7xmakki.com/api/alldl?url="
async def handle_link(update: Update, ctx: ContextTypes.DEFAULT_TYPE):
text = (update.message.text or "").strip()
if not text.startswith("http"):
return
msg = await update.message.reply_text("Resolving...")
try:
data = requests.get(API + urllib.parse.quote(text, safe=""),
timeout=60).json()
if not data.get("success") or not data.get("links"):
await msg.edit_text("Couldn't resolve that link: "
+ data.get("message", "unknown error"))
return
# Send the best-quality link as a video
await update.message.reply_video(video=data["links"][0])
await msg.delete()
except Exception as e:
await msg.edit_text("Error: " + str(e))
app = Application.builder().token("YOUR_BOT_TOKEN").build()
app.add_handler(MessageHandler(filters.TEXT & ~filters.COMMAND, handle_link))
app.run_polling()
Swap in the python-telegram-bot token and you have a working downloader bot in under 40 lines.
Need many videos? Resolve each URL, collect the direct links, then download with aria2c for parallel speed:
# urls.txt: one video page URL per line
while read -r page; do
curl -s "https://ahm7xmakki.com/api/alldl?url=$(python3 -c "import urllib.parse,sys;print(urllib.parse.quote(sys.argv[1],safe=''))" "$page")" \
| python3 -c "import sys,json;print(json.load(sys.stdin)['links'][0])"
sleep 3 # be nice to the free API
done < urls.txt > direct.txt
aria2c -x 4 -j 4 -i direct.txt -d ./videos
The classic approach is running yt-dlp on your own server. That gives you maximum control and no third-party dependency — but you also own the maintenance: updates when sites change their players, IP blocks, cookies for age-restricted content, and storage for the tool itself. The API offloads all of that. A pragmatic middle ground: use the API for the 95% of links that resolve cleanly, and fall back to a local yt-dlp worker for the tricky remainder.
Why do I get "Url parsing is failed"? The video URL is invalid, private, deleted, or geo-blocked — or you forgot to URL-encode it. Double-check the link opens in a browser first.
Are the links permanent? No — direct links expire. Resolve the page URL fresh each time you need to download; don't store links[] for later.
Can I get audio-only? The links array contains the available formats the source site exposes. If an audio-only stream exists, it will typically be among the options.
Does it work for live streams? Live and premiere URLs are unreliable — stick to published, on-demand videos.
Paste any video URL into the playground and get links instantly:
Want more no-signup tools? See the 10 best free APIs roundup or browse the full API docs.