YouTube Downloader API - Online YouTube Video to MP3/MP4 Converter
Base URL
https://youtube-to-mp4-mp3.p.rapidapi.com/api
Endpoints
1. MP4 Video Info
- Endpoint:
/video-info
- Method: GET
- Description: Retrieves information about an MP4 video from YouTube.
- Parameters:
url
(query parameter): The URL of the YouTube video.
- Response:
200 OK
: Returns the video information in JSON format.
400 Bad Request
: If the URL is not provided or invalid.
500 Internal Server Error
: If there is an error processing the request.
2. Get Short Video/Audio
- Endpoint:
/shorts/getVideo
- Method: GET
- Description: Retrieves information and download links for short videos or audio from YouTube.
- Parameters:
url
(query parameter): The URL of the YouTube short video.
- Response:
200 OK
: Returns the short video or audio information in JSON format.
400 Bad Request
: If the URL is not provided or invalid.
500 Internal Server Error
: If there is an error processing the request.
3. Get All Thumbnails
- Endpoint:
/thumbnails
- Method: GET
- Description: Retrieves all available thumbnails for a YouTube video.
- Parameters:
url
(query parameter): The URL of the YouTube video.
- Response:
200 OK
: Returns an array of thumbnail URLs in JSON format.
400 Bad Request
: If the URL is not provided or invalid.
500 Internal Server Error
: If there is an error processing the request.
4. MP3 Audio Info
- Endpoint:
/audio-info
- Method: GET
- Description: Retrieves information about an MP3 audio from a YouTube video.
- Parameters:
url
(query parameter): The URL of the YouTube video.
- Response:
200 OK
: Returns the audio information in JSON format.
400 Bad Request
: If the URL is not provided or invalid.
500 Internal Server Error
: If there is an error processing the request.
Example Usage
MP4 Video Info
GET /api/video-info?url=https://www.youtube.com/watch?v=example
Get Short Video/Audio
GET /api/shorts/getVideo?url=https://www.youtube.com/shorts/example
Get All Thumbnails
GET /api/thumbnails?url=https://www.youtube.com/watch?v=example
MP3 Audio Info
GET /api/audio-info?url=https://www.youtube.com/watch?v=example
Error Handling
- All endpoints will return a
400 Bad Request
if the required URL parameter is not provided or is invalid.
- A
500 Internal Server Error
will be returned if there is an error processing the request.