Base URL
The OfflineTube API runs locally on:API Information
- Title: YouTube Downloader Pro API
- Version: 5.0.0
- Response Format: JSON
- Server: FastAPI with Uvicorn
Available Endpoint Categories
Download Management
Manage video and audio downloads from YouTube:POST /api/download- Start a new download taskGET /api/downloads- List all downloads with statusGET /api/download/{download_id}/file- Download the completed fileDELETE /api/downloads/{download_id}- Cancel a downloadDELETE /api/downloads/{download_id}/remove- Remove download and delete file
Content Discovery
Search and discover YouTube content:GET /api/search- Search for videos by query or URLGET /api/trending- Get trending videosPOST /api/info- Get detailed video information and available formats
Media Streaming
Stream downloaded content:GET /api/stream/{filename}- Stream video files with range request supportGET /api/thumbnails/{task_id}- Get video thumbnails
Response Format
All API responses are returned in JSON format. Successful responses typically include:Error Handling
The API uses standard HTTP status codes:- 200 - Success
- 206 - Partial Content (for range requests)
- 400 - Bad Request (missing or invalid parameters)
- 404 - Not Found (resource doesn’t exist)
- 500 - Internal Server Error
Download Status Values
Downloads progress through the following statuses:pending- Download queued but not starteddownloading- Actively downloadingprocessing- Converting/merging with FFmpegcompleted- Download finished successfullyerror- Download failed (check error_message)cancelled- Download was cancelled by user
CORS Configuration
The API is configured with permissive CORS settings for local development:Dependencies
The API requires:- FFmpeg - For video/audio processing and format conversion
- yt-dlp - For downloading YouTube content
- FastAPI - Web framework
- Uvicorn - ASGI server
File Storage
Downloaded files are stored in:- Videos/Audio:
./downloads/directory - Thumbnails:
./thumbnails/directory
{title}__{task_id}.{ext}
Next Steps
- Authentication - Security and authentication details
- Explore specific endpoint documentation for request/response schemas