Convert youtube video to mp3 using Quick MP3 API


I need convert youtube video to mp3 using Quick MP3 API.

my code example is :

// i need to fetch video informations and get mp3 download link

Thank you.


try this code :
don’t forgot to include quick_func.php in your php code

require_once('./quick_func.php'); // quick mp3 functions
$url = "";
$exp = explode("?v=",$url);
$vid = $exp[1]; 
$data = Convert_Vid($vid); // video id to convert
$id = $data['id']; // get video id
$title = $data['ttl']; // get video title
$duration = $data['duration']; // get video duration
$thumb = $data['thumb']; // get video thumb
$mp3 = $data['mp3']; // get mp3 download link

you need to transform your full youtube url to video ID :

$url = ""; // full youtube url
$exp = explode("?v=",$url); // explode url
$vid = $exp[1]; // get id after ?v=

Enjoy 😉

Answered By – Anass

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published