Google Search Console API
The Google Search Console API (formerly Webmaster Tools API) allows developers to programmatically access Search Console data, enabling automation and integration with other systems.
Key Features
-
Retrieve search analytics data: Get click, impression, CTR, and position data for your site
-
Submit sitemaps: Programmatically submit and manage sitemaps
-
Inspect URLs: Check indexing status and issues for specific URLs
-
Manage properties: Add/remove sites from your Search Console account
-
Access crawl error reports: Get information about crawl errors
Common Use Cases
-
Automating regular search performance reports
-
Building custom dashboards combining Search Console with other data
-
Monitoring indexing status at scale
-
Integrating search data with CRM or analytics platforms
-
Creating alerts for significant changes in search performance
Authentication
The API uses OAuth 2.0 for authentication. You’ll need to:
-
Create a project in Google Cloud Console
-
Enable the Search Console API
-
Obtain API credentials (client ID and secret)
-
Implement the OAuth flow in your application
Example API Endpoints
-
searchanalytics.query
: For search performance data -
sitemaps.list
: To retrieve submitted sitemaps -
urlInspection.index.inspect
: For URL inspection -
sites.list
: To get list of verified sites
Rate Limits
The API has quota limits (typically 1,200 queries per day per project, with additional limits per minute).
Getting Started
-
Visit the Google API Console
-
Enable the “Google Search Console API”
-
Follow the documentation for your preferred language (Python, Java, JavaScript, etc.)
Would you like more specific information about any particular aspect of the Search Console API?