Skip to main content

An API server based on yt-dlp

Project description

PyPI Downloads License

youtubedlapi-server-infusiblecoder

A REST API server for getting video info from different sites, powered by yt-dlp.

Requires Python >= 3.11. Uses uv for package management. Installs Deno automatically in the Docker image (used by some yt-dlp extractors as a JavaScript runtime).

Installation

# Install uv (if not installed)
pip install uv

# Clone and install
git clone https://github.com/syedusama5556/youtubedlapi-server-infusiblecoder
cd youtubedlapi-server-infusiblecoder
uv sync

Or via pip:

pip install youtubedlapi-server-infusiblecoder

Usage

uv run uvicorn youtubedlapi_server_infusiblecoder.app:app --host 0.0.0.0 --port 9191 --workers 1 --log-level info

Or using the CLI:

uv run youtubedlapi-server-infusiblecoder --host 0.0.0.0 --port 9191

Run in background:

nohup uvicorn youtubedlapi_server_infusiblecoder.app:app --host 0.0.0.0 --port 9191 --workers 1 --log-level info &

API Endpoints

Info

  • GET /api/info?url=<video-url> — Get video information
  • GET /api/formats?url=<video-url> — List available formats/resolutions
  • GET /api/subtitles?url=<video-url> — List available subtitles
  • GET /api/search?q=<query>&limit=10 — Search for videos on supported sites

Playback

  • GET /api/play?url=<video-url> — Redirect to video URL
  • GET /api/audio?url=<video-url> — Get best audio stream URL
  • GET /api/download?url=<video-url>&format_id=best — Download video, returns a temp streaming link
  • GET /api/stream/<file_id> — Stream a downloaded file (temp link, expires in 1h)
  • GET /api/stream/<file_id>?download=1 — Force-download the temp file

Server

  • GET /api/extractors — List available extractors
  • GET /api/version — Get version info
  • GET /api/bili?url=<bilibili-url> — Get Bilibili video info

License

Released to the public domain.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

youtubedlapi_server_infusiblecoder-3.9.0.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file youtubedlapi_server_infusiblecoder-3.9.0.tar.gz.

File metadata

File hashes

Hashes for youtubedlapi_server_infusiblecoder-3.9.0.tar.gz
Algorithm Hash digest
SHA256 c2d1eb6aa3c967488a0f9e6536d06daa543b3f610d7efc1f29d98d7f8abf863b
MD5 5114631d469915318946140530176187
BLAKE2b-256 c2c34dd84d951aef056c2351eebaca709ef3077c09dd02119f7f51efe651aacb

See more details on using hashes here.

File details

Details for the file youtubedlapi_server_infusiblecoder-3.9.0-py3-none-any.whl.

File metadata

File hashes

Hashes for youtubedlapi_server_infusiblecoder-3.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 91459c4bb77a2fca1fe0c8812ce9275eb1c42c85272b3151e82ecc6b25f06299
MD5 a35937a2b73738db7337a71d9c764839
BLAKE2b-256 34a44723fc2782812a31253ae7f5ec5a4125c8c444e2e9a0e516dc7741790f22

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page