YouTube In MP3 Icon YouTubeInMP3.com

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 back end to retrieve the essential data.
This allows you to integrate the API in your app.

Widgets

Responsive Download Button

The smallest and most foolproof way of adding a download MP3 button to a YouTube videos is to use the responsive download button.
Simply add the code below (supports HTTPS) to your website and the button will magically appear, allowing your users to download your YouTube video in MP3 format.

The download button is neatly loaded through an iFrame which loads asynchronously and works with any viewable YouTube video. This means that the button won't slow down your website and your visitors will never have to leave your site to download the MP3, not even when a video needs to be converted!

The appearance of the button is customizeable as the color, width and height of the button can be changed.
The button is also responsive which means that you can set it to any width or height that suits your needs and the button will automatically adjust itself.


This is a live demo of the button
Try it out...

Another button with a different color and size



This is the short piece of HTML code that allows you to add it to your site.
Don't forget to change the values (YouTube link, width and height) before placing it on your page.
HTML:
<iframe style="width:230px;height:60px;border:0;overflow:hidden;" scrolling="no" src="//www.youtubeinmp3.com/widget/button/?video=https://www.youtube.com/watch?v=i62Zjga8JOM"&color=c91818>

Alternative Parameters

&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]
&color= (string - hex code without #) [using this parameter will color of the button from the default green color)]

/language/ [supported languages: /en/, /de/, /fr/, /es/, /it/, /id/, /pt/, /ru/, /tr/, /ar/, /sv/]

Generate Your Code






<iframe style="width:230px;height:60px;border:0;overflow:hidden;" scrolling="no" src="//www.youtubeinmp3.com/en/widget/button/?video=https://www.youtube.com/watch?v=i62Zjga8JOM">

Direct Links

Direct Download

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

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


download folder icon Download MP3
HTML:
<a href='//www.youtubeinmp3.com/fetch/?video=https://www.youtube.com/watch?v=i62Zjga8JOM' style='text-decoration:none;color:#03a730;'>
<img src='//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 how to use them.

Plain text

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

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%2FYlh6KUtEHqyQlg9XwtUUWO

JSON

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

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%2FYlh6KUtEHqyQlg9XwtUUWO"

}

XML

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

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

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

<fileList>

<file>

<title>Happy Forever Alone Day (Forever Alone Song)</title>
<length>125</length>
<link>//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]

&bitrate=1 [by setting this parameter will return the bitrate (kbps) of the MP3]
&filesize=1 [by setting this parameter the output will contain the size (bytes) of the file]
&title= (string) [setting this value will change the title of the MP3]