gsc-cli
A fast, scriptable Google Search Console CLI - pull Search Analytics, inspect
URLs, and manage sitemaps straight from your terminal, with clean --format json
output that pipes into any tool. It also powers a set of Claude Code SEO-analysis
skills.
Built and maintained by SEO Consult, a Bulgarian SEO агенция that lives in Search Console data.
Why gsc-cli
- Everything as JSON.
--format jsonon any command → feed rankings, CTR, and impressions into scripts, notebooks, or LLM prompts without scraping the UI. - Search Analytics done right. Query by
query,page,country,device, ordate, with repeatable AND-combined--filterexpressions. - URL Inspection & sitemaps. Check index coverage for any URL and list/submit/ delete sitemaps.
- Multi-profile auth. OAuth2 and service accounts, with per-site auto-detection - juggle many client properties from one config.
- Table / CSV / JSON output for humans and machines alike.
- The data the API leaves out. Google Lens / Circle to Search traffic
(Web: multimodal) and the Generative AI report (AI Overviews + AI Mode) exist
only as UI exports.
gsc multimodalandgsc genaiparse those exports and join them with API numbers for the same dates.
Install
pip install gsc-cli # from PyPI
# or, for local development:
uv sync # create venv + install + register the `gsc` binary
Quick start
export GSC_CLIENT_SECRETS=/path/to/client_secrets.json # from Google Cloud Console
gsc auth login # OAuth2 browser flow
gsc sites list # confirm access
# Top queries for the last 28 days, as JSON:
gsc --format json query https://www.example.com/ \
--start-date 2026-01-01 --end-date 2026-01-28 --dimensions query
--format is global and precedes the subcommand
(gsc --format json query ...). Filters use 'dimension operator expression',
e.g. --filter 'query contains running shoes'.
Commands
| Command | What it does |
|---|---|
gsc auth |
login, add-profile, list/remove-profile, status |
gsc sites |
List and inspect verified properties |
gsc query |
Search Analytics (clicks, impressions, CTR, position) |
gsc inspect |
URL Inspection API - index/coverage verdict for a URL |
gsc sitemaps |
list, get, submit, delete |
gsc multimodal |
Parse a Web: multimodal export; --compare adds the camera share per page |
gsc genai |
Parse a Generative AI report export; --compare adds the AI lift index per page |
Run gsc --help or gsc <command> --help for the full flag reference.
AI Overviews and AI Mode by page
The Generative AI report in Search Console shows how often each page appeared inside AI Overviews and AI Mode. The API does not return it, so export it from the UI (Performance -> Generative AI -> Export -> Download CSV) and run:
gsc genai https://www.example.com/ export.zip --compare --start-date 2026-06-22 --end-date 2026-09-21
For every page you get its AI impressions next to its organic clicks, impressions
and average position, plus ai_lift: the page's share of AI impressions divided by
its share of organic impressions. Above 1, AI uses the page more than its organic
weight would suggest. Pages with fewer than 100 AI or 1,000 organic impressions are
marked qualified: false, because small numbers give silly ratios.
Add --bands to see how AI impressions split across position bands (1-3, 4-10,
11-20, 21+). On the sites we have checked so far, most AI visibility sits on pages
ranking 4-10, not in the top 3. Informational pages score high lift. Stock, deals
and dealer-locator pages score close to zero, because Google rarely shows an AI
answer for those searches.
--by date gives the daily series. Put it next to gsc query --dimensions date:
if the AI-to-organic ratio suddenly collapses, check whether Googlebot can still
reach the site. On one site, a firewall block cut organic impressions by 42% and AI
impressions by 93%.
Some skill files mention companion skills (for example ai-visibility-tracking)
from a larger private setup. They are optional; the gsc-* skills work on their own.
Use with Claude Code
gsc-cli is the backend for a suite of Claude Code SEO skills (performance
overviews, cannibalization detection, quick-win opportunities, period compares,
indexing audits). The skills shell out to gsc --format json and reason over the
output. They ship as a Claude Code plugin in plugins/gsc-cli:
/plugin marketplace add seoconsultbg/gsc-cli
/plugin install gsc-cli@seoconsult
The plugin needs the gsc command on your PATH (uv tool install gsc-cli or
pipx install gsc-cli). See CLAUDE.md for the architecture.
Configuration
Profiles live in ~/.config/gsc/config.yaml (override with GSC_CONFIG_DIR).
A command resolves its profile by precedence: explicit --profile/$GSC_PROFILE
→ the profile whose sites list contains the target URL → default. Full details
in CLAUDE.md.
Contributing
Issues and PRs welcome. Lint/format with ruff (line-length 100):
uv run ruff check .
uv run pytest
License
MIT - © 2026 SEO Consult.
Maintained by the team at SEO Consult. If gsc-cli saves you time, a ⭐ on GitHub helps others find it.
Metadata
Release files for gsc-cli 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gsc_cli-0.2.0.tar.gz | 98.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gsc_cli-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 124.5 kB
Release files / gsc_cli-0.2.0.tar.gz
| Download URL | gsc_cli-0.2.0.tar.gz |
|---|---|
| Size | 98.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3800aa6b493d1e69f19b7d6ae780d52811fc692508ec96715c33a66aa21a551f
|
|
BLAKE2b-256 checksum How to use checksums |
4ca795577b2f8e6437ecab2a0e11f45fbb962859eabf81f32daebd4b4b7222ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / gsc_cli-0.2.0-py3-none-any.whl
| Download URL | gsc_cli-0.2.0-py3-none-any.whl |
|---|---|
| Size | 25.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
81cc672d5d7b51c910ce6a826be7eb9c5159a7105d27235fd74f11552fa7f529
|
|
BLAKE2b-256 checksum How to use checksums |
f2b10ccc366845903cde0b99abea4e634cc421c2012866409eebcf0c39fb2709
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|