SEO monitoring doesn't always require a comprehensive commercial software subscription. If you're monitoring a website you own, the Google Search Console API can provide a useful foundation for building custom performance reports.

While researching Moz Pro alternatives, one distinction worth exploring was the difference between competitive SEO research and first-party website monitoring.

For the latter, let's build a small Python pipeline that retrieves search performance data, compares reporting periods and identifies pages requiring investigation.

This isn't a complete replacement for a commercial SEO suite. It's a practical way to automate a specific monitoring task.

What we're building

The pipeline will:

  • Retrieve page-level search performance.
  • Compare two seven-day periods.
  • Calculate changes in clicks and impressions.
  • Identify pages with substantial visibility but declining traffic.
  • Export the results to a CSV file.

Prerequisites

You'll need Python 3.10+, access to a verified Google Search Console property and a Google Cloud project with the Search Console API enabled.

Install the required packages:

pip install google-api-python-client google-auth pandas 

Configure Application Default Credentials using an identity that has access to your Search Console property.

For service-account authentication, the service account must also be granted the appropriate property permissions.

Step 1: Connect to Search Console

import google.auth from googleapiclient.discovery import build SCOPES = [ "https://www.googleapis.com/auth/webmasters.readonly" ] credentials, _ = google.auth.default( scopes=SCOPES ) service = build( "searchconsole", "v1", credentials=credentials ) SITE_URL = "sc-domain:example.com" 

Replace the example domain with your verified property identifier.

URL-prefix properties require the corresponding full URL instead.

Step 2: Retrieve page-level performance

The Search Analytics API allows you to request clicks, impressions, CTR and average position for specified dimensions.

import pandas as pd def fetch_pages(start_date, end_date): rows = [] offset = 0 page_size = 25000 while True: request = { "startDate": start_date, "endDate": end_date, "dimensions": ["page"], "type": "web", "dataState": "final", "rowLimit": page_size, "startRow": offset } response = service.searchanalytics().query( siteUrl=SITE_URL, body=request ).execute() batch = response.get("rows", []) rows.extend(batch) if len(batch) < page_size: break offset += page_size records = [ { "page": row["keys"][0], "clicks": row["clicks"], "impressions": row["impressions"], "ctr": row["ctr"], "position": row["position"] } for row in rows ] return pd.DataFrame( records, columns=[ "page", "clicks", "impressions", "ctr", "position" ] ) 

Pagination helps retrieve additional available rows. However, the API doesn't guarantee exhaustive reporting of every underlying search event.

Step 3: Compare equivalent reporting periods

Comparing complete seven-day periods helps reduce weekday-related differences.

We'll leave a three-day reporting buffer to reduce the likelihood of including incomplete recent data.

from datetime import date, timedelta end = date.today() - timedelta(days=3) start = end - timedelta(days=6) previous_end = start - timedelta(days=1) previous_start = previous_end - timedelta(days=6) current = fetch_pages( start.isoformat(), end.isoformat() ) previous = fetch_pages( previous_start.isoformat(), previous_end.isoformat() ) 

The reporting buffer is configurable. It doesn't guarantee that all data has been finalised.

Step 4: Calculate performance changes

Merge the two datasets using page URLs as the matching identifier.

report = current.merge( previous, on="page", how="outer", suffixes=("_current", "_previous") ) for metric in ["clicks", "impressions"]: for period in ["current", "previous"]: column = f"{metric}_{period}" report[column] = report[column].fillna(0) report["click_change"] = ( report["clicks_current"] - report["clicks_previous"] ) report["impression_change"] = ( report["impressions_current"] - report["impressions_previous"] ) report["click_change_pct"] = ( report["click_change"] .div( report["clicks_previous"].replace(0, float("nan")) ) .mul(100) ) 

Notice that we don't replace missing position values with zero. An absent ranking measurement shouldn't be interpreted as position zero.

Similarly, percentage growth is undefined when the previous click count is zero.

Step 5: Identify pages worth investigating

Instead of reporting every fluctuation, apply a simple set of investigation thresholds.

opportunities = report[ (report["impressions_current"] >= 500) & (report["clicks_previous"] >= 10) & (report["click_change_pct"] <= -20) ].copy() opportunities = opportunities.sort_values( "click_change" ) opportunities.to_csv( "seo_investigation_report.csv", index=False ) print(opportunities[ [ "page", "clicks_current", "clicks_previous", "click_change_pct" ] ].head(10)) 

These thresholds are illustrative. A small website may need substantially lower thresholds, while a large publisher may need higher ones.

Step 6: Interpret the results carefully

A decline in clicks doesn't automatically indicate an SEO problem.

Possible explanations include:

  • Seasonal changes in search demand.
  • Changes in ranking positions.
  • Different search result layouts.
  • Competitor activity.
  • Changes in query composition.
  • Incomplete or limited reporting data.

The script identifies candidates for investigation. It doesn't establish the cause of their performance changes.

A useful next step would be to retrieve query-level data for flagged pages and investigate which searches contributed to the decline.

Extending the pipeline

Once the basic reporting system works, you could add:

  • Scheduled execution through cron or a cloud scheduler.
  • Historical storage in SQLite or PostgreSQL.
  • Notifications when meaningful thresholds are exceeded.
  • Integration with analytics conversion data.
  • A task queue for SEO investigations.

The important architectural decision is to keep data collection, anomaly detection and corrective actions separate.

That prevents a reporting fluctuation from automatically triggering potentially unnecessary website changes.

What this approach cannot replace

Search Console primarily provides information about your own verified website's performance on Google.

It isn't a comprehensive competitor keyword database, backlink intelligence platform or independent rank tracker.

For those activities, additional data sources may still be necessary.

You can find the API documentation here:

https://developers.google.com/webmaster-tools/v1/searchanalytics/query

Final thoughts

Building a small SEO monitoring pipeline is a useful way to understand what your software actually does.

It also helps distinguish tasks that require specialist commercial datasets from tasks that can be automated using first-party data.

That distinction can make your overall SEO stack simpler, more transparent and easier to maintain.