Output formats
The terminal summary, --json, and the exported JSON and Markdown files: their layout, naming, and front-matter.
search produces output three ways: a readable terminal summary, the full
structured object on stdout with --json, and dated files on disk. By default
you get the summary and the files.
Terminal summary
With no output flag, search renders a summary: a rule with the query, a line
of counts (response time, detected features, organic and PAA totals), each rich
block found, then the organic results, related searches, and any vertical
results. It shows only the blocks present on the page. This is the form for
reading; the complete data is in the JSON. See
output and export for an annotated example.
--json
--json prints the full result object to stdout and skips the summary and the
file export. It is the form to pipe into jq or another program:
gsearch search "AAPL stock" --json | jq '.features.stock'
The object's keys are listed in output and export:
query, vertical, detected_features, features, organic_results,
people_also_ask, related_searches, top_stories, local_pack,
vertical_results, response_ms, and fetched_at.
Exported files
Unless you pass --no-export, each search run writes two files under
~/data/gsearch, in date-partitioned trees:
~/data/gsearch/json/2026/06/13/22-41-epl.json
~/data/gsearch/markdown/2026/06/13/22-41-epl.md
The path encodes the date (YYYY/MM/DD), the time (HH-MM), and a slug of the
query, so a directory listing reads as a history of what you searched.
The JSON file
The JSON file is the same object --json prints, written with the full result.
Load it back, diff two runs, or feed it to another tool.
The Markdown file
The Markdown file is a human-readable rendering of the same result, with YAML front-matter at the top and the blocks laid out as prose and tables. The front-matter carries the query, the vertical, the timestamp, and the list of detected features, so the file is usable in a notes system or a static site:
---
query: epl
vertical: web
fetched_at: 2026-06-13T22:41:00
features: [sports_standings, knowledge_panel]
---
# Google Search: epl
## Standings: Premier League
...
Re-exporting
gsearch export rewrites the exported files for recent stored results, and
gsearch capture --out writes raw API responses as numbered JSON files. See
storing results and
capturing the API.