yt-dlp API Alternative
yt-dlp is a command-line program with no hosted API: to get an HTTP endpoint, you wrap it in your own server and keep it updated. If your product only needs public Instagram, TikTok, X, Pinterest and Telegram links, this hosted REST API does the job with one POST. If you need YouTube or the long list of other sites yt-dlp supports, keep yt-dlp.
No card needed. Failed requests cost nothing.

Key facts
- Endpoint
- POST /v1/resolve (one endpoint for every service)
- Free trial
- 20 result credits after email verification, no card
- Price
- from $19 for 7,500 results ($1.33–$2.53 per 1,000)
- Billing
- prepaid credits, no subscription, no expiry; failed or empty requests cost 0
- Credits per result
- 1 (Instagram, TikTok, X, Pinterest) or 2 (Stories, Highlights, Telegram)
- Limits
- up to 20 items per request; 120 requests per minute per account; 2 in progress at once on the trial, 8 on paid accounts
yt-dlp and this API side by side
| yt-dlp behind your server | GetInSaver API | |
|---|---|---|
| What it is | “A feature-rich command-line audio/video downloader”, free and open source | Hosted REST API |
| Sites | “Thousands of sites”, YouTube included | Instagram, TikTok, X, Pinterest, Telegram |
| HTTP endpoint | You build and host it | Ready: POST /v1/resolve |
| Updates | Yours. Its README says the latest stable release is often “stale” and prone to external breakage | Ours |
| Formats | You choose format and quality | You get the file the source provides |
| Login-only content | You supply cookies | Not supported: public content only |
| Cost | Free software. Your server, bandwidth and upkeep. | 20 free results, then prepaid from $19. Failed requests cost nothing. |
What a yt-dlp API server needs
The command is one line. Running it for other people takes more:
- A queue, so slow downloads do not block your web workers.
- ffmpeg, for formats that need merging.
- Disk cleanup for the files you produce.
- Frequent updates, because platforms change.
- Network addresses the platforms do not refuse.
- API keys, rate limits and error handling, if anyone else calls it.
Open-source wrappers such as ytdl-server give you the REST part. You still host them. We run these parts for the free GetInSaver site, which delivers thousands of downloads a day, and this API uses the same engine.
yt-dlp options and what replaces them
| yt-dlp | This API |
|---|---|
yt-dlp -g LINK (print the media URL) | items[].url |
yt-dlp -J LINK (JSON about the media) | The response: items, metadata with title, author and caption |
-o (save to a file) | Download items[].url yourself, right away |
-f (choose a format) | No such option |
--cookies (log in) | Not needed: public content only |
Python: replacing the yt-dlp call
A complete client with retries and file saving. It needs only requests.
# pip install requests
import mimetypes, os, time
import requests
API_URL = "https://developers.getinsaver.com/v1/resolve"
API_KEY = os.environ["GIS_KEY"] # keep the key on your server, never in a browser
def resolve(service, url, max_results=10, retries=3):
"""Turn a public link into media items: [{"type": "video", "url": ...}]."""
for attempt in range(retries + 1):
response = requests.post(
API_URL,
headers={"Authorization": f"Bearer {API_KEY}"},
json={"service": service, "url": url, "max_results": max_results},
timeout=130,
)
data = response.json()
if response.ok:
return data
# 429 = rate or concurrency limit, 502/504 = platform hiccup; none of them is charged
if response.status_code in (429, 502, 504) and attempt < retries:
time.sleep(int(response.headers.get("Retry-After", 5)))
continue
raise RuntimeError(f"{data['code']}: {data['message']}")
def download(item, name, folder="downloads"):
"""Media URLs expire within minutes to hours, so save the file right away."""
os.makedirs(folder, exist_ok=True)
with requests.get(item["url"], stream=True, timeout=120) as media:
media.raise_for_status()
kind = media.headers.get("Content-Type", "").split(";")[0]
path = os.path.join(folder, name + (mimetypes.guess_extension(kind) or ".bin"))
with open(path, "wb") as f:
for chunk in media.iter_content(chunk_size=65536):
f.write(chunk)
return path
if __name__ == "__main__":
# TikTok works the same way: resolve("tiktok", "https://www.tiktok.com/@user/video/123...")
result = resolve("instagram", "https://www.instagram.com/reel/SHORTCODE/")
print(f"{result['item_count']} items, {result['credits_used']} credits")
for i, item in enumerate(result["items"]):
print(item["type"], download(item, f"{result['request_id']}-{i}"))Which one to use
- Keep yt-dlp for YouTube, for sites outside the list above, for format control, and when you have a server and time to maintain it.
- Use this API when your product takes public social media links and you would rather not run downloaders in production.
- Use both if you like: this API for the social platforms and yt-dlp for everything else.
Errors
| HTTP | Code | What to do |
|---|---|---|
| 402 | INSUFFICIENT_CREDITS | Top up, or lower max_results: a request reserves max_results times the credits per result first. |
| 422 | UPSTREAM_REJECTED | The post is private, deleted, expired or login-only. Show the message to your user. Nothing was charged. |
| 429 | RATE_LIMITED, CONCURRENCY_LIMIT | Wait for Retry-After seconds and retry. 120 requests per minute per account; 2 at once on the trial, 8 after buying credits. |
| 502, 504 | UPSTREAM_* | Temporary platform failure. Safe to retry. Nothing was charged. |
Every error body is JSON with a stable code and a readable message. The API reference has the full list.
FAQ
Does yt-dlp have an official API?
It has no hosted HTTP API. It is a command-line program, and it can be embedded in Python. Its README advises against parsing its normal output from your own program.
Can I run yt-dlp as an API server?
Yes, with your own code or an open-source wrapper such as ytdl-server. You host it, update it and handle the queue, storage and network yourself.
Does this API support YouTube?
No. For YouTube, keep yt-dlp.
Is this API free like yt-dlp?
No. You get 20 free results to test it, then prepaid credits from $19. yt-dlp is free software, and you pay for what it runs on.
Do I choose the video quality?
No. There is no format option: you get the file the source provides.
Related
Updated 2026-11-04. The code on this page is run by our test suite against the API server before every release.
Make your first call in five minutes
20 free results when you verify your email. No card needed.
Create a free account