# Search Console Connect

Connect to Google Search Console API to pull real organic search data, traffic trends...

- Repository: https://github.com/LeoYeAI/openclaw-marketing-skills (1053 stars)
- Category: Marketing
- License: see repository
- Last updated: 2026-06-02
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add LeoYeAI/openclaw-marketing-skills --skill search-console-connect -g -a claude-code -y`
Codex: `npx skills add LeoYeAI/openclaw-marketing-skills --skill search-console-connect -g -a codex -y`
Cursor: `npx skills add LeoYeAI/openclaw-marketing-skills --skill search-console-connect -g -a cursor -y`
Gemini CLI: `npx skills add LeoYeAI/openclaw-marketing-skills --skill search-console-connect -g -a gemini-cli -y`

## Description

Connect to Google Search Console API to pull real organic search data, traffic trends, ranking positions, impressions, CTR, top queries, and page-level performance. Use when the user wants to audit SEO with real data, diagnose traffic drops, find quick-win keywords, or understand what's actually driving (or losing) organic traffic. Enhances seo-audit and ai-seo skills with real GSC data. Triggers on: 'why did my traffic drop', 'what keywords am I ranking for', 'SEO audit with real data', 'Search Console data', 'organic traffic analysis', 'which pages to optimize'.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Search Console Connect

You are an SEO analyst with direct access to the user's Google Search Console data. You pull real traffic and ranking data to replace guesswork with evidence, then tell the user exactly what to fix and in what order.

## Setup (First Time)

Check for `.agents/search-console-credentials.json`. If missing, guide setup:

### Option A: gcloud CLI (Easiest)

```bash
# Install Google Cloud SDK if not present
# Then authenticate:
gcloud auth application-default login \
  --scopes=https://www.googleapis.com/auth/webmasters.readonly

# Enable Search Console API
gcloud services enable searchconsole.googleapis.com
```

Credentials auto-saved to `~/.config/gcloud/application_default_credentials.json`

### Option B: Service Account (For Automation)

1. Google Cloud Console → IAM → Service Accounts → Create
2. Download JSON key
3. In Search Console → Settings → Users and Permissions → Add user (service account email, Owner)
4. Save key path to `.agents/search-console-credentials.json`:

```json
{
  "type": "service_account",
  "key_file": "/path/to/service-account-key.json",
  "site_url": "https://yourdomain.com"
}
```

---

## Data Pull

```bash
python skills/search-console-connect/scripts/pull.py \
  --site https://yourdomain.com \
  --days 90 \
  --output .agents/gsc-data.json
```

Fetches:
- **Top queries**: impressions, clicks, avg position, CTR (last 90 days)
- **Top pages**: same metrics by URL
- **Traffic trend**: daily clicks over time (spot drops)
- **Position distribution**: how many keywords rank 1-3, 4-10, 11-20, 21-50, 51+
- **Coverage report**: indexed vs. not indexed, errors

---

## Analysis Framework

### Traffic Drop Diagnosis

If the user reports a drop, run this sequence:

The rest: https://github.com/LeoYeAI/openclaw-marketing-skills/blob/HEAD/skills/search-console-connect/SKILL.md
