Search Torrents From Command Line In LInux

Search Torrents From Command Line In LInux

Even though, there are plenitude of GUI torrent applications on the Internet, some users still prefers to use command line torrent tools. If you’re one of them, I have got a good news for you. Meet We-get, a command line torrent search tool written using Python programming language. It helps you to search torrent files without leaving your Terminal. We-get is a cross-platform tool, so It will work GNU/Linux, MS Windows, and Mac OS X.

In this brief tutorial, let us see how to install and use We-get tool to search torrents from command line in Unix-like systems.

Search Torrents From Command Line In LInux


We-get needs Python 3.5 or higher to work. Ubuntu 16.04 LTS and higher versions ships with Python 3 and Python 2 pre-installed. So, you don’t have to install Python if you use Ubuntu 16.04 or higher version. You need to install PIP, Python package manager, in-order to install We-get.

To do so, run:

sudo apt-get install python3-pip

On RPM based systems such as RHEL, CentOS, you need to install Python 3.x version as shown below.

yum install
yum install python35u

Once Python 3.5 installed, run the following command to PIP:

yum install python35u-pip

Also, make sure you have installed GIT on your system. Git is available in the default repositories of most Linux distributions, so we can install it using the default package manager as shown below.

On DEB based systems:

sudo apt-get install git

On RPM based systems:

sudo yum install git

On Arch Linux and its derivatives:

sudo pacman -S git

Once PIP and GIT installed, run the following command to install ‘we-get’.

pip3.5 install git+

On Ubuntu system:

pip3 install git+


We-get currently supports the following four websites.

  • 1337x
  • thepiratebay
  • eztv
  • yts
  • more yet to come

Let us see some practical examples.

Disclaimer: Searching/Downloading torrent files is illegal in some regions/countries. Please use this information at your own risk. We (OSTechNix or the Author) are not responsible for any kind of illegal usage of torrents.

To search for a torrent, run:

we-get --search "Arch Linux" --target the_pirate_bay

Sample output:

# Fetching data from 'the_pirate_bay' ...
the_pirate_bay Arch.Linux.Environment.Setup.How-to [2/0]
the_pirate_bay Raspberry.Pi.Arch.Linux.ARM [1/0]
the_pirate_bay Arch.Linux.2016-07-01.ISO [1/1]
the_pirate_bay Arch.Linux.Netinstall.Image.Dual.Architecture [0/0]
the_pirate_bay Arch.Linux.Live.ISO [0/1]
the_pirate_bay arch.linux [0/1]
the_pirate_bay Arch.Linux.Netinstall.Image.32-bit [0/0]
we-get >

You view the list of available torrents for the above search term (i.e Arch Linux), type list in the we-get prompt. Also, to view the details of a particular torrent, type show <torrent_name> like below.

we-get > show Arch.Linux.Environment.Setup.How-to
Arch.Linux.Environment.Setup.How-to {
 "leeches": "0",
 "link": "magnet:?xt=urn:btih:3b2a9431310ad4de48b55bf3b219d43820a021b1&dn=Arch+Linux+Environment+Setup+How-to&",
 "seeds": "2",
 "target": "the_pirate_bay"

To exit from the We-get shell, type exit.

Here is the complete list of supported options for We-get.

we-get -h
Usage: we-get [options]...

 -s --search [text] Search for a torrent.
 -l --list List top torrents from modules.
 -t --target [target] Select module to use or 'all'.
 -L --links Output results as links.
 -J --json Output results in JSON format.
 -G --get-list List targets (supported web-sites).
 -f --filter [str] Match text or regular expression in the torrent name.
 -n --results [n] Number of results to retrieve.
 -S --sort-type [type] Sort torrents by name/seeds (default: seeds).

Video options:
 -q --quality [q] Try to match quality for the torrent (720p,1080p, ...).
 -g --genre [g] Try to select video genre for the torrent (action, comedy, etc..).

General options:
 -h --help Help message.
 -v --version Show version.

Copyright (c) 2016-2017 Levi Sabah <>.
Full documentation at: <>

That’s it. Hope this helps. I will be soon here with another article. If you find the guides posted in our blog helpful, please share them on your social and professional networks to encourage us to write more.



You may also like...