Developer API

Button API

Get Request

https://y2convert.net/api/button/{ftype}/{YouTube video ID}

Available ftype

  • MP3 up to 320kbps -> mp3
  • MP4 up to 720p -> videos
  • MKV / WEBM up to 4320p (8k) HDR -> merged

iFrame Code

<iframe id="buttonIframe" src="https://y2convert.net/api/button/mp3/iiMrs3vOm_w" width="100%" height="100%" allowtransparency="true" scrolling="no" style="border:none"></iframe>

Javascript code for automatic iFrame resizing

<script type="text/javascript">
// Selecting the iframe element
var buttonApi = document.getElementById("buttonIframe");

// Adjusting the iframe height onload event
buttonApi.onload = function(){
buttonApi.style.height = buttonApi.contentWindow.document.body.scrollHeight + 'px';
  }
</script>

Generate this...

Widget API

Get Request

https://y2convert.net/api/widget/{ftype}/{YouTube video ID}

Available ftype

  • MP3 up to 320kbps -> mp3
  • MP4 up to 720p -> videos
  • MKV / WEBM up to 4320p (8k) HDR -> merged

iFrame Code

<iframe id="widgetIframe" src="https://y2convert.net/api/widget/mp3/iiMrs3vOm_w" width="100%" height="100%" allowtransparency="true" scrolling="no" style="border:none"></iframe>

Javascript code for automatic iFrame resizing

<script type="text/javascript">
// Selecting the iframe element
var widgetApi = document.getElementById("widgetIframe");

// Adjusting the iframe height onload event
widgetApi.onload = function(){
widgetApi.style.height = widgetApi.contentWindow.document.body.scrollHeight + 3 + 'px';
  }
</script>

Generate this...

Copyright © 2020 by Y2convert.net

Powered by YouTube Converter Pro Version: 2.2.0