API

Do you want to add a YouTube MP3 Downloader to your website?
With these simple scripts you will learn how you can add a link to your website that will allow your users to instantly download the video of their choice, in MP3 format.

For the more experienced users, there is an API that allows your backend to retrieve the essential data.
This allows you to integrate the API in your app.

Simple Example Codes

Direct Download

You will be sent directly to the download link where your download will start.

Download MP3
HTML:
<a href='http://www.youtubeinmp3.com/fetch/?video=http://www.youtube.com/watch?v=i62Zjga8JOM' style='text-decoration:none;color:#03a730;'>
<img src='http://www.youtubeinmp3.com/icon/download.png' style='vertical-align:middle;'> <strong>Download MP3</strong>
</a>


Download MP3
HTML:
<a href='http://www.youtubeinmp3.com/fetch/?video=http://www.youtube.com/watch?v=i62Zjga8JOM' style='text-decoration:none;color:#03a730;'>
<img src='http://www.youtubeinmp3.com/icon/folder.png' style='vertical-align:middle;'> <strong>Download MP3</strong>
</a>

Advanced API

The results can be received in three different formats: text, JSON and XML.
Below you can find the three different types and also how to use them.

Plain text

With the advanced API you can parse the title, video length and download link.

http://www.youtubeinmp3.com/fetch/?format=text&video=http://www.youtube.com/watch?v=i62Zjga8JOM

Example Output
Title: Happy Forever Alone Day (Forever Alone Song)
Length: 125
Link: http://www.youtubeinmp3.com/download/get/?i=k1MakL%2FYlh6KUtEHqyQlg9XwtUUWOBuCAgQFgp%2FS4pzEnZdpF%2Fybog%3D%3D

JSON

You can also receive the data in JSON by setting the "format" parameter to "JSON".

http://www.youtubeinmp3.com/fetch/?format=JSON&video=http://www.youtube.com/watch?v=i62Zjga8JOM

Example Output
{

"title":"Happy Forever Alone Day (Forever Alone Song)",
"length":"125",
"link":"http:\/\/youtubeinmp3.com\/download\/get\/?i=k1MakL%2FYlh6KUtEHqyQlg9XwtUUWOBuCAgQFgp%3D%3D"

}

XML

You can also receive the data in JSON by setting the "format" parameter to "JSON".

http://www.youtubeinmp3.com/fetch/?format=XML&video=http://www.youtube.com/watch?v=i62Zjga8JOM

Example Output
<?xml version="1.0"?>

<fileList>

<file>

<videoTitle>Happy Forever Alone Day (Forever Alone Song)</title>
<length>125</length>
<link>http://www.youtubeinmp3.com/download/get/?i=k1MakL%2FYlh6KUtEHqyQlg9XwtUUW%2F%3D%3D</link>

</file>

</fileList>

Alternative Parameters

You can also specify additional parameters to have the MP3 served the way you need it.

&start= (int) [specify, in seconds, where the MP3 should start 30]
&end= (int) [where should the MP3 end, e.g. 60]

&title= (string) [setting this value will change the title of the MP3]