https://github.com/codingstark-dev/youtube-downloader-api
This API built using Flask allows users to retrieve video information from YouTube and download videos in specified resolutions or audio format.
https://github.com/codingstark-dev/youtube-downloader-api
flask flask-api python3 pytube ytdl
Last synced: 8 months ago
JSON representation
This API built using Flask allows users to retrieve video information from YouTube and download videos in specified resolutions or audio format.
- Host: GitHub
- URL: https://github.com/codingstark-dev/youtube-downloader-api
- Owner: codingstark-dev
- Created: 2023-11-17T14:59:38.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-31T10:08:32.000Z (almost 2 years ago)
- Last Synced: 2025-01-16T00:22:46.442Z (9 months ago)
- Topics: flask, flask-api, python3, pytube, ytdl
- Language: Python
- Homepage:
- Size: 1.95 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## YouTube Downloader API
This API built using Flask allows users to retrieve video information from YouTube and download videos in specified resolutions or audio format.
### API Endpoints
#### Fetch Video Information
- **Endpoint**: `/api/video_info`
- **Method**: `GET`
- **Parameters**:
- `url` (required): The YouTube video URL
- **Response**:
- JSON containing video title, available resolutions with download links, audio information, and thumbnail URL.#### Download Video/Audio
- **Endpoint**: `/api/download`
- **Method**: `GET`
- **Parameters**:
- `url` (required): The YouTube video URL
- `resolution` (required): Video resolution (use 'audio' for audio-only)
- **Response**:
- Downloads the requested video or audio file.### Setup Instructions
1. Install Python.
2. Install dependencies:
```
pip install flask flask-cors pytube
```
3. Run the application:
```
python app.py
```
4. Access the API endpoints using `http://localhost:5000`.### Usage
#### Fetch Video Information
```bash
GET /api/video_info?url=