ΞUNIT
AboutBlogResearchHealthProjectsContact
Login
ΞUNIT

Building digital experiences that matter. Software engineer, technical writer, and advocate for better web technologies.

Resources

  • Design System
  • My Journey
  • Guestbook
  • Health Blogs

Stay Updated

Get the latest articles and insights directly in your inbox. No spam, ever.

© 2026. All rights reserved. Built with ⚡️ by Ξunit
Abuja, Nigeria
+234 811 086 3115
Instant SEO: Automated Google Indexing & Sitemap Submitter
Back to Case Studies
Case Study

Instant SEO: Automated Google Indexing & Sitemap Submitter

A high-performance automation tool that forces Google to crawl your site instantly. Parses sitemaps, manages Service Account auth, and utilizes the Google Indexing API to cut indexing time from weeks to minutes.

The Challenge

Problem Statement

New content often stagnates in the 'Discovered - currently not indexed' limbo for weeks due to limited crawl budgets and Google's passive indexing frequency.
The Vision

Solution

I built an autonomous agent that actively 'pushes' URL updates to Google. It parses entire sitemaps (and nested indices), handles authentication securely, and submits URLs in bulk using the Google Indexing API.

Process & Execution

Introduction: The Waiting Game is Over

In the world of SEO, speed is revenue. You can write the best content or build the most dynamic programmatic pages, but if Google doesn't index them, they don't exist. For developers and content strategists, the most frustrating status message in Google Search Console is "Discovered - currently not indexed."

Traditional indexing is passive. You update a sitemap and wait for Googlebot to decide it's time to visit. For large sites or fresh news portals, this latency—often spanning days or weeks—is unacceptable.

I built the Google Indexer & Instant SEO Submitter to solve this specific latency problem. It turns SEO from a passive waiting game into an active, programmatic workflow.

The Challenge: Passive Crawling vs. Active Notification

The core technical challenge wasn't just "calling an API." It was creating a system that could bridge the gap between a developer's raw content list (sitemaps) and Google's strict security requirements, all while handling scale.

1. The "Crawl Budget" Bottleneck

Google assigns every site a crawl budget. If you launch 1,000 new programmatic pages, Google might only crawl 50 a day. At that rate, it takes nearly a month to get fully indexed.

2. Authentication Complexity

The Google Indexing API requires a Service Account with a specific set of permissions and a JSON key file. It is not a simple API Key interaction; it involves OAuth2 signaling and JWT signing. The tool needed to accept these sensitive credentials securely from the user without storing them permanently.

3. Sitemap Recursion

Modern sitemaps aren't just flat lists of URLs. They are often Sitemap Indices—parents pointing to children, which point to other children. A robust tool needs to traverse this tree structure to find every single indexable URL.

The Architecture: A Serverless "Push" Agent

The solution is built as an Apify Actor using TypeScript and Node.js. I chose the Actor model because it provides a serverless environments that creates ephemeral containers for each run, ensuring user credentials (the Service Account JSON) are never persisted beyond the execution context.

Technical Stack Breakdown

  • Runtime: Node.js (v20+)
  • Core Logic: TypeScript for type safety, particularly when handling complex Google API response shapes.
  • Integration: googleapis library for native interaction with Google’s endpoints.
  • Parsing: xml2js for transforming XML sitemap streams into usable JavaScript objects.

Core Logic Loop

Here is how the system processes a request:

  1. Input Parsing: The Actor accepts a Service Account JSON and a target (Sitemap URL or Dataset ID).
  2. Sitemap Traversal: It fetches the XML. If it detects a <sitemapindex>, it recursively fetches child sitemaps in parallel.
  3. Filtration: It deduplicates URLs to save costs and API quota.
  4. Submission: It authenticates via the Service Account and fires URL_UPDATED or URL_DELETED requests to Google.
// Recursively fetch sitemaps (Simplified snippet) async function fetchAndParseSitemap(url: string): Promise<Set<string>> { const urls = new Set<string>(); const xml = await fetch(url).then(res => res.text()); const result = await parseStringPromise(xml); // Handle Sitemap Index (Recursion) if (result.sitemapindex) { const childMaps = result.sitemapindex.sitemap; await Promise.all(childMaps.map(m => fetchAndParseSitemap(m.loc[0]))); } // Handle Standard UrlSet if (result.urlset) { result.urlset.url.forEach(u => urls.add(u.loc[0])); } return urls; }

The "Aha!" Moment: Error 429 and Resilience

During beta testing with a user who had 50,000 pages, the Actor crashed. We hit Google's rate limit: HTTP 429 (Too Many Requests).

I realized that simply "awaiting" promises wasn't enough. I had to implement an intelligent backoff strategy. I built a wrapper around the API calls that detects 429 errors and automatically pauses the execution thread.

if (error.code === 429) { console.warn('Hit rate limit (429). Pausing for 60s...'); await new Promise(resolve => setTimeout(resolve, 60000)); // Retry logic ensues... }

This simple addition turned a fragile script into a production-grade tool that can run for hours without supervision, respecting Google's quotas while maximizing throughput.

Performance & Results

The results have been transformative for users relying on freshness:

  • Indexing Speed: Users report URLs appearing in search results within 10 to 45 minutes of submission, compared to previous wait times of 5-10 days.
  • Reliability: The Actor currently holds a 100% Success Rate across all runs.
  • Efficiency: Capable of processing thousands of URLs in a single batch, making it ideal for large e-commerce sites or news publishers.

Future Roadmap

I am currently working on expanding the capabilities of this tool:

  1. Bing Indexing API: Google isn't the only player. Adding Bing support will double the value.
  2. Index Status Checking: Before submitting, check if the URL is already indexed to save API quota.
  3. UI Front-end: A simple dashboard to visualize submission success rates over time.

Wrapping Up

Stop waiting for Googlebot. Take control of your SEO destiny.

To see this tool in action or integrate it into your own pipeline:

  • Try the Live Actor on Apify.
Reflection

Lessons Learned

"Mastered the intricacies of Google's OAuth2 Service Account flow and implemented robust error handling for API rate limits (HTTP 429) to ensure 100% submission reliability."

Stack

TypeScriptNode.jsApify SDKGoogle Indexing APIGoogle Cloud Platform (IAM)xml2js

Role

Responsibility

Author & Lead Developer

More Projects

View All
MyTherapist.ng - Online Therapy for Nigerians
Portfolio

MyTherapist.ng - Online Therapy for Nigerians

Mytherapist.ng is a platform that connects individuals seeking mental health support with licensed and certified therapists.

#NextJS#TailwindCSS#Firebase
DA Lewis Consulting
Portfolio

DA Lewis Consulting

DALC, LLC specializes in equal employment opportunity, diversity and inclusion, human resources, and business consulting.

#HTML5#CSS3#JavaScript
HostelPaddy
Portfolio

HostelPaddy

Your No.1 Solution for hostel accommodation. Application for Nigerian students to easily search for hostel accommodation.

#HTML5#CSS3#Bootstrap