Back to Downloader

API Documentation

YouTube Video Downloader API - Developed by Mohammad Alamin (anbuinfosec)

Overview

This API allows you to download YouTube videos by providing a YouTube URL.

REST API
JSON Response
CORS Enabled
Endpoint
POST
/api/download
Request Format
Send a POST request with the following JSON body
{
  "url": "https://www.youtube.com/watch?v=VIDEO_ID"
}

Parameters:

ParameterTypeRequiredDescription
urlstring
Required
Valid YouTube URL
Response Format
Successful response returns video information and download links
{
  "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 Responses

400 Bad Request

{
  "error": "URL is required"
}

404 Not Found

{
  "error": "Video not found or unavailable for download."
}

429 Too Many Requests

{
  "error": "Too many requests. Please try again later."
}

500 Internal Server Error

{
  "error": "Failed to process video. Please try again."
}
Example Usage

JavaScript/Fetch

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

curl -X POST /api/download \
  -H "Content-Type: application/json" \
  -d '{"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}'
Rate Limits & Notes
  • • Only public YouTube videos can be downloaded
  • • Age-restricted or private videos may not be accessible
  • • Download links are temporary and may expire
  • • Respect YouTube's Terms of Service when using this API
Developer Information

Developed by: Mohammad Alamin (anbuinfosec)