Skip to content

google-search-console-api

Use when working with Google Search Console API - search analytics, URL inspection, indexing requests, sitemap management, or SEO performance data. Also use when querying search impressions, clicks, CTR, or position data.

ModelSource
sonnetpack: google-apis
Full Reference

┏━ πŸ”§ google-search-console-api ━━━━━━━━━━━━━━━━━┓ ┃ Use when working with Google Search Console AP… ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Programmatic access to search performance data, URL inspection, and index management. Two distinct API services β€” use the correct one or calls will fail.

ItemValue
Base URL (Search Analytics, Sitemaps, Sites)https://www.googleapis.com/webmasters/v3
Base URL (URL Inspection)https://searchconsole.googleapis.com/v1
AuthOAuth 2.0 or Service Account (required)
Python clientpip install google-api-python-client google-auth
Node.js clientnpm install googleapis google-auth-library
Readonly scopehttps://www.googleapis.com/auth/webmasters.readonly
Read/write scopehttps://www.googleapis.com/auth/webmasters
Data freshness2–3 day delay
Historical data16 months
TaskPythonNode.js
Search Analytics, Sitemaps, Sitesbuild('webmasters', 'v3', ...)searchconsole({ version: 'v1', auth })
URL Inspectionbuild('searchconsole', 'v1', ...)google.searchconsole({ version: 'v1', auth })
EndpointPurpose
searchanalytics.querySearch performance data (clicks, impressions, CTR, position)
urlInspection.index.inspectCheck URL indexing status, mobile usability, rich results
sitemaps.list/submit/deleteManage sitemaps
sites.list/add/deleteManage properties
I want to…File
OAuth 2.0 setup, service accounts, code examplesreference/auth.md
Query performance data, dimensions, filters, paginationreference/search-analytics.md
Index status, mobile usability, rich results, AMPreference/url-inspection.md
Submit, list, and delete sitemapsreference/sitemaps.md
Add, list, and remove propertiesreference/sites.md
JobPosting/BroadcastEvent URL change notificationsreference/indexing.md
BigQuery bulk export, schemas, SQL examplesreference/bigquery-export.md
QPM/QPD quotas, backoff strategyreference/rate-limits.md
2024–2026 API additions and deprecationsreference/changelog.md

Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.