googler

Latest release Availability License Build Status

Asciicast

googler is a power tool to Google (web, news, videos and 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.

googler was initially written to cater to headless servers without X. You can integrate it with a text-based browser. However, 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.

googler isn’t affiliated to Google in any way.

Here are some usage examples:

  1. Google hello world:

     $ googler hello world
    
  2. 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
    

    Or instead of the last 14 months, look for results specifically between Apr 4, 2016 and Dec 31, 2016:

     $ googler -n 15 -s 3 --from 04/04/2016 --to 12/31/2016 -w imdb.com jungle book
    
  3. Read recent news on gadgets:

     $ googler -N gadgets
    
  4. Fetch results on IPL cricket from Google India server in English:

     $ googler -c in -l en IPL cricket
    
  5. Search for videos on PyCon 2020:

     $ googler -V PyCon 2020
    
  6. Search quoted text:

     $ googler it\'s a \"beautiful world\" in spring
    
  7. Search for a specific file type:

     $ googler instrumental filetype:mp3
    
  8. Disable automatic spelling correction, e.g. fetch results for googler instead of google:

     $ googler -x googler
    
  9. I’m feeling lucky search:

     $ googler -j leather jackets
    
  10. Website specific search:

    $ googler -w amazon.com -w ebay.com digital camera
    

    Site specific search continues at omniprompt.

  11. Positional arguments are joined (with delimiting whitespace) to form the final query, so you can be creative with your aliases. For instance, always exclude seoarticlefactory.com from search results:

    <div class="snippet-clipboard-content position-relative overflow-auto" data-snippet-clipboard-copy-content="$ alias googler='googler " -site:seoarticlefactory.com"' $ googler '
    ‘ “>

    $ alias googler='googler " -site:seoarticlefactory.com"'
    $ googler '
         
          '