---
title: "Query and export search data"
description: "Filter live or stored Search Console rows, save query output, and read terminal charts."
canonical_url: "https://gscdump.com/gscdump-cli/guides/use-data/query-and-export"
last_updated: "2026-10-03T07:15:31.697Z"
---

# Query and export search data

A focused query lets you check a Report Section against the underlying Search Analytics rows. Keep the Site, search type, and date window fixed while comparing results.

## Choose live or stored rows

### Live rows

::pre{tabindex="0"}
```bash
gscdump query --live --site example.com --type web \
  --dimensions page,query --limit 100 --format json
```
::

Live reads end on the newest final Google date by default, three days ago in its Pacific reporting calendar. Check `meta.source` in JSON output. Google may omit low-volume query detail and caps its API rows.

### Store rows

::pre{tabindex="0"}
```bash
gscdump query --site example.com --type web \
  --dimensions page,query --limit 100 --format json
```
::

The CLI chooses the Store when its required dates are complete. If coverage is partial, it stops and prints a [sync](/gscdump-cli/guides/use-data/build-history) command. The [query reference](/gscdump-cli/api/query#routing) explains routing.

## Filter a result

::pre{tabindex="0"}
```bash
gscdump query --site example.com --type web \
  --start 2026-08-01 --end 2026-08-28 \
  --page '~/blog/' --dimensions page,query --format table
```
::

A bare filter matches exactly. `~text` contains text; `!~text` excludes it. A page path can also be a full URL. Use `--query`, `--device`, and `--country` for narrower reads. On the Store, a dimension and filter combination needs a matching stored table; the CLI names `--live` if none exists.

## Export the query

::pre{tabindex="0"}
```bash
gscdump query --site example.com --type web \
  --dimensions page,query --format csv --output rows.csv
```
::

`query` supports table, JSON, and CSV. Use `--output -` to write to stdout in a script. The [query reference](/gscdump-cli/api/query) describes the JSON metadata and date semantics.

## Export the Store

::pre{tabindex="0"}
```bash
gscdump dump --site example.com --format parquet --out ./search-export
```
::

`dump` exports stored datasets. It supports Parquet, CSV, JSON, NDJSON, SQLite, and DuckDB. Analytics rows include `site` and `search_type`. See the [Export reference](/gscdump-cli/api/export) before joining tables or sharing files.

## Read a terminal chart

::pre{tabindex="0"}
```bash
gscdump query --site example.com --dimensions date --format table
gscdump analyze trends --site example.com
```
::

Table output places exact numbers beside bars or sparklines. A missing-series dot means missing data, not zero. Each sparkline scales independently, so compare its shape and read the totals for magnitude. Lower average position means improvement. Use JSON or CSV when another tool needs exact values. `TERM=dumb` gives ASCII charts.

## If data is partial

Check `meta.source`, selected dates, and Store coverage. A live row budget warning means the displayed rows are incomplete. Raise `--fetch-budget` for supported Analyzer and Report runs, or narrow the question. Next, [review weekly traffic](/gscdump-cli/guides/investigate-traffic/weekly-triage). More data tasks: [Use data](/gscdump-cli/guides/use-data).

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
