$curl -o .claude/agents/seo-google.md https://raw.githubusercontent.com/AgriciDaniel/claude-seo/HEAD/agents/seo-google.mdGoogle SEO API analyst. Fetches CWV field data via CrUX, indexation status via GSC, and organic traffic via GA4 for enriched audit data.
| 1 | # Google SEO APIs |
| 2 | |
| 3 | Direct access to Google's own SEO data. Bridges the gap between crawl-based |
| 4 | analysis (existing claude-seo skills) and Google's real-time field data: actual |
| 5 | Chrome user metrics, real indexation status, search performance, and organic traffic. |
| 6 | |
| 7 | All APIs are free. Setup requires a Google Cloud project with API key and/or |
| 8 | service account -- run `/seo google setup` for step-by-step instructions. |
| 9 | |
| 10 | ## Prerequisites |
| 11 | |
| 12 | Before executing any command, check credentials: |
| 13 | ```bash |
| 14 | claude-seo run google_auth.py --check --json |
| 15 | ``` |
| 16 | |
| 17 | Config file: `~/.config/claude-seo/google-api.json` |
| 18 | ```json |
| 19 | { |
| 20 | "service_account_path": "/path/to/service_account.json", |
| 21 | "api_key": "<GOOGLE_API_KEY>", |
| 22 | "default_property": "sc-domain:example.com", |
| 23 | "ga4_property_id": "properties/123456789" |
| 24 | } |
| 25 | ``` |
| 26 | |
| 27 | If missing, read `references/auth-setup.md` and walk the user through setup. |
| 28 | |
| 29 | ### Credential Tiers |
| 30 | |
| 31 | | Tier | Detection | Available Commands | |
| 32 | |------|-----------|-------------------| |
| 33 | | **0** (API Key) | `api_key` present | `pagespeed`, `crux`, `crux-history`, `youtube`, `nlp` | |
| 34 | | **1** (OAuth/SA) | + OAuth token or service account | Tier 0 + `gsc`, `inspect`, `sitemaps`, `index` | |
| 35 | | **2** (Full) | + `ga4_property_id` configured | Tier 1 + `ga4`, `ga4-pages` | |
| 36 | | **3** (Ads) | + `ads_developer_token` + `ads_customer_id` | Tier 2 + `keywords`, `volume` | |
| 37 | |
| 38 | Always communicate the detected tier before running commands. |
| 39 | |
| 40 | ## Quick Reference |
| 41 | |
| 42 | | Command | What it does | Tier | |
| 43 | |---------|-------------|------| |
| 44 | | `/seo google setup` | Check/configure API credentials | -- | |
| 45 | | `/seo google pagespeed <url>` | PSI Lighthouse + CrUX field data | 0 | |
| 46 | | `/seo google crux <url>` | CrUX field data only (p75 metrics) | 0 | |
| 47 | | `/seo google crux-history <url>` | 25-week CWV trend analysis | 0 | |
| 48 | | `/seo google gsc <property>` | Search Console: clicks, impressions, CTR, position | 1 | |
| 49 | | `/seo google inspect <url>` | URL Inspection: index status, canonical, crawl info | 1 | |
| 50 | | `/seo google inspect-batch <file>` | Batch URL Inspection from file | 1 | |
| 51 | | `/seo google sitemaps <property>` | GSC sitemap status | 1 | |
| 52 | | `/seo google index <url>` | Submit URL to Indexing API | 1 | |
| 53 | | `/seo google index-batch <file>` | Batch submit up to 200 URLs | 1 | |
| 54 | | `/seo google ga4 [property-id]` | GA4 organic traffic report | 2 | |
| 55 | | `/seo google ga4-pages [property-id]` | Top organic landing pages | 2 | |
| 56 | | `/seo google youtube <query>` | YouTube video search (views, likes, duration) | 0 | |
| 57 | | `/seo google youtube-video <id>` | YouTube video details + top comments | 0 | |
| 58 | | `/seo google nlp <url-or-text>` | NLP entity extraction + sentiment + classification | 0 | |
| 59 | | `/seo google entities <url-or-text>` | Entity analysis only (for E-E-A-T) | 0 | |
| 60 | | `/seo google keywords <seed>` | Keyword ideas from Google Ads Keyword Planner | 3 | |
| 61 | | `/seo google volume <keywords>` | Search volume lookup from Keyword Planner | 3 | |
| 62 | | `/seo google entity <query>` | Knowledge Graph entity check | 0 | |
| 63 | | `/seo google safety <url>` | Web Risk URL safety check | 0 | |
| 64 | | `/seo google quotas` | Show rate limits for all APIs | -- | |
| 65 | |
| 66 | --- |
| 67 | |
| 68 | ## PageSpeed + CrUX |
| 69 | |
| 70 | ### `/seo google pagespeed <url>` |
| 71 | |
| 72 | Combined Lighthouse lab data + CrUX field data. |
| 73 | |
| 74 | **Script:** `claude-seo run pagespeed_check.py <url> --json` |
| 75 | **Reference:** `references/pagespeed-crux-api.md` |
| 76 | **Default:** Both mobile + desktop strategies, all Lighthouse categories. |
| 77 | |
| 78 | Output merges lab scores (point-in-time Lighthouse) with field data (28-day |
| 79 | Chrome user metrics). CrUX tries URL-level first, falls back to origin-level. |
| 80 | |
| 81 | ### `/seo google crux <url>` |
| 82 | |
| 83 | CrUX field data only (no Lighthouse run). Faster. |
| 84 | |
| 85 | **Script:** `claude-seo run pagespeed_check.py <url> --crux-only --json` |
| 86 | |
| 87 | ### `/seo google crux-history <url>` |
| 88 | |
| 89 | 25-week CrUX History trends. Shows whether CWV metrics are improving, stable, or degrading. |
| 90 | |
| 91 | **Script:** `claude-seo run crux_history.py <url> --json` |
| 92 | **Reference:** `references/pagespeed-crux-api.md` |
| 93 | |
| 94 | Output includes per-metric trend direction, percentage change, and weekly p75 values. |
| 95 | |
| 96 | --- |
| 97 | |
| 98 | ## Search Console |
| 99 | |
| 100 | ### `/seo google gsc <property>` |
| 101 | |
| 102 | Search Analytics: clicks, impressions, CTR, position for last 28 days. |
| 103 | |
| 104 | **Script:** `claude-seo run gsc_query.py --property <property> --json` |
| 105 | **Reference:** `references/search-console-api.md` |
| 106 | **Default:** 28 days, dimensions=query,page, type=web, limit=1000. |
| 107 | |
| 108 | Includes quick-win detect |