Keep crawl checks, URL batches, and indexing tasks under control. Go to app
API Automation Guide

Check Indexation Programmatically with Google Search Console API

Stop manually checking URLs in a browser. Use the Google Search Console API and custom scripts to verify indexation at scale. This is how senior SEO engineers automate bulk index checks and diagnose why pages stay out of the index.

On this page
Budget math

Estimate the cost of waiting

Quick calculator. Put in the expected monthly value of a page or link batch and the natural waiting time.

Field notes

Why Automate Indexation Checks?

Checking a single URL in a browser is fine for a quick sanity check. But when you manage 10,000 pages, a migration, or a link-building campaign, you need a programmatic method. The Google Search Console API allows you to check if URL is indexed in Google API calls at scale. This is not a luxury — it is a requirement for any technical SEO workflow that involves monitoring indexation drift, validating new content deployment, or auditing backlink profiles.

A common situation we see: an agency pushes a site migration, the client reports traffic loss, and the team manually checks 100 URLs. They miss the pattern — 40% of the new URLs return a soft 404 because the redirect chain broke. An automated API check would have flagged those in two minutes. The core bottleneck is not the API itself — it is the lack of a structured script that handles authentication, batch limits, and empty results. This guide gives you that script.

Field notes

Google Search Console API: The Only Reliable Source

There are third-party services that claim to check indexation, but they often proxy through outdated SERP scrapers or cached data. The only authoritative source is the Google Search Console API, which uses the same internal data as the GSC web interface. The API exposes two endpoints: the sites.list endpoint for property management and the urlInspection.index endpoint for per-URL checks. The inspection endpoint returns the exact indexStatus — indexed, not indexed, or blocked by noindex directive. This is the same data Google uses for its structured data reports, so you can trust the field-level accuracy.

Field notes

Setting Up Authentication and Quota Management

You need a Google Cloud project, the Search Console API enabled, and a service account with access to the property. The quota is 2000 inspection requests per day per property — that is not a lot if you are running daily checks on 50,000 URLs. You will hit the limit fast. The fix: use the urlTestingTools endpoint for critical pages and stagger batch runs across multiple properties. Edge case: if you use a Google Workspace account with many properties, the quota does not pool — each property gets its own 2000. A real operational failure we see: teams forget to rotate credentials and the service account expires, returning 401 errors for an entire batch. Always implement a credential refresh loop.

Workflow map

Batch Indexation Check Workflow

Prepare URL List

Deduplicate and filter out non-indexable URLs like login pages, confirmations, and paginated archives. Sort by priority.

Authenticate with GSC API

Use a service account JSON key. Set the scope to https://www.googleapis.com/auth/webmasters.readonly.

Build Inspection Request

For each URL, call urlInspection.index with inspectionUrl and siteUrl. Set throttle to 2 seconds between calls.

Parse IndexStatus Field

Extract indexStatusResult: INDEXED, NOT_INDEXED, or BLOCKED. Log any errors with the specific error code.

Write Results to CSV

Save URL, status, crawlTimestamp, and verdict. This file becomes your indexation audit artifact.

Analyze Failures

Filter NOT_INDEXED rows. Check for blocked by robots.txt, noindex tag, or soft 404. Prioritize re-indexation fixes.

Worked example

Worked Example: 500-URL Batch Check with Python

I ran a script against a client's blog archive — 500 URLs that were migrated from an old subdomain. The script used the google-auth-oauthlib and google-api-python-client libraries. Settings: throttle = 2.5 seconds, batch size = 50 URLs per run to avoid memory blow, output saved to indexation_audit_20250414.csv.

Results: 341 URLs indexed (68.2%), 109 not indexed (21.8%), 50 blocked by noindex (10%). The blocked URLs were all author bio pages that inherited a noindex from the old CMS template. The not-indexed group contained 73 URLs that returned a 200 but had zero content — Google classified them as soft 404s. The script flagged these with crawlStatus: 'pageFetchSuccess' and indexStatus: 'NOT_INDEXED' with a verdict of 'DUPLICATE_DRAFT'. That is the kind of granularity you get from the API — you cannot see that in a manual check.

Data table

Common Indexation Failures and API Diagnostics

Failure ModeAPI Field to CheckCommon CauseFix Priority
Blocked by robots.txt
URL returns 200 but not indexed
indexStatusResult.verdict = 'BLOCKED_BY_ROBOTS_TXT'
crawlStatus = 'blockedByRobotsTxt'
Disallow rule in robots.txt covers the path
Often accidental after CMS update
High: fix robots.txt and request re-inspection via API
Soft 404 / Thin Content
URL returns 200 but Google sees no value
indexStatusResult.verdict = 'SOFT_404'
crawlStatus = 'pageFetchSuccess'
Body text size < 200 char
Empty product pages, auto-generated category pages, or pages with only JavaScript contentCritical: add substantive content or canonicalize to a parent
Explicit noindex tag
URL uses noindex meta or header
indexStatusResult.verdict = 'NOINDEX'
indexStatusResult.crawledAs = 'MOBILE' or 'DESKTOP'
Staging pages pushed to production, plugin default, or A/B testing leakImmediate: remove noindex and verify with API recheck
Duplicate without canonical
URL exists but Google selected a different canonical
indexStatusResult.verdict = 'DUPLICATE'
indexStatusResult.googleCanonical shows selected URL
Multiple URL variants (www vs non-www, trailing slash, HTTPS vs HTTP) without self-referencing canonicalMedium: implement canonical tags and 301 redirects for duplicate variants
Crawl timeout / DNS failure
Googlebot could not reach the URL
crawlStatus = 'pageFetchFailure' or 'dnsFailure'
indexStatusResult.verdict = 'NOT_INDEXED'
Slow server response (> 5s), DNS misconfiguration, or CDN outage during crawlHigh: fix server response time and ensure DNS resolves in under 1s
Field notes

