Create your own YouTube to mp3, mp4, m4a converter website with lolyoutube API.


General Information

Base-URL for our API is https://lolyoutube.com/download/{mp3, mp4 or m4a}/YOUTUBE_VIDEO_ID/TIMESTAMP (note that the timestamp should be less than less than (now + 1 hour))

All requests to the API shall be HTTP/1.1 GET

Please make sure to use the API with https only.

Result

The download link will display a page containing a button to download the video file.


Documentation

By using our API gateway, you will save alot of time because all you will not have to develop any downloading system under your frontend, in addition, you save alot of money by avoiding conversion servers and bandwith costs, in return, our ads are displayed in the download page, please note that we only put banners on it and we do not use popups in the whole download process. API uptime is 99.9%

Parameters

Name Description Example Required
format the video output format (mp3, mp4 and m4a are supported) mp3 yes
video id the YouTube ID of the video you want to convert XQCPMYBAgrw yes
timestamp an unix timestamp of now (if provided_ts minus now_ts > 3600, link is expired) 1526829584 yes

PHP implementation

<?php
	echo '<a href="https://lolyoutube.com/download/mp3/YouTubeID/' . time() . '">Download YouTube Video</a>';
?>


JAVASCRIPT implementation

<script>
	document.write('<a href="https://lolyoutube.com/download/mp3/YouTubeID/' + Date.now() + '">Download YouTube Video</a>');
</script>