Google Search, from the command line
gsearch drives a real Chrome through patchright, waits for the results to render, and pulls every structured block Google shows into one clean JSON object. Knowledge panels, weather cards, sports tables, the dictionary, the calculator, stock and crypto quotes, featured snippets, AI overviews, People Also Ask, and the ten blue links underneath, on your own machine, with no key to manage and nothing to pay for.
The data Google puts above the ten blue links, the answer box, the score table, the weather card, the panel on the right, is the most useful part of a search and the hardest to get at. The paid SERP APIs cover it, but you pay per query and trust their parse. gsearch renders the same page you would see in a browser and reads the live DOM, so you get the rich blocks and the organic results in one structured object.
gsearch search "epl" # all rich blocks + organic results
gsearch search "12.5 km in miles" # the unit converter card
gsearch search "define ephemeral" # the dictionary entry
gsearch search "AAPL stock" --json # structured JSON to stdout
There are no keys and no quotas. gsearch reads the rendered page rather than a private API, so the output tracks what a human actually sees. It is one tool with a small command surface, JSON and Markdown output that composes, and a DuckDB store when you want to keep what you pull.
What you can do with it
- Read the rich blocks. One
gsearch searchpulls roughly forty kinds of Google answer card: the knowledge panel, weather, sports standings and scores, translation, dictionary, calculator, unit converter, currency, stock and crypto quotes, the featured snippet, the AI overview, People Also Ask, top stories, the local pack, and more. - Switch verticals.
-vmoves between web, images, videos, news, shopping, and books, each with its own extractor and its own result shape. - Get structured output.
--jsonprints the whole result to stdout forjqor another program, and every run also writes a dated JSON and Markdown file you can keep or archive. - Store and revisit.
--saveupserts each result into DuckDB, andinfo,dump, andexportlet you see what you have collected and rewrite it later. - Capture the raw traffic.
capturerecords the raw AJAX responses Google fires while a SERP loads, one file per response, for research.
Where to go next
- New here? Start with the introduction for the mental model, then the quick start.
- Want to install it? See installation.
- Looking for a specific task? The guides cover searching, verticals, output and export, storing results, and capturing the API.
- Need every flag? The CLI reference is the full surface.