A powerful FastAPI-based video downloader supporting Instagram, TikTok, YouTube, and 1000+ platforms with real-time progress tracking.
- π₯ Multi-Platform Support: Download from Instagram, TikTok, YouTube, Facebook, Twitter, and 1000+ sites
- π« TikTok Without Watermark: Get clean TikTok videos
- π¬ Instagram HD Quality: Download Instagram Reels/Posts in 720p+
- π Real-Time Progress: Live download progress with Server-Sent Events
- π± Mobile Ready: Complete React Native/Expo integration
- π CORS Enabled: Works with web and mobile apps
- πͺ Cookie Support: Bypass YouTube bot detection
- ποΈ Auto Cleanup: Automatic file cleanup after download
- π¨ Modern UI: Beautiful glassmorphism design
# Clone the repository
git clone https://github.com/fazi-gondal/FastAPI.git
cd FastAPI
# Install dependencies
pip install -r requirements.txt
# Run the server
python main.pyServer will start at http://localhost:8000
- Python 3.11+
- FastAPI
- yt-dlp (2025.12.8)
- uvicorn
- httpx
- aiofiles
- Open
http://localhost:8000in your browser - Paste a video URL (Instagram, TikTok, YouTube, etc.)
- Click "Get Video Info"
- Click "Download Video"
- Video downloads to your Downloads folder
See API.md for complete API documentation with examples.
Quick Example:
// Fetch metadata
const response = await fetch('http://localhost:8000/api/metadata', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ url: 'https://www.instagram.com/reel/xxxxx/' })
});
const metadata = await response.json();Complete mobile app integration guide: REACT_NATIVE_INTEGRATION.md
# Install dependencies
npx expo install expo-file-system expo-media-library axios- Push code to GitHub
- Connect to Render
- Deploy with:
- Build Command:
pip install -r requirements.txt - Start Command:
uvicorn main:app --host 0.0.0.0 --port $PORT
- Build Command:
See DEPLOYMENT.md for detailed instructions.
See DEPLOYMENT.md for Koyeb deployment guide.
- API.md - Complete API documentation
- REACT_NATIVE_INTEGRATION.md - Mobile app integration
- DEPLOYMENT.md - Deployment guides (Render/Koyeb)
- YOUTUBE_COOKIES.md - Fix YouTube bot detection
- IMPROVEMENTS.md - Reliability improvements
- RENDER_STORAGE.md - Storage management on Render
- β YouTube (with cookie support)
- β Instagram (Posts, Reels, IGTV in HD)
- β TikTok (watermark-free)
- β Facebook
- β Twitter/X
- β Vimeo
- β Reddit
- β And 1000+ more via yt-dlp
- Downloads without watermark
- Best available quality
- Multiple URL format support
- HD quality (720p+)
- Supports Reels, Posts, IGTV
- Thumbnail CORS proxy included
- Best video + audio quality merged
- Cookie support for bot detection
- MP4 output format
For YouTube downloads, you may need to add cookies:
- Install browser extension: Get cookies.txt
- Export cookies from YouTube.com
- Save as
cookies.txtin project folder - Restart server
See YOUTUBE_COOKIES.md for detailed instructions.
| Endpoint | Method | Description |
|---|---|---|
/api/metadata |
POST | Get video metadata |
/api/download/start |
POST | Start download (returns ID) |
/api/download/progress/{id} |
GET | Track progress (SSE) |
/api/download/file/{id} |
GET | Download completed file |
/api/thumbnail |
GET | Proxy thumbnail (CORS bypass) |
FastAPI/
βββ main.py # FastAPI application
βββ downloader.py # yt-dlp download logic
βββ requirements.txt # Python dependencies
βββ runtime.txt # Python version
βββ Procfile # Deployment config
βββ static/ # Frontend files
β βββ index.html
β βββ style.css
β βββ script.js
βββ temp_downloads/ # Temporary download storage
βββ docs/ # Documentation
βββ API.md
βββ DEPLOYMENT.md
βββ ...
- β CORS enabled for all origins (customize in production)
- β Cookie files gitignored
- β Automatic file cleanup
- β No sensitive data stored
- β Ephemeral storage on cloud platforms
See YOUTUBE_COOKIES.md for cookie setup.
App includes automatic CORS proxy for Instagram thumbnails.
- Check internet connection
- Verify URL is public and accessible
- Check yt-dlp is latest version:
pip install --upgrade yt-dlp
Restart server to enable new progress tracking system.
- β Real-time progress tracking with SSE
- β Three-step download process
- β YouTube cookie support
- β Automatic file cleanup
- β Modern lifespan event handlers
- β Improved error handling
- β Initial release
- β Multi-platform support
- β FastAPI backend
- β Modern glassmorphism UI
- β React Native integration
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Fazi Gondal
- GitHub: @fazi-gondal
- Email: [email protected]
- yt-dlp - The amazing video downloader
- FastAPI - Modern Python web framework
- Expo - React Native development platform
Give a βοΈ if this project helped you!