Developer Media Conversion API
API YT provides a documented, secure and controlled interface for developers to integrate multimedia conversion and processing features.
Security First
HTTPS enforced, strict origin validation, internal redirects only and no hidden execution layers.
Documented Endpoints
Clear endpoint definitions, predictable responses and versioned URL structure for stability.
Developer Oriented
Built for backend and frontend developers with minimal dependencies and simple integration.
API Endpoints
Returns an embeddable widget interface for media conversion. Internal routing only.
https://apiyt.cc/widget/{VIDEO_ID}
Provides an MP3 conversion interface for the specified media identifier.
https://apiyt.cc/mp3/{VIDEO_ID}
Provides an MP4 conversion interface for the specified media identifier.
https://apiyt.cc/mp4/{VIDEO_ID}
Performs a media search query and returns structured, embeddable results.
https://apiyt.cc/search/{QUERY}
Overview
The YouTube to MP3 API allows quick and reliable conversion of YouTube videos into MP3 audio files. With a single POST request, you receive a direct download link ready for use.
Available on RapidAPI.
How it works
- Send a POST request with the
videoIdof the YouTube video. - The API processes the video and returns an MP3 download URL.
API Documentation
Base URL
https://tube-mp31.p.rapidapi.com
Endpoint
Headers
{
"Content-Type": "application/json",
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "tube-mp31.p.rapidapi.com"
}
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| videoId | string | Yes | YouTube video ID to be converted. |
Example Request Body
{
"videoId": "dQw4w9WgXcQ"
}
Example PHP Request
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tube-mp31.p.rapidapi.com/api/json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'videoId' => 'dQw4w9WgXcQ'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-RapidAPI-Key: YOUR_API_KEY",
"X-RapidAPI-Host: tube-mp31.p.rapidapi.com"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
Success Response
{
"status": "success",
"result": [
{
"videoId": "dQw4w9WgXcQ",
"title": "Artist - Song Name",
"author": "Author",
"duration": 167,
"dlurl": "https://example.com/audio.mp3",
"token": "JTdCJTIyaWQlMjIlM0ElMjI..."
}
]
}
Error Response
{
"error": "\"videoId\" parameter is mandatory."
}
Rate Limiting
- 100 requests per minute
- Status code 429 when exceeded
Usage Policy
This API is intended for developer testing, integration and educational purposes. Clients are responsible for ensuring compliance with third-party platform terms and applicable laws.