Googler – Run google searches from the command line

googler runs google queries from the command line

Need a quick google from the terminal?

Yep, along with other crazy things found along the way to almost truly negate the need for a graphical desktop, Googler is the tool you want to use in order to do quick google queries from the command line.

Say what?

googler runs google queries from the command line
googler runs google queries from the command line

Googler is a tool for Google (Web & News) and Google Site Search from the command-line. It shows the title, URL and abstract for each result, which can be directly opened in a browser from the terminal. Results are fetched in pages (with page navigation). Supports sequential searches in a single googler instance.

The author initially wrote the python script to cater to headless servers without X and can be integrated with a text-based browser. However, says the author “it has grown into a very handy and flexible utility that delivers much more. For example, fetch any number of results or start anywhere, limit search by any duration, define aliases to google search any number of websites, switch domains easily… all of this in a very clean interface without ads or stray URLs. The shell completion scripts make sure you don’t need to remember any options.”

How do I install it?

Oh, that’s easy of course! If you are using Ubuntu or Mint, simply:

$sudo apt install googler

For instructions on installing it on other distro’s look down to the bottom of this post.

How do I use it?

The most basic way is just to type in googler followed by the search query you want:
$googler hello world

However there are a whole raft of really useful ways to search. Plenty more great examples can be found on the author’s github website. Here’s a clever one to fetch 15 results updated within the last 14 months, starting from the 3rd result for the keywords jungle book in site imdb.com:
$ googler -n 15 -s 3 -t m14 -w imdb.com jungle book

More installation guides for other distros:

AUR (yaourt -S googler)
Debian (apt-get install googler)
Fedora (dnf install googler)
FreeBSD (pkg install googler)
Homebrew (brew install googler)
NixOS (nix-env -i googler)
openSUSE (zypper in googler)
Slackware (slackpkg install googler)
Ubuntu PPA (apt-get install googler)
Void Linux (xbps-install -S googler)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.