Button/Iframe API


Set the "src" attribute of an HTML iframe to:

https://yt2mp3s.me/@api/button/{format}/{YouTube-Video-ID}

...where {format} is one of the following:

  • "mp3" : for MP3 results
  • "videos" : for Video w/Audio results
  • "mergedstreams" : for Merged Video + Audio results
  • "videostreams" : for Video-Only results
  • "audiostreams" : for Audio-Only results

...and {YouTube-Video-ID} is any valid YouTube video ID.

The resulting iframe code and corresponding output should look like one of the following, e.g.:

<iframe class="button-api-frame" src="https://yt2mp3s.me/@api/button/mp3/CevxZvSJLk8" width="100%" height="100%" allowtransparency="true" scrolling="no" style="border:none"></iframe>

<!-- Optional script that automatically makes iframe content responsive. -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/3.5.14/iframeResizer.min.js"></script>
<script>iFrameResize({}, '.button-api-frame');</script>

...generates this:

<iframe class="button-api-frame" src="https://yt2mp3s.me/@api/button/videos/CevxZvSJLk8" width="100%" height="100%" allowtransparency="true" scrolling="no" style="border:none"></iframe>

<!-- Optional script that automatically makes iframe content responsive. -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/3.5.14/iframeResizer.min.js"></script>
<script>iFrameResize({}, '.button-api-frame');</script>

...generates this:

<iframe class="button-api-frame" src="https://yt2mp3s.me/@api/button/mergedstreams/CevxZvSJLk8" width="100%" height="100%" allowtransparency="true" scrolling="no" style="border:none"></iframe>

<!-- Optional script that automatically makes iframe content responsive. -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/3.5.14/iframeResizer.min.js"></script>
<script>iFrameResize({}, '.button-api-frame');</script>

...generates this:

<iframe class="button-api-frame" src="https://yt2mp3s.me/@api/button/videostreams/CevxZvSJLk8" width="100%" height="100%" allowtransparency="true" scrolling="no" style="border:none"></iframe>

<!-- Optional script that automatically makes iframe content responsive. -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/3.5.14/iframeResizer.min.js"></script>
<script>iFrameResize({}, '.button-api-frame');</script>

...generates this:

<iframe class="button-api-frame" src="https://yt2mp3s.me/@api/button/audiostreams/CevxZvSJLk8" width="100%" height="100%" allowtransparency="true" scrolling="no" style="border:none"></iframe>

<!-- Optional script that automatically makes iframe content responsive. -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/3.5.14/iframeResizer.min.js"></script>
<script>iFrameResize({}, '.button-api-frame');</script>

...generates this: