googler
Search Google from the command line
TLDR
Search Google for a keyword
Search Google and open the first result in web browser
Show n search results (default: 10)
Disable automatic spelling correction
Search one site for a keyword
Show Google search result in JSON format
Perform in-place self-upgrade
Display help in interactive mode
SYNOPSIS
googler [options] keywords
PARAMETERS
-n, --num NUM
Specifies the maximum number of search results to display per page.
-s, --site SITE
Limits the search to a specific website or domain (e.g., example.com).
-t, --time DURATION
Filters results by time duration (e.g., 'h' for hour, 'd' for day, 'w' for week, 'm' for month, 'y' for year).
-w, --lucky
Automatically opens the first search result directly in your default web browser (akin to Google's 'I'm Feeling Lucky' feature).
--np, --no-correct
Disables Google's automatic spelling correction for the search query, useful for specific terms.
--json
Outputs the search results in a structured JSON format, useful for scripting or parsing.
-C, --no-color
Disables colored output, which can be useful when redirecting output or for terminals with limited color support.
-v, --version
Displays the `googler` version information and then exits.
DESCRIPTION
`googler` is a highly efficient command-line utility designed to bring the power of Google search directly to your terminal. It allows users to quickly perform Google searches without the need to open a web browser, making it ideal for developers, system administrators, and anyone who prefers a minimalist workflow. `googler` prides itself on being fast, lightweight, and privacy-conscious, offering a cleaner search experience by default, free from cookies, JavaScript, and most ads. Users can customize the number of search results displayed, navigate through them using keyboard shortcuts, and even open selected links directly in their preferred web browser. Beyond basic searches, it supports advanced functionalities such as site-specific searches, disabling auto-correction, filtering results by time, and specifying a custom user agent. This tool scrapes the non-AMP mobile version of Google to provide a consistent and reliable command-line interface for your search queries.
CAVEATS
As `googler` relies on scraping Google's non-AMP mobile site, future changes to Google's search page structure could potentially break its functionality. Users should also be mindful of Google's rate-limiting, as excessive or rapid queries might lead to temporary blocking of requests. It is not an official Google product and thus offers no guarantees of continuous operation or support from Google. Opening search results requires an external web browser to be configured and available on the system.
INTERACTIVE MODE
After performing a search, `googler` enters an interactive session. Users can type a number (1-99) to open the corresponding link in their default web browser, 'n' to navigate to the next page of results, 'p' for the previous page, or 'q' to quit the session. This allows for seamless browsing of search results without leaving the terminal.
CUSTOMIZATION AND CONFIGURATION
`googler` can be extensively customized through environment variables (e.g., GOOGLER_SHOW_ARCHIVED) or a configuration file, typically located at ~/.config/googler/config. This allows users to set default options like the number of results, color scheme, or preferred browser, tailoring the tool to their specific workflow.
HISTORY
The `googler` command-line utility was initially developed by Arun Prakash Jana to provide a convenient and efficient way to perform Google searches directly from the terminal. Since its inception, it has evolved as an open-source project, maintained by a community of contributors on GitHub. Its development has focused on maintaining compatibility with Google's evolving search interfaces while ensuring a fast, lightweight, and privacy-respecting user experience, making it a popular choice among command-line enthusiasts and developers.
SEE ALSO
ddgr(1)