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.4.tar.gz (7.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.4-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: brokenxapi-2.0.4.tar.gz
  • Upload date:
  • Size: 7.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.4.tar.gz
Algorithm Hash digest
SHA256 fc93e8d5defc694821959279dd0be1c2c566d593a652a7768d49b36adecf335e
MD5 537838f3ca4a75cbdf92e87c69934aae
BLAKE2b-256 29aca054ddca07dbbeb1624b7b5e871e5d16caae3ffc7782184af9d5428ab1eb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: brokenxapi-2.0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.6 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e0ba1f231393f0d74d5b3c5cff0c7073f5d78afb88efb490edb05fa52f67ac61
MD5 61e7aa5ca635d3eadac3e34483c0b524
BLAKE2b-256 65f4fea2e80c6f796e6fffa8c6c8fb37cc7fc671260ce9bc33e561a9c1d47889

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