Skip to content

YouTube Downloader API

A YouTube downloader API lets your app, bot, or backend turn a YouTube link into a ready-to-use download URL — no browser automation and no local conversion. This guide shows how to do it in a single request with the Tunelio API.

What a YouTube downloader API does

Instead of scraping pages or running a heavy local extractor, you send a YouTube URL to an endpoint and receive a direct, signed CDN URL for the file. Your servers stay light, and responses come back in one round trip — there is no job ID to track and no status endpoint to poll.

Tunelio exposes exactly two endpoints. GET /info inspects a video and lists every available format with its exact file size; GET /create returns a direct download URL for the quality you pick. That keeps the integration small enough to read in one sitting.

Authentication

Every request carries your API key as a Bearer token. New accounts get 100 free credits, and you can create a key in about a minute through the Telegram bot — no email or card required.

Authorization: Bearer tnl_your_api_key

Quick start

First inspect the video to see which formats are available, then request a direct URL for the quality you want. Here is the full flow with cURL:

# 1. List available formats (6 credits)
curl "https://tunelio.dev/info?url=https://youtu.be/dQw4w9WgXcQ" \
  -H "Authorization: Bearer tnl_your_api_key"

# 2. Get a direct download URL for 1080p (10 credits)
curl "https://tunelio.dev/create?url=https://youtu.be/dQw4w9WgXcQ&quality=1080p" \
  -H "Authorization: Bearer tnl_your_api_key"

The /create response includes a url field — a signed CDN link you can hand straight to your user or stream to storage. It stays valid for several hours.

Python

import os, requests

H = {"Authorization": f"Bearer {os.environ['TUNELIO_KEY']}"}

info = requests.get(
    "https://tunelio.dev/info",
    params={"url": "https://youtu.be/dQw4w9WgXcQ"},
    headers=H,
).json()
print(info["formats"][0]["quality"])  # e.g. "1080p"

dl = requests.get(
    "https://tunelio.dev/create",
    params={"url": "https://youtu.be/dQw4w9WgXcQ", "quality": "1080p"},
    headers=H,
).json()
print(dl["url"])  # direct CDN download URL

Choosing quality and format

The quality parameter accepts a video label such as 144p, 240p, 360p, 480p, 720p, or 1080p — and 2160p (4K) on the Mega plan. Pass quality=mp3 instead to get an audio-only MP3 file. Because GET /info reports the exact byte size of every format up front, you can show users a size before they commit to a download.

Pricing and credits

Each call to /info costs 6 credits and each /create costs 10; the actual file download through the returned URL is free. Plans run from a free 100-credit trial to Pro ($9/mo, 100,000 credits), Ultra ($39/mo, 500,000 credits), and Mega ($99/mo, 1.5M credits with 4K MP4).

Next steps

That is the whole API. Read the full reference for response fields, error codes, and rate limits, then grab your free credits and make your first call.

Frequently asked questions

Is there a free YouTube downloader API?

Yes — Tunelio gives every new account 100 free credits on signup, enough to test both endpoints before choosing a plan.

Which formats does the API support?

MP4 video from 144p up to 4K (2160p on the Mega plan) and MP3 audio. GET /info lists every available format for a given video with its exact file size.

Do I have to poll for the download to finish?

No. GET /create returns a direct, signed CDN URL in the response body immediately — there are no job IDs, status endpoints, or webhooks.

Related guides