YTAudioConverterAPI
YTAudioConverterAPI: A Flask-based RESTful API for converting YouTube videos to MP3 audio files. Retrieve direct download links with a simple HTTP request. Features rate limiting, file compression, and auto-deletion of expired files. Easily integrate and customize with the provided source code
Install / Use
/learn @liwa-dev/YTAudioConverterAPIREADME
YTAudioConverterAPI
Description
YTAudioConverterAPI is a Flask-based API that allows you to convert YouTube videos into MP3 audio files. It utilizes the pytube, youtubesearchpython, youtube_dl, and pydub libraries to search for videos, extract audio, and convert it to MP3 format.
Installation
- Clone the repository:
git clone <https://github.com/liwa-dev/YTAudioConverterAPI.git> - Navigate to the project directory:
cd YTAudioConverterAPI - Install the required dependencies:
pip install -r requirements.txt
Usage
- Start the Flask server:
python main.py - Send a GET request to
/searchendpoint with theqparameter to search for YouTube videos. - Send a GET request to
/downloadendpoint with thevideo_urlparameter to convert a YouTube video into an MP3 audio file. - Access the converted audio file by sending a GET request to
/audios/<filename>endpoint.
API Endpoints
/search: Searches for YouTube videos based on the provided query (qparameter)./download: Converts a YouTube video into an MP3 audio file. Requires thevideo_urlparameter./audios/<filename>: Retrieves the converted audio file.
Contributing
Contributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request.
License
This project is licensed under the MIT License.
