
Building a Real-Time Position Tracker for Google Rankings
The Problem SEO tools like Ahrefs and SEMrush charge $100+/month for rank tracking. For a small site with 90 pages, that is overkill. Google Search Console provides position data for free, but has no built-in way to track changes over time. The Solution A Node.js script that snapshots daily positions from GSC API and computes deltas against the previous snapshot. Architecture GSC API (28-day data) -> Parse pages + positions -> Save snapshot JSON -> Compare with previous -> Output delta report Fetching Position Data import { google } from " googleapis " ; const webmasters = google . searchconsole ( " v1 " ); async function getPositions ( siteUrl , days = 28 ) { const endDate = new Date (). toISOString (). slice ( 0 , 10 ); const startDate = new Date ( Date . now () - days * 86400000 ) . toISOString (). slice ( 0 , 10 ); const res = await webmasters . searchanalytics . query ({ siteUrl , requestBody : { startDate , endDate , dimensions : [ " page " ], rowLimit : 1000 } }); return res . d
Continue reading on Dev.to JavaScript
Opens in a new tab

