Skip to content

Open-source tool · Agency SEO

Making organic search analysis repeatable

SEO Rankings Report

A Python CLI that pulls Google Search Console data and compares two periods so SEO teams can see which pages and queries gained or lost clicks—without rebuilding the same spreadsheet every week.

Role
Developer / SEO Specialist
Context
MacMillan Search · open-sourced afterward
Status
Public source code
Year
2024–2025
  • Python 3.11+
  • Google Search Console API
  • OAuth 2.0
  • Caching
  • Markdown / JSON / CSV
  • Docker

Overview

At MacMillan Search, recurring performance reviews meant rebuilding the same Search Console comparisons by hand. This tool automates that assembly so analysts spend time on interpretation instead of exports.\n\nIt ran beside organic growth work for a Canadian HR/payroll SaaS platform. The 226% average click increase across 18 pages belongs to that engagement; this tool is the measurement workflow that made the monthly review repeatable. Full case study: B2B SaaS organic growth.

Results

  • Page- and query-level winners/losers comparisons from Search Console
  • Configurable filters for brand terms, country, device and URL patterns
  • Markdown, JSON, CSV and Google Sheets output for agency handoff

The problem

Organic performance reviews for agency accounts required manual collection from Search Console. Analysts rebuilt the same period-over-period views each cycle, which slowed prioritization and made week-over-week changes harder to trust.

Constraints

Real Search Console properties, OAuth authentication, configurable per client, explainable to SEO specialists who are not engineers, and no dependency on a heavyweight BI product.

What I owned

Designed and implemented the reporting workflow end to end: API client, caching, configuration, validation, analysis engine and report generation.

Alternatives considered

Spreadsheet templates drifted between accounts. Notebooks did not transfer cleanly. A full BI dashboard would have been slower to ship and harder for day-to-day SEO operators to own.

Why this approach

A CLI-first Python tool with cached API responses, explicit comparison logic and multiple export formats—auditable and reusable across properties.

Implementation & validation

The tool authenticates with OAuth 2.0, accepts domain or URL-prefix properties, compares a current window against a previous window and ranks pages by click delta. Query-level drilldowns show which terms drove the change. Optional filters cover non-branded analysis, country, device and URL patterns. Results export as Markdown reports, JSON, CSV or Google Sheets. Caching with TTL and optional Docker packaging keep repeated runs practical for agency cadence.

Outcome

A reusable winners-and-losers workflow. Source code is public; client property data stays out of the repository. Growth outcomes from pages optimized with this loop are documented separately in the B2B SaaS case study.

What the tool compares

Inputs and outputs for a typical winners/losers run
StageDetail
InputGSC property, date ranges, optional brand/country/device/URL filters
AcquisitionSearch Console API with OAuth; responses cached with configurable TTL
CalculationPage-level click/impression/position deltas vs prior period
RankingPages sorted by click gain or loss; queries contributing to each page
OutputMarkdown report, JSON, CSV or Google Sheets worksheet
LimitsGSC sampling/aggregation, property access and incomplete historical data

How winners and losers are defined

A winner is a page whose clicks increased between the selected periods; a loser is a page whose clicks decreased. The report also surfaces impression and average-position movement so a click gain is not mistaken for a ranking improvement alone.\n\nQuery drilldowns list the search terms that contributed most to each page’s change. Non-branded mode excludes configured brand terms when the question is competitive demand rather than branded navigational traffic.

What it does not claim

Search Console data is sampled and aggregated. The tool makes period comparisons repeatable; it does not invent causal proof that a content change produced a ranking move. Interpretation still belongs to the analyst.

Related work

← All work