Skip to content

YouTube Downloader

This API allows you to seamlessly search YouTube and extract direct, high-quality audio (MP3) or video (MP4) download links.

POST /api/v1/youtube

The following parameters are accepted in the request body:

FieldTypeRequiredDescription
typestringYesThe action to perform. Valid options: search, ytmp3, ytmp4, play.
querystringConditionalRequired if type is search or play. The search term.
urlstringConditionalRequired if type is ytmp3 or ytmp4. The target YouTube video URL.
formatstringOptionalUsed only with play. The desired format: mp3 or mp4 (Default: mp3).
Terminal window
curl -X POST https://heavstal.com.ng/api/v1/youtube \
-H "Content-Type: application/json" \
-H "x-api-key: <YOUR_API_KEY>" \
-d '{"type": "play", "query": "Alan Walker Faded", "format": "mp3"}'
{
"status": "success",
"creator": "HEAVSTAL TECH",
"data": {
"author": "Heavstal Tech™",
"title": "Alan Walker - Faded",
"thumbnail": "https://i.ytimg.com/vi/60ItHLz5WEA/maxresdefault.jpg",
"channel": "Alan Walker",
"published": "2015-12-03",
"views": 3574921000,
"duration": 213,
"url": "https://rr4---sn-ab5sznzl.googlevideo.com/videoplayback?..."
}
}