https://github.com/brian404/yt-dlp
https://github.com/brian404/yt-dlp
express rest-api youtube-api youtube-dl youtube-downloader yt-dlp
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/brian404/yt-dlp
- Owner: brian404
- Created: 2024-12-11T20:31:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-11T21:45:26.000Z (over 1 year ago)
- Last Synced: 2025-02-08T10:45:55.448Z (over 1 year ago)
- Topics: express, rest-api, youtube-api, youtube-dl, youtube-downloader, yt-dlp
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# YouTube Downloader API
Express.js API to download YouTube videos or audio using yt-dlp.
## Requirements
- **Node.js**
- **Express.js
- **Python (3.9 or higher)
- **FFmpeg**
- **Cookies File**: Add your YouTube cookies in `cookies.txt` (Netscape format).
1. Clone the repository:
```bash
git clone https://github.com/brian404/yt-dlp.git
cd yt-dlp/api
```
2. Install dependencies:
```bash
npm i
```
3. start the server:
```bash
npm start
```
## Usage
Endpoint: /api/yt
Method: GET
Query Parameters:
url (required): YouTube video URL.
format (optional): mp3 or mp4. Defaults to mp4.
## examples
Download Video:
http://localhost:3000/api/yt?url=https://www.youtube.com/watch?v=example
Download Audio:
http://localhost:3000/api/yt?url=https://www.youtube.com/watch?v=example&format=mp3
## Disclaimer
Respect YouTube's Terms of Service when using this tool. Misuse of authentication tokens can lead to account suspension.
Be cautious when using your cookies.txt file. Exposing your cookies can lead to unauthorized access to your YouTube account and compromise your privacy