← 返回
开发者工具 Key 中文

Google SEO GEO Auto Index

Google Indexing API tool. Use when user wants to submit URLs for Google indexing. Supports two modes: "auto-index" (fetch sitemap, diff against cache, submit...
Google索引API工具。用于提交URL以供Google索引。支持两种模式:“auto-index”(获取sitemap,与缓存对比差异并提交...)
geoly-geo
开发者工具 clawhub v1.0.0 1 版本 99815.2 Key: 需要
★ 0
Stars
📥 540
下载
💾 12
安装
1
版本
#latest

概述

Auto-Index — Google Indexing API

Submit URLs to Google for fast indexing via the Google Indexing API.

Prerequisites

  1. Google Cloud Project with the Indexing API enabled
  2. Service Account with a downloaded JSON key file
  3. Google Search Console — add the service account email as an Owner of the property

Environment

VariableRequiredDescription
---------------------------------
GOOGLE_INDEX_SA_KEYYes (or --sa-key)Absolute path to service account JSON key file

How to Invoke

Run using uv run with the script's absolute path. The script directory is relative to the skill root.

auto-index — Sitemap diff

Fetches a sitemap, compares against a local cache, and submits only new URLs.

uv run scripts/google_index.py auto-index --sitemap "https://example.com/sitemap.xml"

Force re-index all URLs (ignore cache):

uv run scripts/google_index.py auto-index --sitemap "https://example.com/sitemap.xml" --force

index-now — Submit URL(s) immediately

uv run scripts/google_index.py index-now --url "https://example.com/new-page"

Multiple URLs:

uv run scripts/google_index.py index-now -u "https://example.com/page1" -u "https://example.com/page2"

Notify URL deletion:

uv run scripts/google_index.py index-now --url "https://example.com/old-page" --delete

CLI Reference

auto-index

FlagDescription
-------------------
--sitemap, -s(required) Sitemap URL to fetch
--sa-key, -kPath to service account JSON key (overrides env)
--force, -fRe-index all URLs, ignoring cache

index-now

FlagDescription
-------------------
--url, -u(required) URL to submit — repeatable for multiple URLs
--sa-key, -kPath to service account JSON key (overrides env)
--delete, -dNotify deletion instead of update

Output Format

Both commands output structured JSON:

{
  "meta": {
    "action": "auto-index",
    "sitemap": "https://example.com/sitemap.xml",
    "timestamp": "2026-03-02T02:50:00+00:00",
    "total_in_sitemap": 42,
    "new_urls": 5,
    "submitted": 5,
    "success": 5,
    "failed": 0
  },
  "results": [
    {
      "url": "https://example.com/new-page",
      "status": 200,
      "notifyTime": "2026-03-02T02:50:01.123Z"
    }
  ]
}

Cache

Sitemap URL cache is stored at ~/.cache/auto-index/sitemap-cache.json. This allows auto-index to only submit URLs that are new since the last run.

Delete the cache file to reset:

rm ~/.cache/auto-index/sitemap-cache.json

Quota

Google Indexing API allows 200 requests/day. The script auto-caps at this limit and logs a warning if exceeded.

Common Failures

ErrorFix
------------
No service account key providedSet GOOGLE_INDEX_SA_KEY env or pass --sa-key
Service account key file not foundCheck the file path
403 / Permission deniedEnsure the SA email is an Owner in Search Console
429 / Quota exceededWait 24h or request quota increase in Cloud Console
No URLs found in sitemapCheck the sitemap URL is valid and accessible

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 12:11 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 68 📥 180,260
data-analysis

GEO Performance Report Builder

geoly-geo
构建包含执行摘要、平台细分、竞争分析和战略行动计划的全面GEO绩效报告。
★ 0 📥 856
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 669 📥 324,253