Curl Download API Documentation

This API allows you to download videos via curl and get a server link to the downloaded file.

Download Video

GET /curldl?url=VIDEO_URL

Description

Downloads a video from the provided URL and returns a server link.

Example

curl -X GET "http://your-server:3000/curldl?url=https://www.youtube.com/watch?v=VIDEO_ID"

Response

{ "success": true, "message": "Download successful", "download_url": "http://your-server:3000/videos/MEDIA_ID.mp4", "media_id": "MEDIA_ID", "media_type": "video", "note": "This file will be automatically deleted after 30 minutes" }

Delete Media

GET /curldl/delete/:mediaId

Description

Manually delete a downloaded media file using its media ID.

Example

curl -X GET "http://your-server:3000/curldl/delete/MEDIA_ID"

Response

{ "success": true, "message": "Media file deleted successfully" }

Usage Examples

Download a YouTube video

curl -X GET "http://your-server:3000/curldl?url=https://www.youtube.com/watch?v=VIDEO_ID"

Download and save the file locally using curl

curl -o downloaded_video.mp4 "http://your-server:3000/videos/MEDIA_ID.mp4"

Pipe a video from the server to a media player

curl "http://your-server:3000/videos/MEDIA_ID.mp4" | mpv -

Clean up after you're done

curl -X GET "http://your-server:3000/curldl/delete/MEDIA_ID"