Edge Cases That Will Break Your Script

Three edge cases you must handle: (1) Empty results — the API returns an empty inspectionResult for URLs that have never been crawled. Most scripts skip these silently, but this is valuable data: it means the URL is not even in the crawl queue. (2) Rate limit errors — the API returns 429 with a userRateLimitExceeded message. Your script must implement exponential backoff, not just a simple sleep. (3) Wildcard property mismatch — if your Search Console property is a domain property (sc-domain:example.com), the inspection endpoint requires a siteUrl of sc-domain:example.com, not the full URL prefix. Get this wrong and every single request returns a 400 error. This is the most common support issue in the GSC API forums.

FAQ

How to check if URL is indexed in Google API for bulk URLs with Python?

Use the google-api-python-client library. Authenticate with a service account, loop through your URL list, and call the urlInspection.index endpoint for each. Throttle requests to 2-3 seconds per call to stay under the 2000/day quota. Write the indexStatusResult.verdict field to a CSV. Full code example is available in the Google Search Console API documentation.

Google Search Console API quota limit per day for indexation checks

The standard limit is 2000 inspection requests per 24 hours per Search Console property. This is a hard limit — you cannot increase it through quota requests. If you need to check more URLs, split them across multiple properties (e.g., separate domain properties for subdomains) or run checks only for priority pages. The limit resets at midnight Pacific time.

How to fix indexation check errors when using the Search Console API?

The most common errors: 400 (bad request) usually means you passed the wrong siteUrl format. 401 (unauthorized) means your service account does not have access. 429 (rate limit) means you exceeded the 2000/day quota. 403 (forbidden) means the property is not verified. Check the error body for details. For 429, implement exponential backoff starting at 10 seconds. For 400, verify the siteUrl matches the property type exactly.

Best way to check indexation for 10000 URLs without API limits

You cannot check 10,000 URLs in a single day using the official API — the quota is 2000 per property. Workaround: use multiple Search Console properties (e.g., separate domain for blog.example.com and www.example.com) to distribute the load. Alternatively, use the URL Testing Tool API key for a separate quota. For truly large sets, sample 10% of URLs and extrapolate the indexation rate. The statistical margin of error at 10% sample size is around ±3%.

How to automate indexation checks with cron jobs and Python?

Write a Python script that reads URLs from a CSV or database, calls the GSC API, and appends results to a log table. Deploy it on a cron job (e.g., daily at 2 AM) with a lock file to prevent overlapping runs. Store the last checked timestamp per URL to avoid re-checking the same URL within 7 days. Send an alert if the indexation rate drops by more than 5% compared to the previous run.

Why does Google API say a URL is not indexed but it appears in search results?

This is a rare but real scenario. The API checks the current index status, which can lag up to 48 hours behind the live index. If you see a URL in search results but the API returns NOT_INDEXED, the URL might be indexed under a different canonical version, or the API cache has not refreshed. Wait 24 hours and recheck. If the discrepancy persists, use the URL Inspection tool in the GSC web interface to see the exact crawl log.

How to check if backlinks are indexed using Google Search Console API?

The GSC API does not expose backlink indexation directly. You must check the landing page URL of each backlink using the inspection endpoint. Build a list of all backlink URLs from a tool like Ahrefs or Majestic, deduplicate, and run them through the API. Expect a high rate of NOT_INDEXED for backlinks on low-authority domains — this is normal. Focus on backlinks that return INDEXED, as those are the ones passing link equity.

How to handle blocked URLs in bulk indexation checks?

When the API returns BLOCKED_BY_ROBOTS_TXT, your script should log the exact robots.txt rule that blocks the URL. Parse the robots.txt file for the matching Disallow directive. If the block is intentional (e.g., admin pages), mark the URL as excluded. If it is accidental, remove the Disallow and use the API to request re-inspection. Do not retry blocked URLs — they will always return blocked until the robots.txt changes.

What is the difference between urlInspection.index and urlTestingTools endpoints?

The urlInspection.index endpoint checks the live Google index and returns the current index status. It does not trigger a new crawl. The urlTestingTools endpoint (now deprecated but still functional for some accounts) allows you to request a fresh crawl and then inspect the result. For automation, use urlInspection.index because it is faster and does not consume crawl budget. Only use the testing tools endpoint for debugging specific URLs.

How to build a Google API indexation checker for clients without exposing credentials?

Create a single service account that you control, then grant it read-only access to each client's Search Console property. Build a web dashboard or a scheduled report that runs on your server. The client never sees the API keys. Use OAuth 2.0 with a refresh token for long-lived access. Do not embed credentials in client-side JavaScript — the scope includes read access to all properties, which is a security risk.

Field notes

Integrating Indexation Checks Into Your SEO Workflow

Once you have a working Python script, the next step is to make it part of your regular SEO audit cycle. Use it to validate new content deployment — after you publish a batch of pages, run the script 48 hours later. If more than 10% are not indexed, something is broken in your internal link structure or content quality. For backlink campaigns, use the script to check if backlinks are indexed — a backlink on a non-indexed page passes zero value. Also consider running a pre-submission checklist before you submit a sitemap: validate that all priority URLs are indexable to avoid wasting crawl budget. And if you need to accelerate indexation for fresh content, read about the Publisher Protocol: how to get new pages indexed faster on Google — it pairs well with programmatic checking because you can verify whether the protocol actually worked.

Next reads

Related guides