Tracker Scraper
Tracker Scraper is a small, dependency-light Python package that asks a BitTorrent tracker how many seeds, peers, and completed downloads a torrent has — given the tracker’s announce URL and one or more torrent info_hash values.
It speaks both tracker scrape protocols:
- UDP trackers (
udp://…) via the binary UDP tracker protocol. - HTTP / HTTPS trackers (
http://…,https://…) via the bencoded scrape convention.
You give it a tracker and a list of hashes; it gives you back a plain dictionary of stats. That’s the whole library.
Key features
Section titled “Key features”- One function, one call —
scrape(tracker, hashes)returns adictof per-hash stats. Nothing to instantiate, no session to manage. - UDP and HTTP/HTTPS — the announce-URL scheme is detected automatically and routed to the right protocol.
- Batch scraping — query many torrents in a single request (up to 74 per UDP request, a protocol limit).
- Command-line interface — scrape straight from your shell and get JSON on stdout, no script required.
- Tiny footprint — only
requestsandbencode.pyas runtime dependencies.
A 30-second taste
Section titled “A 30-second taste”Install it:
pip install tracker-scraperScrape a UDP tracker from Python:
from tracker_scraper import scrape
results = scrape( tracker="udp://exodus.desync.com:6969", hashes=[ "2d88e693eda7edf3c1fd0c48e8b99b8fd5a820b2", "8929b29b83736ae650ee8152789559355275bd5c", ],)
print(results)Or from the command line:
tracker-scraper udp://exodus.desync.com:6969 2d88e693eda7edf3c1fd0c48e8b99b8fd5a820b2Either way you get a dictionary keyed by info_hash, each value holding seeds, peers, and complete:
{ "2d88e693eda7edf3c1fd0c48e8b99b8fd5a820b2": { "seeds": 34, "peers": 189, "complete": 10 }}Compatibility
Section titled “Compatibility”| Supported | |
|---|---|
| Tracker Scraper | 1.x |
| Python | 3.9 – 3.14 |
| Tracker protocols | UDP, HTTP, HTTPS |
Where to next
Section titled “Where to next”- Installation — install from PyPI and confirm it works.
- Usage — the
scrape()API and thetracker-scraperCLI in detail. - Configuration — arguments, return shape, timeouts, and logging.
- Examples — copy-pasteable recipes for UDP, HTTP, and the CLI.