API Docs
HTTP API for media info, format inspection, and file downloads powered by yt-dlp.
Base URL
https://yt-api.exoworo.tech
Authentication
No authentication is enabled by default.
If you add auth later, document the required header or token format here.
Response Format
Success
{
"ok": true
}
Error
{
"ok": false,
"error": "Message"
}
Health Check
GET
/healthReturns uptime and current public base URL.
Example
curl https://yt-api.exoworo.tech/health
Example response
{
"ok": true,
"uptime": 123.45,
"publicBaseUrl": "https://yt-api.exoworo.tech",
"forwardedFor": "::1"
}
Media Info
POST
/api/v1/infoFetches metadata for a supported media URL.
Request body
{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
Example
curl -X POST https://yt-api.exoworo.tech/api/v1/info \
-H "Content-Type: application/json" \
-d '{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}'
Formats
POST
/api/v1/formatsReturns available formats from the target URL.
Request body
{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
Example
curl -X POST https://yt-api.exoworo.tech/api/v1/formats \
-H "Content-Type: application/json" \
-d '{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}'
Download Audio
POST
/api/v1/download/audioDownloads audio and returns a hosted file URL.
Request body
{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"filename": "track",
"audioFormat": "mp3",
"audioQuality": "192K"
}
Example
curl -X POST https://yt-api.exoworo.tech/api/v1/download/audio \
-H "Content-Type: application/json" \
-d '{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ","filename":"track"}'
Example response
{
"ok": true,
"mode": "audio",
"url": "https://yt-api.exoworo.tech/downloads/2026-04-05/track-ab12cd34.mp3",
"fileName": "track-ab12cd34.mp3",
"relativePath": "/downloads/2026-04-05/track-ab12cd34.mp3",
"size": 4839201,
"dateFolder": "2026-04-05",
"type": "audio"
}
Download Video
POST
/api/v1/download/videoDownloads video and returns a hosted file URL.
Request body
{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"filename": "video"
}
Example
curl -X POST https://yt-api.exoworo.tech/api/v1/download/video \
-H "Content-Type: application/json" \
-d '{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ","filename":"video"}'
Downloaded Files
Downloaded files are served from:
https://yt-api.exoworo.tech/downloads/YYYY-MM-DD/file.ext
Files are stored on disk under the configured downloads directory.
Environment Variables
| Name | Purpose | Example |
|---|---|---|
PORT |
Server port | 3000 |
HOST |
Bind address | 127.0.0.1 or 0.0.0.0 |
PUBLIC_BASE_URL |
Public URL used in returned file links | https://yt-api.exoworo.tech |
DOWNLOADS_DIR |
Storage directory for generated files | downloads |
DEFAULT_AUDIO_FORMAT |
Default audio output format | mp3 |
DEFAULT_AUDIO_QUALITY |
Default audio bitrate | 192K |