---
name: google-search-console
description: Traps to avoid when querying Google Search Console through treg — cases where the API returns a confident wrong answer instead of an error, especially around totals and recent-date trends. Use whenever answering questions about organic search clicks, impressions, rankings, or index status.
title: google-search-console
canonical_url: https://skilld.dev/gh/superdesigndev/treg/google-search-console
last_updated: 2026-09-27T22:31:33.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install superdesigndev/treg/google-search-console`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/google-search-console`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/superdesigndev/treg/google-search-console) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/google-search-console`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/google-search-console --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/google-search-console --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Search Console via treg — what will silently mislead you

You already know the Search Console API. This file is **only** the things that return a plausible
wrong answer with no error. Verified live on 2026-07-22 against `sc-domain:example.com`, with
each trap confirmed by watching three independent agents.

Site id: `treg connections ls` → `resource_ref`. If it's empty, **no site is pinned** — list them
with `treg connections resources <id>` and say which one you chose and why. Don't present an
inferred site as configured, and don't report the blank as a fault — it isn't one.

When nothing is pinned and the question doesn't name a site, **pick the site whose domain matches
the question and state that you inferred it.** Note that subdomains are separate properties, so
`sc-domain:example.com` and `sc-domain:app.example.com` are different answers — say which you used.

## 1. Recent days are incomplete — do not report them as a trend

**3 of 3 agents concluded "organic traffic is down ~47%".** It wasn't.

GSC lags ~2–3 days and simply omits missing days — a 14-day request returns 11–12 rows with no
warning. Worse, the newest present days read low. The tail looked like this:

```
07-15: 640   07-16: 610   07-17: 500   07-18: 520   07-19: 430   ← last 3 days incomplete
```

Cross-checked against GA4 organic sessions for the same dates, the decline **does not exist** —
and GA4 shows 07-20 and 07-21 recovering to 746 and 849, days GSC hasn't reported at all.

**Two rules:**
- End ranges ≥3 days before today, and never start a window on a local peak.
- Before calling any GSC trend real, **cross-check GA4 organic sessions for the same dates.**
  Two independent sources disagreeing means the GSC tail is an artifact.

## 2. Dimension sums do NOT equal site totals

Illustrative (the point is that dimension sums miss the true total, not the absolutes):

| Grouped by | Rows | Impressions | vs true total |
|---|---|---|---|
| `query` | 4,219 | | **~31%** — loses ~69% |
| `page` | 1,161 | | **~151%** — overcounts ~51% |
| `date` | 28 | (true total) | 100% ✅ |
| *(none)* | 1 | (true total) | 100% ✅ |

`query` undercounts because Google drops anonymised rare queries; `page` overcounts because one
SERP impression showing several of your pages counts once per page. *(Numbers measured;
mechanisms are the standard explanation, not measured.)*

**Never sum a dimension to report a total** — especially for "how much traffic do my top queries
drive?", where summing understates organic traffic by ~69% with total confidence.

## 3. `searchAppearance` cannot be combined with any other dimension

Fails loudly with a 400: `"Cannot group by search appearance dimension together with another
dimension."` Query it alone — and note that a sparse result there is a correct answer, not a bug.

## 4. Two API surfaces on one host

- `webmasters/v3/...` — search analytics, sitemaps
- `v1/urlInspection/index:inspect` — URL Inspection

Guessing `webmasters/v3/urlInspection/...` returns a **Google HTML 404**, not a JSON error. Two of
three agents hit this. The HTML-vs-JSON tell is worth knowing generally: HTML means the path never
routed.

## Everything else

Standard API. `ctr` is a fraction (0.0882 = 8.82%); `position` is an average, so don't average it
across rows. `rowLimit` accepts 25000 (default reported as 1000 — unverified). Sitemap
`contents[].indexed` returned `"0"` for a fully-indexed site with 1,079 URLs — use URL Inspection
for real index status. Subdomains are separate properties.

Both `sc-domain:example.com` and `sc-domain%3Aexample.com` work in the path — verified via the
audit log. Encoding is optional; don't debug a 403 by adding it.

⚠️ *Unverified:* URL-prefix properties (`https://example.com/`, trailing slash) — none available
to test. A 403 is reported to usually mean the wrong property form rather than missing permission.

**Writes** (`PUT`/`DELETE` on sitemaps) change what Google crawls. Untested by design — get an
explicit target and human go-ahead first.

- Search Analytics query: https://developers.google.com/webmaster-tools/v1/searchanalytics/query
- URL Inspection: https://developers.google.com/webmaster-tools/v1/urlInspection.index/inspect
- Freshness & anonymisation: https://support.google.com/webmasters/answer/7576553
