v2.0 · REST API · YouTube Media

YouTube Media
Download API
Built for Developers

One HTTP request. Get a direct audio or video link from any YouTube URL. Sub-second cache hits. Multi-provider fallback. Zero setup.

View API Docs
~/nottyapi — bash
curl -X GET \
"https://api.nottyapi.com/api/audio" \
-G -d "api_key=ntapi_xxxxxxxxxxxx" \
-d "url=https://youtu.be/dQw4w9WgXcQ"
200 OK · 238ms · Content-Type: application/json
{
  "url": "https://api.nottyapi.com/dl/dQw4w9WgXcQ.mp3?api_key=...",
  "video_id": "dQw4w9WgXcQ",
  "type": "audio",
  "cached": true
}
<300ms
Cache Hit Latency
99.9%
Uptime SLA
2+
Fallback Providers
REST · JSON
API Format
₹0
To Start
API Reference

Two endpoints.
That's all you need.

Dead simple. Pass your API key and a YouTube URL — get back a streamable media link.

GET /api/audio
Retrieve a direct streamable audio (MP3) link from any YouTube video URL or video ID.
ParamTypeReqDescription
api_key string YES Your API key
url string one of Full YouTube URL
video_id string one of 11-char YouTube ID
200 OK application/json
{
  "url": "{base}/dl/{id}.mp3?api_key=...",
  "video_id": "dQw4w9WgXcQ",
  "type": "audio",
  "cached": true
}
GET /api/video
Retrieve a direct streamable video (MP4) link from any YouTube video URL or video ID.
ParamTypeReqDescription
api_key string YES Your API key
url string one of Full YouTube URL
video_id string one of 11-char YouTube ID
200 OK application/json
{
  "url": "{base}/dl/{id}.mp4?api_key=...",
  "video_id": "dQw4w9WgXcQ",
  "type": "video",
  "cached": false
}
401 Invalid / missing API key
429 Daily rate limit reached
502 All providers failed
403 Key expired / account banned
Quick Start

Integrate in minutes.

Copy, paste, ship. Pick your language below — full working examples ready to go.

example.sh
# Get audio from YouTube curl -X GET \ "https://api.nottyapi.com/api/audio" \ -G -d "api_key=ntapi_YOUR_API_KEY" \ -d "url=https://youtu.be/dQw4w9WgXcQ" # Get video from YouTube curl -X GET \ "https://api.nottyapi.com/api/video" \ -G -d "api_key=ntapi_YOUR_API_KEY" \ -d "video_id=dQw4w9WgXcQ" # Response: { "url": "...", "video_id": "...", "type": "audio", "cached": true }
notty.py
import requests BASE_URL = "https://api.nottyapi.com/api" API_KEY = "ntapi_YOUR_API_KEY" def get_audio(youtube_url): resp = requests.get( f"{BASE_URL}/audio", params={ "api_key": API_KEY, "url": youtube_url, } ) resp.raise_for_status() return resp.json()["url"] def get_video(video_id): resp = requests.get( f"{BASE_URL}/video", params={ "api_key": API_KEY, "video_id": video_id, } ) resp.raise_for_status() return resp.json()["url"] # Example audio_url = get_audio("https://youtu.be/dQw4w9WgXcQ") print(f"Stream: {audio_url}")
notty.js
const BASE_URL = "https://api.nottyapi.com/api"; const API_KEY = "ntapi_YOUR_API_KEY"; async function getAudio(youtubeUrl) { const params = new URLSearchParams({ api_key: API_KEY, url: youtubeUrl, }); const res = await fetch(`${BASE_URL}/audio?${params}`); if (!res.ok) throw new Error(`HTTP ${res.status}`); const data = await res.json(); return data.url; } async function getVideo(videoId) { const params = new URLSearchParams({ api_key: API_KEY, video_id: videoId, }); const res = await fetch(`${BASE_URL}/video?${params}`); if (!res.ok) throw new Error(`HTTP ${res.status}`); const data = await res.json(); return data.url; } // Example getAudio("https://youtu.be/dQw4w9WgXcQ") .then(url => console.log("Stream URL:", url)) .catch(console.error);
notty.php
<?php define('BASE_URL', 'https://api.nottyapi.com/api'); define('API_KEY', 'ntapi_YOUR_API_KEY'); function notty_get_audio($url) { $params = http_build_query([ 'api_key' => API_KEY, 'url' => $url, ]); $resp = file_get_contents(BASE_URL . "/audio?$params"); $data = json_decode($resp, true); return $data['url']; } function notty_get_video($video_id) { $params = http_build_query([ 'api_key' => API_KEY, 'video_id' => $video_id, ]); $resp = file_get_contents(BASE_URL . "/video?$params"); $data = json_decode($resp, true); return $data['url']; } // Example $audio = notty_get_audio('https://youtu.be/dQw4w9WgXcQ'); echo "Stream URL: $audio\n";
Why Notty API

Production-grade.
Developer-first.

Everything you need to build reliable YouTube media features into your app.

Sub-second Cache Hits
Cached responses return in under 300ms via our Telegram-backed media cache with streaming CDN delivery.
🔄
Multi-Provider Fallback
Two independent download providers in series. If one fails, the next kicks in — zero downtime for your users.
🔐
Scoped API Keys
Create multiple keys with per-key rate limits. Revoke, rotate, or restrict any key instantly from your dashboard.
📊
Request Analytics
See every request: endpoint, video ID, latency, cache status, and timestamp. Debug production issues in seconds.
🌙
IST Daily Reset
Rate limits reset at midnight India time — predictable, consistent, aligned with your users' day.
🔗
Streamable URLs
Every response URL supports Range headers — works directly in <audio>, <video> tags and media players.
Integration Guide

Ship in under
5 minutes.

Three steps. No SDK. No configuration. Just HTTP.

1
Create your free account
Sign up with email. No credit card. Under 30 seconds.
2
Generate an API key
Dashboard → API Keys → Create. Your key looks like this:
ntapi_xxxxxxxxxxxxxxxxxxxxxxxx
3
Make your first request
Call /api/audio or /api/video with your key and any YouTube URL. Get back a streamable link in milliseconds.
4
Use the URL anywhere
Drop it into an <audio src="...">, pass it to ffmpeg, or send it to your users. The URL is permanent while cached.
// live playground
Test the API live
Paste your API key and a YouTube link — see the real JSON response instantly.
nottyapi — playground
api_key
YouTube URL
Response · 200 OK
Open →
Guest usage: 0 / 5  ·  Sign up free for your own key
Pricing

Start free.
Scale when ready.

No surprise charges. Upgrade only when you need more — cancel anytime.

Start building
in seconds.

Free API key. No credit card. Your first 10 requests/day are on us — forever.

Read the Docs