Skip to content

Command Line

Installing the package adds a tracker-scraper command. It’s the quickest way to check a torrent’s stats without writing any Python.

Terminal window
tracker-scraper udp://exodus.desync.com:6969 2d88e693eda7edf3c1fd0c48e8b99b8fd5a820b2
{
"2d88e693eda7edf3c1fd0c48e8b99b8fd5a820b2": {
"seeds": 34,
"peers": 189,
"complete": 10
}
}

List multiple hashes after the tracker URL:

Terminal window
tracker-scraper udp://exodus.desync.com:6969 \
2d88e693eda7edf3c1fd0c48e8b99b8fd5a820b2 \
8929b29b83736ae650ee8152789559355275bd5c

The output is pretty-printed with an indent of 2 by default. Pass --indent 0 for compact JSON, handy when piping:

Terminal window
tracker-scraper --indent 0 udp://exodus.desync.com:6969 2d88e693eda7edf3c1fd0c48e8b99b8fd5a820b2

Because the output is plain JSON on stdout, you can pipe it straight into jq:

Terminal window
tracker-scraper udp://exodus.desync.com:6969 2d88e693eda7edf3c1fd0c48e8b99b8fd5a820b2 \
| jq '.[].seeds'

The command exits 0 on success and 1 on failure (with the error written to stderr), so it composes cleanly in shell scripts:

Terminal window
if tracker-scraper udp://exodus.desync.com:6969 "$HASH" > stats.json; then
echo "Scrape succeeded"
else
echo "Scrape failed" >&2
fi

If the console script isn’t on your PATH, the same tool runs via -m:

Terminal window
python -m tracker_scraper udp://exodus.desync.com:6969 2d88e693eda7edf3c1fd0c48e8b99b8fd5a820b2
  • Usage — the Python API behind the CLI.
  • Configuration — argument reference and protocol limits.