Official async Python SDK and CLI for BrokenX YouTube API
Project description
BROKENXAPI
BROKENXAPI is a high-performance asynchronous Python SDK and CLI that enables developers to search and download YouTube audio or video through a remote backend API.
It is built for automation tools, Telegram bots, and production systems where reliability, speed, and a clean developer experience are critical.
The SDK abstracts authentication and networking, while the CLI provides a fast and simple way to interact with the API directly from the terminal.
Installation
Install via pip:
pip install BROKENXAPI
Authentication
BROKENXAPI requires an API key for all requests.
Environment Variable (Recommended)
Linux / macOS
export YTKEY="BROKENXAPI-XXXX"
Windows
set YTKEY=BROKENXAPI-XXXX
Python SDK Usage
import asyncio
from brokenxapi import BrokenXAPI
async def main():
async with BrokenXAPI(api_key="BROKENXAPI-XXXX") as api:
# Search YouTube
search = await api.search("moosetape", video=False)
video_id = search["video_id"]
# Download audio
audio = await api.download(video_id, "audio")
print(audio["telegram_url"])
asyncio.run(main())
Download Video (SDK)
async with BrokenXAPI(api_key="BROKENXAPI-XXXX") as api:
video = await api.download("VIDEO_ID", "video")
print(video["telegram_url"])
CLI Usage
Authenticate once:
brokenx auth BROKENXAPI-XXXX
Check installed version:
brokenx -v
Search YouTube:
brokenx search "moosetape"
Download audio:
brokenx download VIDEO_ID
Download video:
brokenx download VIDEO_ID -v
Notes
- Python 3.8+ is required
- An API key is mandatory for all requests
- All responses are returned as JSON-compatible dictionaries
- Download responses include a Telegram-ready file URL
License
© 2025 MR Broken All rights reserved.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file brokenxapi-2.0.5.tar.gz.
File metadata
- Download URL: brokenxapi-2.0.5.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f468be493d4f121d6096281111b74d97cf4ecb4b94ec45b36633cb158620b8b
|
|
| MD5 |
7731d217d2de3136bbbff8e11ee7b4f0
|
|
| BLAKE2b-256 |
c1a12ba8b63c048d78ea27c01a2d33e88eff55d092df2cb0cf5d3e8758550339
|
File details
Details for the file brokenxapi-2.0.5-py3-none-any.whl.
File metadata
- Download URL: brokenxapi-2.0.5-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31798505d45c3ebe6cf55cae53377fb91669c30fbbd25983d1b76c8d87f14877
|
|
| MD5 |
2d51e0251d728f816c0448b7b34a81c8
|
|
| BLAKE2b-256 |
b27dea668ebf4ac426b5521a1e0db191df86c38154dfcc18c47f5da865638df8
|