DEV Community

Tugelbay Konabayev
Tugelbay Konabayev

Posted on • Originally published at about-kazakhstan.com

How I Used Google Search Console API to Track a Travel Sites Growth

I built about-kazakhstan.com as a side project -- a travel guide for Kazakhstan. After publishing 83 articles, I needed to track which pages Google actually indexed and which keywords drove impressions.

The Problem

Google Search Console web UI is limited. You cannot bulk-check index status, track position changes over time, or detect keyword cannibalization across 90 URLs manually.

The Solution: Node.js + GSC API

I wrote a set of scripts that run daily via GitHub Actions:

// gsc-check-all.mjs -- bulk index status checker
const { google } = require("googleapis");
const searchconsole = google.searchconsole("v1");

async function checkUrl(url) {
  const res = await searchconsole.urlInspection.index.inspect({
    requestBody: {
      inspectionUrl: url,
      siteUrl: "https://about-kazakhstan.com/"
    }
  });
  return res.data.inspectionResult.indexStatusResult;
}
Enter fullscreen mode Exit fullscreen mode

Scripts I Built

Script Purpose
gsc-check-all.mjs Bulk index status for all URLs
position-tracker.mjs Daily position snapshots with deltas
ctr-optimizer.mjs Find pages with impressions but 0% CTR
cannibalization-detector.mjs Queries hitting multiple pages
content-quality-check.mjs 17-point content audit

Results

  • Index rate tracking: 20% (18/90 URLs) -- helped me identify authority as the bottleneck
  • Found 5 pages with 50+ impressions and 0 clicks -- fixed titles, got first click
  • Detected 1 cannibalization issue -- merged content
  • One article reached page 1 (position 8) for its target keyword

Tech Stack

  • Site: Astro + Cloudflare Pages
  • Scripts: Node.js ESM
  • APIs: Google Search Console, Google Indexing API, DataForSEO
  • CI: GitHub Actions (daily SEO monitoring)
  • Analytics: Umami (self-hosted on VPS)

The full project is at about-kazakhstan.com. Source scripts are open for reference.

What metrics do you track for your side projects?

Top comments (0)