# googler
**Repository Path**: mirrors/googler
## Basic Information
- **Project Name**: googler
- **Description**: googler 是一个命令行工具,可以让用户在终端里搜索 Google 以及 Google News
- **Primary Language**: Shell
- **License**: GPL-3.0
- **Default Branch**: main
- **Homepage**: https://www.oschina.net/p/googler
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 0
- **Created**: 2018-08-06
- **Last Updated**: 2025-11-01
## Categories & Tags
**Categories**: search-engine
**Tags**: None
## README

 
 
 
 
 
`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:
        $ alias googler='googler " -site:seoarticlefactory.com"'
        $ googler ''
12. Alias to find **definitions of words**:
        alias define='googler -n 2 define'
13. Look up `n`, `p`, `o`, `O`, `q`, `g keywords` or a result index at the **omniprompt**: as the omniprompt recognizes these keys or index strings as commands, you need to prefix them with `g`, e.g.,
        g n
        g g keywords
        g 1
14. Input and output **redirection**:
        $ googler -C hello world < input > output
    Note that `-C` is required to avoid printing control characters (for colored output).
15. **Pipe** output:
        $ googler -C hello world | tee output
16. Use a **custom color scheme**, e.g., a warm color scheme designed for Solarized Dark ([screenshot](https://i.imgur.com/6L8VlfS.png)):
        $ googler --colors bjdxxy google
        $ GOOGLER_COLORS=bjdxxy googler google
17. Tunnel traffic through an **HTTPS proxy**, e.g., a local Privoxy instance listening on port 8118:
        $ googler --proxy localhost:8118 google
    By default the environment variable `https_proxy` is used, if defined.
18. Quote multiple search keywords to auto-complete (using completion script):
        $ googler 'hello w
19. More **help**:
        $ googler -h
        $ man googler
More fun stuff you can try with `googler`:
- [googler on the iPad](https://github.com/jarun/googler/wiki/googler-on-the-iPad)
- [Print content of results to terminal or listen to it](https://github.com/jarun/googler/wiki/Print-content-of-results-to-terminal-or-listen-to-it)
- [Terminal Reading Mode or Reader View](https://github.com/jarun/googler/wiki/Terminal-Reading-Mode-or-Reader-View)
- [Stream YouTube videos on desktop](https://github.com/jarun/googler/wiki/Search-and-stream-videos-from-the-terminal)
- [Search error on StackOverflow from terminal](https://github.com/jarun/googler/wiki/Search-error-on-StackOverflow-from-terminal)
### Table of contents
- [Features](#features)
- [Installation](#installation)
    - [Dependencies](#dependencies)
    - [From a package manager](#from-a-package-manager)
        - [Tips for packagers](#tips-for-packagers)
    - [Release packages](#release-packages)
    - [From source](#from-source)
    - [Running standalone](#running-standalone)
    - [Downloading a single file](#downloading-a-single-file)
- [Shell completion](#shell-completion)
- [Usage](#usage)
    - [Cmdline options](#cmdline-options)
    - [Configuration file](#configuration-file)
    - [googler @t](#googler-t)
    - [Text-based browser integration](#text-based-browser-integration)
    - [Colors](#colors)
    - [Domain-only URL](#domain-only-url)
    - [Windows Subsystem for Linux (WSL)](#windows-subsystem-for-linux-wsl)
- [Troubleshooting](#troubleshooting)
- [Notes](#notes)
- [Contributions](#contributions)
- [Developers](#developers)
### Features
- Google Search, Google Site Search, Google News, Google Videos
- Fast and clean (no ads, stray URLs or clutter), custom color
- Navigate result pages from omniprompt, open URLs in browser
- Effortless keyword-based site search with googler @t add-on
- Search and option completion scripts for Bash, Zsh and Fish
- Fetch n results in a go, start at the nth result
- Disable automatic spelling correction and search exact keywords
- Specify duration, country/domain (default: worldwide/.com), language
- Google keywords (e.g. `filetype:mime`, `site:somesite.com`) support
- Open the first result directly in browser (as in *I'm Feeling Lucky*)
- Non-stop searches: fire new searches at omniprompt without exiting
- HTTPS proxy, User Agent, TLS 1.2 (default) support
- Comprehensive documentation, man page with handy usage examples
- Minimal dependencies
### Installation
#### Dependencies
`googler` requires Python 3.6 or later. Only the latest patch release of each minor version is supported.
To copy url to clipboard at the omniprompt, `googler` looks for `xsel` or `xclip` or `termux-clipboard-set` (in the same order) on Linux, `pbcopy` (default installed) on macOS and `clip` (default installed) on Windows. It also supports GNU Screen and tmux copy-paste buffers in the absence of X11.
#### From a package manager
Install `googler` from your package manager. If the version available is dated try an alternative installation method.
Packaging status (expand)
 
Unlisted packagers:
● Snap Store (snap install googler)

### Developers
1. Copyright © 2008 Henri Hakkinen
2. Copyright © 2015-2021 [Arun Prakash Jana](https://github.com/jarun)
3. [Zhiming Wang](https://github.com/zmwangx)
4. [Johnathan Jenkins](https://github.com/shaggytwodope)
5. [SZ Lin](https://github.com/szlin)
Special thanks to [jeremija](https://github.com/jeremija) and [Narrat](https://github.com/Narrat) for their contributions.
### Logo
Logo copyright © 2017 Zhiming Wang.
You may freely redistribute it alongside the code, or use it when describing or linking to this project. You should NOT create modified versions of it, make it the logo or icon of your project (except personal forks and/or forks with the goal of upstreaming), or otherwise use it without written permission.