YouTube converter api · v1.0.0

Paste a link.
Get a file.

MP3 up to 320 kbps and MP4 up to 1080p behind one endpoint. Embed the converter anywhere, keep every domain on an allowlist, and cap each video at 30 minutes.

320 kbps mp31080p mp430 min cap1 domains
Try the converter
30 min max

MP3 128–320 kbps · MP4 360–1080p · videos up to 30 minutes

Four widgets. One backend.

Every route returns a ready-to-frame converter. The iframe reads the video, lists the formats, and converts on click — the parent page needs no script.

GET · no key in the URL
GET/api/single/{mp3|mp4}?url={VIDEO_URL}

Single button

One button, one quality. The smallest embed for a fixed download.

urlany YouTube link
themedark or light
<iframe src="https://apigen.tech/api/single/mp3?url=https://www.youtube.com/watch?v=zvrMzRVtj1s" width="100%" height="132" style="border:0" scrolling="no" referrerpolicy="origin" allowtransparency="true"></iframe>
Live preview
GET/api/button/{mp3|mp4}?url={VIDEO_URL}

Multi button

Four quality buttons in a single row. Good for sidebars and footers.

urlany YouTube link
themedark or light
<iframe src="https://apigen.tech/api/button/mp3?url=https://www.youtube.com/watch?v=zvrMzRVtj1s" width="100%" height="196" style="border:0" scrolling="no" referrerpolicy="origin" allowtransparency="true"></iframe>
Live preview
GET/api/widget?url={VIDEO_URL}

Widget

Title, MP3/MP4 tabs, and a quality table. The full converter without a thumbnail.

urlany YouTube link
themedark or light
<iframe src="https://apigen.tech/api/widget?url=https://www.youtube.com/watch?v=zvrMzRVtj1s" width="100%" height="360" style="border:0" scrolling="no" referrerpolicy="origin" allowtransparency="true"></iframe>
Live preview
GET/api/widgetplus?url={VIDEO_URL}

Widget Plus

Same table with the thumbnail on the left. For article pages and reviews.

urlany YouTube link
themedark or light
<iframe src="https://apigen.tech/api/widgetplus?url=https://www.youtube.com/watch?v=zvrMzRVtj1s" width="100%" height="330" style="border:0" scrolling="no" referrerpolicy="origin" allowtransparency="true"></iframe>
Live preview

Sizing without the library.

Widgets post their own height. Drop this listener on the parent page once and every embedded converter fits itself — no iframe-resizer, no fixed heights.

7 lines
01

30-minute cap

Duration is checked before a single byte is converted.

02

Domain allowlist

Each embed is checked against the list in your panel.

03

Signed tokens

Auth 10 min, format 15 min, download 1 hour.

04

Direct, then proxy

If YouTube blocks the server IP, the download rotates through a proxy.

<script> addEventListener('message', (event) => { if (event.data?.type !== 'apigen:resize') return document.querySelectorAll('iframe[src*="https://apigen.tech/api/"]').forEach((frame) => { if (frame.contentWindow === event.source) { frame.style.height = event.data.height + 'px' } }) }) </script>