LinuxCommandLibrary

googler

Search Google from the command line

TLDR

Search Google for a keyword

$ googler [keyword]
copy

Search Google and open the first result in web browser
$ googler [[-j|--first]] [keyword]
copy

Show n search results (default: 10)
$ googler [[-n|--count]] [n] [keyword]
copy

Disable automatic spelling correction
$ googler [[-x|--exact]] [keyword]
copy

Search one site for a keyword
$ googler [[-w|--site]] [site] [keyword]
copy

Show Google search result in JSON format
$ googler --json [keyword]
copy

Perform in-place self-upgrade
$ googler [[-u|--upgrade]]
copy

Display help in interactive mode
$ <?>
copy

SYNOPSIS

googler [OPTIONS...] [QUERY]

PARAMETERS

-n NUM, --num=NUM
    Number of results (default: 10, max: 100)

-N, --no-num-results
    Don't show result count

-C, --no-color
    Disable colored output

-c COLORS, --colors=COLORS
    Custom colors (e.g., 'num:1;title:3;url:4')

-O HANDLER, --open-handler=HANDLER
    Browser command (e.g., w3m)

-w SITE, --site-search=SITE
    Search within site (e.g., github.com)

-s SITE, --site=SITE
    Narrow to site

-d, --exact
    Exact match query

-t PERIOD, --time=PERIOD
    Time filter: a,p,d,w,m,y (any,past day/week/month/year)

-T, --https
    Force HTTPS

--json
    JSON output

--proxy=PROXY
    HTTP proxy URL

--cookies=COOKIES
    Cookies file

--config=DIR
    Config directory

--update
    Check for updates

-V, --version
    Show version

-h, --help
    Show help

DESCRIPTION

Googler is a user-friendly, feature-rich command-line tool for performing Google searches directly from the terminal. It supports web, news, video, and image searches, displaying results in a clean, tabular format with titles, URLs, and snippets. Users can customize the number of results, filter by site or time period, and interact via vi-like keybindings (j/k to navigate, o to open in browser, y to copy URL).

Key features include colored output, JSON export for scripting, proxy support, and integration with text browsers like w3m or lynx. It's ideal for power users, developers, and sysadmins who prefer terminal workflows. Googler fetches results via Google's search interface (unofficial), respecting user privacy by not tracking.

Installation: pip install googler or via distro packages (e.g., apt install googler). Highly scriptable and extensible with custom handlers.

CAVEATS

Unofficial tool; may break with Google changes. Rate-limited; respect usage policies. Requires internet.

KEYBINDINGS

j/k: navigate
o: open in browser
y: copy URL
/: new search
?: help
q: quit

EXAMPLES

googler python
googler -n 5 -w wikipedia.org linux
googler -t m --json ai news

HISTORY

Created by Narendra Kale in 2015. Open-source (GPLv3), actively maintained on GitHub with regular updates for Google changes.

SEE ALSO

ddgr(1), w3m(1), lynx(1), curl(1)

Copied to clipboard