videodownloader
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v8View latest version
This directory contains the server-side code for the Video Downloader application.
index.ts- Main entry point and API routesservices/- Service modules for different video platformsyoutube.ts- YouTube-specific download functionalitygeneric.ts- Generic video download functionality for other platforms
Serves the main application HTML.
Serves static files from the frontend and shared directories.
Get information about a video before downloading.
Request Body:
{ "url": "https://www.youtube.com/watch?v=..." }
Response:
{ "title": "Video Title", "thumbnail": "https://...", "duration": 123, "formats": [ { "quality": "720p", "format_id": "22", "ext": "mp4", "resolution": "1280x720" }, ... ], "url": "https://www.youtube.com/watch?v=..." }
Download a video.
Request Body:
{ "url": "https://www.youtube.com/watch?v=...", "quality": "720p" // Optional }
Response:
{ "success": true, "downloadUrl": "https://...", "title": "Video Title" }
Or in case of error:
{ "success": false, "error": "Error message" }
Health check endpoint.
Response:
{ "status": "ok" }