YouTube Video Downloader API - Developed by Mohammad Alamin (anbuinfosec)
This API allows you to download YouTube videos by providing a YouTube URL.
{
"url": "https://www.youtube.com/watch?v=VIDEO_ID"
}| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Required | Valid YouTube URL |
{
"title": "Video Title",
"thumbnail": "https://img.youtube.com/vi/VIDEO_ID/maxresdefault.jpg",
"duration": "3:45",
"views": "1.2M views",
"downloadLinks": [
{
"quality": "720p",
"format": "MP4",
"size": "25.4 MB",
"url": "https://download-link.com/video.mp4"
},
{
"quality": "480p",
"format": "MP4",
"size": "15.2 MB",
"url": "https://download-link.com/video-480p.mp4"
}
]
}{
"error": "URL is required"
}{
"error": "Video not found or unavailable for download."
}{
"error": "Too many requests. Please try again later."
}{
"error": "Failed to process video. Please try again."
}const response = await fetch('/api/download', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'
})
});
const data = await response.json();
console.log(data);curl -X POST /api/download \
-H "Content-Type: application/json" \
-d '{"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}'Developed by: Mohammad Alamin (anbuinfosec)