A simple YouTube-to-MP3 downloader API built with FastAPI and yt-dlp.
It lets you download audio from YouTube videos directly as MP3 files.
- Download YouTube videos as MP3
- Returns the file directly via API
- Uses yt-dlp + ffmpeg for conversion
- Runs inside a lightweight Docker container
- Clone this repository and navigate into it:
git clone https://github.com/Danscot/mytube-api.git cd mytube-api
2. Build the Docker image:
```bash
docker build -t mytube .
- Run the container:
docker run -d -p 8000:8000 mytube
- The API will be available at:
- Inorder to do request use
GET http://127.0.0.1:8000/youtube/mp3?url="Youtube_video_url"
- Using curl
curl -X GET http://127.0.0.1:8000/youtube/mp3?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