Skip to content

Google Search Console Monitoring Workflow

Automate organic search health monitoring with GSC and Bing WMT: one-time verification, weekly API-driven reports, and an on-demand /gsc-report skill — replacing manual dashboard checks with structured, actionable summaries.

Why Automate Search Console

GSC is the authoritative source for how Google sees the site. It exposes index coverage gaps, real CrUX performance (not lab data), crawl anomalies, schema errors, and query performance. Without a reporting loop, regressions are invisible until traffic drops.

Bing WMT provides the same data for Bing and Microsoft Copilot Search. It has a public API (Bing Webmaster Tools API) but no bulk CSV export equivalent to GSC's Search Analytics API — trend monitoring still relies on the dashboard.

One-Time Setup

Google Search Console

  1. Verify ownership at search.google.com/search-console:
  2. DNS TXT record (preferred — survives server changes)
  3. HTML meta tag (requires deploying to the site)
  4. Submit sitemap: https://agentpatterns.dev/sitemap.xml
  5. Add the site as an sc-domain: property to cover all subdomains and protocols
  6. Add the service account email: Settings → Users and permissions → Add user → Restricted

Bing Webmaster Tools

  1. Verify ownership at bing.com/webmasters — DNS TXT or HTML meta tag
  2. Submit sitemap: https://agentpatterns.dev/sitemap.xml
  3. Enable IndexNow: Bing WMT → IndexNow → Auto-submit

GCP Service Account for API Access

# Create service account
gcloud iam service-accounts create gsc-reporter \
  --display-name="GSC Reporter"

# Create JSON key
gcloud iam service-accounts keys create gsc-key.json \
  --iam-account=gsc-reporter@<project-id>.iam.gserviceaccount.com

# Enable APIs
gcloud services enable searchconsole.googleapis.com chromeuxreport.googleapis.com

Add the service account email to GSC via Settings → Users and permissions → Add user.

Store credentials as GitHub Actions secrets:

Secret Value
GSC_SERVICE_ACCOUNT_JSON Full content of gsc-key.json
GSC_SITE_URL sc-domain:agentpatterns.dev
CRUX_API_KEY GCP API key restricted to Chrome UX Report API

Automated Weekly Report

A scheduled GitHub Actions workflow runs every Monday at 08:00 UTC, calls the GSC and CrUX APIs, and opens a GitHub issue with the results.

graph LR
    A[Schedule: Monday 08:00 UTC] --> B[Authenticate via service account]
    B --> C[Search Analytics API — top queries]
    B --> D[Sitemaps API — index coverage]
    B --> E[CrUX API — Core Web Vitals]
    C & D & E --> F[Build Markdown report]
    F --> G[Open GitHub issue — label: gsc-report]

Workflow: .github/workflows/gsc-weekly-report.yml Report script: scripts/gsc_report.py

Report sections:

Section API Notes
Index coverage GSC Sitemaps API Submitted vs indexed counts per sitemap
Core Web Vitals CrUX API Real user data, trailing 28 days, mobile
Top queries Search Analytics API Top 10 by impressions, last 7 days
Crawl anomalies GSC dashboard No bulk API — links to GSC Indexing → Pages
Schema errors GSC dashboard No bulk API — links to GSC Enhancements

On-Demand: /gsc-report

Run /gsc-report to fetch the latest data without waiting for the weekly schedule.

The gsc-report skill (.github/skills/gsc-report/SKILL.md) provides:

  • Authentication pattern using service account credentials
  • API call templates for queries, sitemaps, and CrUX
  • Output format matching the weekly report structure
  • Tips on rate limits, data lag, and CrUX dataset coverage

Trigger via GitHub CLI:

gh workflow run gsc-weekly-report.yml --repo OWNER/REPO

Or run locally:

# Requires GSC_SERVICE_ACCOUNT_JSON, GSC_SITE_URL, CRUX_API_KEY in env
uv pip install google-auth requests
python scripts/gsc_report.py
cat /tmp/gsc_report.md

Data Constraints

Constraint Detail
Search Analytics lag ~3 days — report end date is today - 3
CrUX window Trailing 28 days — not the past 7 days
URL Inspection rate limit 2,000 requests/day — spot-check only
Bing WMT No bulk CSV export — API exists but bulk analytics require dashboard
CrUX origin eligibility Insufficient real-user traffic returns 404 from CrUX API

Sources

When This Backfires

Automating GSC adds real infrastructure overhead — a GCP service account, stored credentials, and a weekly Actions workflow. The return on that investment degrades under these conditions:

  • Insufficient traffic: CrUX requires a minimum volume of real user data; the API returns 404 for low-traffic origins, making the Core Web Vitals section empty for most of its life.
  • Search Analytics lag: The 3-day data lag means the weekly report reflects conditions from 10+ days ago by the time it is acted on — too stale for incident response, where manual GSC checks are faster.
  • Single-property sites: GSC's Search Analytics API caps at 10 rows by default; sites with fewer than 50 indexed pages gain little over a manual 5-minute weekly check.
Feedback