SEOVENTRA
Home/Blog/Guides
Guides2 min read

Building Reliable Indexing Pipelines with GSC APIs

Authentication, workflows, rate limits, and operational considerations when working with Google Search Console APIs.

AR
Asar R.
CTO
April 28, 2025
2 min Β· 538 words
Tags
GSCGoogleAPIIndexingAuthentication
Share

The Google Search Console Indexing API is powerful but unforgiving. Quota limits, OAuth complexity, and opaque error responses make building production-grade pipelines harder than the documentation suggests. This is a practical guide through the real challenges.

Authentication: service accounts vs. OAuth

There are two authentication paths for the GSC APIs: delegated OAuth (user-consented access) and service accounts (server-to-server). For production indexing pipelines, service accounts are almost always the right choice.

  • β†’Service accounts don't require user re-consent and work without human interaction
  • β†’OAuth tokens expire and need refresh logic; service accounts use JWT-based auth that's easier to manage at scale
  • β†’Service accounts require being added as an owner or full user to each GSC property β€” this is a one-time setup step
typescript
import { google } from 'googleapis';

// Load service account credentials
const auth = new google.auth.GoogleAuth({
  credentials: JSON.parse(process.env.GSC_SERVICE_ACCOUNT_JSON!),
  scopes: [
    'https://www.googleapis.com/auth/indexing',
    'https://www.googleapis.com/auth/webmasters',
  ],
});

const indexing = google.indexing({ version: 'v3', auth });

// Submit a URL for indexing
async function submitUrl(url: string) {
  const res = await indexing.urlNotifications.publish({
    requestBody: {
      url,
      type: 'URL_UPDATED', // or URL_DELETED
    },
  });
  return res.data;
}

The quota reality

The Indexing API has a default quota of 200 URL submissions per day per project. This is separate from the Search Console API quota. For sites with large content volumes, this is the single biggest operational constraint.

⚠Quota is per project, not per property

If you're managing multiple GSC properties with one service account project, all properties share the same 200/day quota. Structure your projects accordingly β€” or request a quota increase via Google Cloud console.

Queue management and retry logic

The naive approach β€” submit all URLs immediately when content changes β€” breaks down quickly under quota limits. Production pipelines need a queue with:

  1. 01Priority scoring (new content > updated content > re-validation requests)
  2. 02Exponential backoff on rate limit errors (HTTP 429)
  3. 03Status tracking per URL with last submission timestamp
  4. 04Dead letter handling for URLs that fail repeatedly
  5. 05Quota awareness β€” distribute submissions across the 24-hour reset window

Monitoring indexing status

The GSC URL Inspection API lets you programmatically check the index status of any URL. Combining submission tracking with status checks gives you a complete picture of your indexing pipeline health.

typescript
async function checkIndexStatus(siteUrl: string, inspectUrl: string) {
  const webmasters = google.webmasters({ version: 'v3', auth });
  
  const res = await webmasters.urlInspection.index.inspect({
    requestBody: {
      inspectionUrl: inspectUrl,
      siteUrl: siteUrl,
    },
  });

  const result = res.data.inspectionResult;
  return {
    coverageState: result?.indexStatusResult?.coverageState,
    indexingState: result?.indexStatusResult?.indexingState,
    lastCrawlTime: result?.indexStatusResult?.lastCrawlTime,
    robotsTxtState: result?.indexStatusResult?.robotsTxtState,
  };
}

Error categories and how to handle them

ErrorHTTP StatusMeaningAction
INVALID_ARGUMENT400Malformed URL or request bodyFix URL format, retry
QUOTA_EXCEEDED429Daily quota consumedQueue for next reset window
FORBIDDEN403Service account not authorisedRe-add account to GSC property
NOT_FOUND404URL not accessible to GoogleCheck robots.txt / noindex tags
INTERNAL500Google-side errorRetry with exponential backoff

Production checklist

  • β†’Service account JSON stored as a secure secret (not committed to version control)
  • β†’Service account added as Search Console property owner
  • β†’Queue processor with priority scoring and quota tracking
  • β†’Exponential backoff with jitter on 429 responses
  • β†’Daily quota monitoring with alert at 80% utilisation
  • β†’Status check reconciliation β€” verify submitted URLs reach "Submitted and indexed" state
  • β†’Logging per submission with URL, timestamp, HTTP status, and response body
Contents
01Authentication: service accounts vs. OAuth
02The quota reality
03Queue management and retry logic
04Monitoring indexing status
05Error categories and how to handle them
06Production checklist
Audit your AI
visibility score

See how discoverable your content is to AI search engines β€” free, no card required.

Start free β†’
Related reading
All posts β†’
Back to blogPublished April 28, 2025 Β· 12 min read