The Google Search Console UI gives you a good overview. The API gives you everything else. Most teams interact with GSC through the dashboard, which means they're limited to 16-month data windows, fixed dimensions, and manual exports. The API removes almost all of those constraints — and opens up automation workflows that would take hours a week to do manually.
The Search Analytics API: beyond basic clicks and impressions
The Search Analytics endpoint (/searchanalytics/query) is the one most teams know — it's how you pull clicks, impressions, CTR, and position data. But the default UI only shows combinations of a few dimensions. The API supports querying on page, query, country, device, and search type simultaneously, which opens up analysis the UI simply can't surface.
// Compare mobile vs. desktop performance per URL
const response = await fetch(
`https://www.googleapis.com/webmasters/v3/sites/${encodeURIComponent(siteUrl)}/searchAnalytics/query`,
{
method: 'POST',
headers: { Authorization: `Bearer ${accessToken}`, 'Content-Type': 'application/json' },
body: JSON.stringify({
startDate: '2026-01-01',
endDate: '2026-05-01',
dimensions: ['page', 'device'],
dimensionFilterGroups: [{
filters: [{ dimension: 'device', operator: 'equals', expression: 'MOBILE' }]
}],
rowLimit: 1000,
}),
}
);URL Inspection API: bulk index status checking
The URL Inspection API lets you check the index status of any URL: whether it's indexed, when it was last crawled, what the canonical is, whether rich results are detected, and any mobile usability issues.
The URL Inspection API has a quota of 2,000 requests per day per property. For bulk workflows, prioritise recently published and recently updated URLs rather than running checks across your entire site daily.
Sitemaps API: programmatic sitemap management
Most teams submit sitemaps once and forget about them. The Sitemaps API lets you submit new sitemaps, list all submitted sitemaps, check submission status, and delete old ones — all programmatically.
async function submitSitemap(siteUrl: string, sitemapUrl: string, accessToken: string) {
const res = await fetch(
`https://www.googleapis.com/webmasters/v3/sites/${encodeURIComponent(siteUrl)}/sitemaps/${encodeURIComponent(sitemapUrl)}`,
{ method: 'PUT', headers: { Authorization: `Bearer ${accessToken}` } }
);
return res.status === 204; // 204 = success
}Building a practical automation stack
- 01On content publish → trigger URL submission via Indexing API + sitemap submission
- 0224 hours post-publish → check index status via URL Inspection API, alert if not indexed
- 03Weekly → pull Search Analytics data, identify declining CTR patterns and rank drops
- 04Monthly → cross-reference top-impression pages against index status to catch cannibalization
- 05On CMS content deletion → submit URL_DELETED notification via Indexing API
Rate limits and error handling in practice
Beyond URL Inspection quota (2,000/day), the Search Analytics API allows up to 1,200 requests per minute, per property. The Indexing API is 200 URL notifications per day. Errors worth handling explicitly: 403 (auth/permission), 429 (rate limit — back off), 500 (retry with exponential backoff), and 503 (service unavailable, typically transient).
visibility score
See how discoverable your content is to AI search engines — free, no card required.
Start free →