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.
- 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
- Start the Flask server:
python main.py
- Send a GET request to
/search
endpoint with theq
parameter to search for YouTube videos. - Send a GET request to
/download
endpoint with thevideo_url
parameter to convert a YouTube video into an MP3 audio file. - Access the converted audio file by sending a GET request to
/audios/<filename>
endpoint.
/search
: Searches for YouTube videos based on the provided query (q
parameter)./download
: Converts a YouTube video into an MP3 audio file. Requires thevideo_url
parameter./audios/<filename>
: Retrieves the converted audio file.
Contributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request.
This project is licensed under the MIT License.