YouTube Download MP3 API
Dokumentasi resmi YouTube Download MP3 API dari Maelyn API untuk mengunduh audio (MP3) dari video YouTube dengan opsi informasi tambahan
Base Information
- BASE_URL_API:
https://api.maelyn.eu/api - Path / Endpoint:
/download/youtube/mp3 - Method:
POST - Credit Usage:
2
Authentication
Gunakan header berikut pada setiap request:
x-maelyn-auth: YOUR_API_KEY
Content-Type: application/json
Description
Endpoint ini digunakan untuk mengunduh audio (MP3) dari video YouTube.
API akan memproses URL YouTube dan mengembalikan:
- file audio MP3
- informasi video (opsional)
- metadata seperti title, duration, dll
Request Body
{
"url": "https://www.youtube.com/watch?v=xxxxxxxxxxx"
}
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
url | string | Yes* | URL video YouTube |
link | string | Yes* | Alternatif dari url |
withInfo | boolean | No | Sertakan metadata video (default: true) |
Salah satu dari
urlataulinkwajib diisi.
Notes
- Body request harus berupa JSON.
- URL harus valid dan berasal dari YouTube.
- Jika
withInfo=false, response hanya akan berisi file download tanpa metadata tambahan. - Proses download bisa memakan waktu lebih lama tergantung durasi video.
- Endpoint ini menggunakan sistem queue untuk menjaga stabilitas server.
Example Usage
1. Download MP3 dengan info
{
"url": "https://www.youtube.com/watch?v=abcdefghijk"
}
2. Download MP3 tanpa info
{
"url": "https://www.youtube.com/watch?v=abcdefghijk",
"withInfo": false
}
Success Response
{
"success": true,
"message": "Berhasil download YouTube MP3",
"result": {
"audio": {
"url": "https://cdn.maelyn.eu/audio/abcd1234.mp3",
"mime": "audio/mpeg",
"size": "3.45 MB",
"filename": "audio.mp3"
},
"info": {
"title": "Sample YouTube Video",
"duration": "00:30",
"thumbnail": "https://i.ytimg.com/vi/abcdefghijk/maxresdefault.jpg",
"channel": "Sample Channel"
}
}
}
Success Response (without info)
{
"success": true,
"message": "Berhasil download YouTube MP3",
"result": {
"audio": {
"url": "https://cdn.maelyn.eu/audio/abcd1234.mp3",
"mime": "audio/mpeg",
"size": "3.45 MB",
"filename": "audio.mp3"
}
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Status request |
message | string | Pesan hasil request |
result | object | Hasil download |
audio | object | Informasi file audio |
url | string | URL file MP3 |
mime | string | MIME type file |
size | string | Ukuran file |
filename | string | Nama file |
info | object | Metadata video (jika withInfo=true) |
title | string | Judul video |
duration | string | Durasi video |
thumbnail | string | URL thumbnail |
channel | string | Nama channel |
Error Response
Invalid JSON
{
"success": false,
"message": "Body JSON tidak valid"
}
URL Required
{
"success": false,
"message": "url wajib diisi"
}
Internal Server Error
{
"success": false,
"message": "Internal server error"
}