Skip to main content

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


Download files

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

Source Distribution

brokenxapi-2.0.3.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

brokenxapi-2.0.3-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file brokenxapi-2.0.3.tar.gz.

File metadata

  • Download URL: brokenxapi-2.0.3.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for brokenxapi-2.0.3.tar.gz
Algorithm Hash digest
SHA256 567c17b3dca1e7fca9861dfb5f3c339340b21f45b45773a8da254f836761cca9
MD5 ecca4e794a3ff26b26d537c112e63646
BLAKE2b-256 52ed07fbc4235d16f0dda6bc42b419dbd24244e7c4503651cb6e7a72dc220c13

See more details on using hashes here.

File details

Details for the file brokenxapi-2.0.3-py3-none-any.whl.

File metadata

  • Download URL: brokenxapi-2.0.3-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for brokenxapi-2.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ddb9e2450c7b9e530035f452f30b0b01fced3b56e30d6cde51c328658cbbe07e
MD5 69b7f45ed6a9a3e243fe7856844b5ca0
BLAKE2b-256 f6dd95110d236e99334ed3b83d6b2895dca48aaa9aaafbf1f7205da6a9a08261

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