How to Monitor Your Website's SEO Health with an API (Automated Regression Detection)
SEO regressions happen silently. A deploy removes a meta description. A template change breaks your heading hierarchy. A redirect drops your Open Graph tags. By the time you notice in Google Search Console, rankings have already dropped and traffic has bled out for weeks. The fix is not more manual auditing—it is automated SEO monitoring through an API that catches regressions the moment they happen.
What Is SEO Monitoring?
There is an important distinction between a one-time SEO audit and continuous SEO monitoring. An audit is a snapshot. You run it once, fix the issues, and move on. Monitoring is a loop. You run checks on a schedule—daily, weekly, or on every deploy—and compare results over time to catch regressions before they impact rankings.
A one-time audit tells you "your homepage is missing a meta description." Continuous monitoring tells you "your homepage had a meta description yesterday and it is gone today." That second insight is far more actionable because it points to a specific change that broke something.
The key metrics to track in an SEO monitoring pipeline are:
- Score trends: Is your overall SEO score going up, down, or sideways? A score drop of 5 or more points between runs signals a regression worth investigating.
- Individual check status: Which specific checks are passing and failing? A check that was passing last week and is failing today means something changed.
- New failures: Any check that flips from
pass: truetopass: falsebetween runs is a regression. These need immediate attention. - Historical baselines: Knowing your normal score range makes it easy to spot anomalies. If your homepage normally scores 85–90 and suddenly drops to 68, something broke.
Manual monitoring does not scale. If you have 50 pages, checking each one by hand every week takes hours. If you have 500 pages, it is impossible. An SEO monitoring API like SEOPeek lets you automate the entire process with a few dozen lines of code.
Building an SEO Monitoring Pipeline
Here is a step-by-step approach to building a complete automated SEO monitoring system using the SEOPeek API. The entire pipeline can be set up in under an hour.
Step 1: Define Your URL List
Start by identifying which pages matter most. You do not need to monitor every page on your site—focus on the pages that drive traffic and revenue. A practical approach is to parse your sitemap:
// parse-sitemap.js
const { XMLParser } = require("fast-xml-parser");
async function getUrlsFromSitemap(sitemapUrl) {
const res = await fetch(sitemapUrl);
const xml = await res.text();
const parser = new XMLParser();
const result = parser.parse(xml);
return result.urlset.url.map((entry) => entry.loc);
}
// Usage
const urls = await getUrlsFromSitemap("https://yoursite.com/sitemap.xml");
console.log(`Found ${urls.length} URLs to monitor`);
For most sites, monitoring your top 20–50 pages covers the majority of your organic traffic. Include your homepage, key landing pages, product pages, and any page ranking for a competitive keyword.
Step 2: Run Scheduled Audits
Use a cron job, a scheduled task runner, or GitHub Actions to run audits on a regular cadence. Weekly is a good starting point for most sites. High-traffic sites or sites with frequent deploys should run daily.
# crontab entry — run every Monday at 6 AM
0 6 * * 1 node /opt/seo-monitor/audit.js >> /var/log/seo-monitor.log 2>&1
Step 3: Store Results
Every run should save its results so you can compare against previous runs. A simple JSON file per run works for small-to-medium sites. For larger setups, use a database or append to a JSONL file:
const fs = require("fs");
function saveResults(results) {
const filename = `results/${new Date().toISOString().slice(0, 10)}.json`;
fs.writeFileSync(filename, JSON.stringify(results, null, 2));
}
function loadPreviousResults() {
const files = fs.readdirSync("results").sort().reverse();
if (files.length < 2) return null;
// files[0] is current run, files[1] is previous
return JSON.parse(fs.readFileSync(`results/${files[1]}`));
}
Step 4: Detect Regressions
The core of any monitoring system is comparison. For each URL, compare the current audit results against the previous run and flag anything that got worse:
function detectRegressions(current, previous) {
const regressions = [];
for (const url of Object.keys(current)) {
const curr = current[url];
const prev = previous[url];
if (!prev) continue;
// Score drop
if (prev.score - curr.score >= 5) {
regressions.push({
url,
type: "score_drop",
from: prev.score,
to: curr.score,
});
}
// New failures
for (const [check, result] of Object.entries(curr.checks)) {
if (!result.pass && prev.checks[check]?.pass) {
regressions.push({
url,
type: "new_failure",
check,
message: result.message,
});
}
}
}
return regressions;
}
Step 5: Alert on Failures
When regressions are detected, send an alert to wherever your team pays attention. Slack is the most common choice, but the same pattern works for email, PagerDuty, Microsoft Teams, or Discord:
async function sendSlackAlert(regressions) {
const text = regressions
.map((r) => {
if (r.type === "score_drop") {
return `*${r.url}*\nScore dropped from ${r.from} to ${r.to}`;
}
return `*${r.url}*\nNew failure: ${r.check} — ${r.message}`;
})
.join("\n\n");
await fetch(process.env.SLACK_WEBHOOK_URL, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
text: `SEO Regression Alert\n\n${text}`,
}),
});
}
Complete Node.js Monitoring Script
Here is a complete, ready-to-run script that ties all five steps together. It audits a list of URLs using the SEOPeek API, compares results with the previous run, and sends a Slack alert if any regressions are found:
// seo-monitor.js
const fs = require("fs");
const URLS = [
"https://yoursite.com",
"https://yoursite.com/pricing",
"https://yoursite.com/features",
"https://yoursite.com/blog",
];
const SLACK_WEBHOOK = process.env.SLACK_WEBHOOK_URL;
const RESULTS_DIR = "./seo-results";
const SCORE_THRESHOLD = 5;
async function main() {
if (!fs.existsSync(RESULTS_DIR)) fs.mkdirSync(RESULTS_DIR);
// Audit all URLs
const current = {};
for (const url of URLS) {
const res = await fetch(
`https://seopeek.web.app/api/audit?url=${encodeURIComponent(url)}`
);
current[url] = await res.json();
console.log(`${url} — Score: ${current[url].score} (${current[url].grade})`);
}
// Save current results
const today = new Date().toISOString().slice(0, 10);
fs.writeFileSync(
`${RESULTS_DIR}/${today}.json`,
JSON.stringify(current, null, 2)
);
// Load previous results
const files = fs.readdirSync(RESULTS_DIR).sort().reverse();
if (files.length < 2) {
console.log("First run — no previous data to compare.");
return;
}
const previous = JSON.parse(
fs.readFileSync(`${RESULTS_DIR}/${files[1]}`)
);
// Detect regressions
const regressions = [];
for (const url of URLS) {
const curr = current[url];
const prev = previous[url];
if (!prev) continue;
if (prev.score - curr.score >= SCORE_THRESHOLD) {
regressions.push(`${url}: score dropped ${prev.score} → ${curr.score}`);
}
for (const [check, result] of Object.entries(curr.checks)) {
if (!result.pass && prev.checks[check]?.pass) {
regressions.push(`${url}: ${check} now failing — ${result.message}`);
}
}
}
// Alert if regressions found
if (regressions.length > 0) {
console.warn(`Found ${regressions.length} regression(s)!`);
const text = `🔴 SEO Regression Alert\n\n${regressions.join("\n")}`;
if (SLACK_WEBHOOK) {
await fetch(SLACK_WEBHOOK, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ text }),
});
console.log("Slack alert sent.");
} else {
console.log(text);
}
} else {
console.log("No regressions detected.");
}
}
main().catch(console.error);
Run it with node seo-monitor.js and set SLACK_WEBHOOK_URL in your environment. The script is about 50 lines of actual logic and requires no dependencies beyond Node.js 18+ (which includes fetch natively).
GitHub Actions Workflow for SEO Monitoring
If you do not want to manage a server or cron job, GitHub Actions is a clean way to run automated SEO checks on a schedule. The following workflow runs weekly, audits your key pages, and opens a GitHub Issue if any regressions are detected:
# .github/workflows/seo-monitor.yml
name: Weekly SEO Monitor
on:
schedule:
- cron: "0 9 * * 1" # Every Monday at 9 AM UTC
workflow_dispatch: # Allow manual trigger
jobs:
seo-audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Audit key pages
id: audit
run: |
URLS=(
"https://yoursite.com"
"https://yoursite.com/pricing"
"https://yoursite.com/features"
)
FAILURES=""
for URL in "${URLS[@]}"; do
RESULT=$(curl -s "https://seopeek.web.app/api/audit?url=$URL")
SCORE=$(echo "$RESULT" | jq '.score')
GRADE=$(echo "$RESULT" | jq -r '.grade')
FAILS=$(echo "$RESULT" | jq '[.checks | to_entries[] | select(.value.pass == false)] | length')
echo "$URL — Score: $SCORE ($GRADE), Failing checks: $FAILS"
if [ "$SCORE" -lt 70 ]; then
FAILURES="$FAILURES\n- **$URL**: Score $SCORE ($GRADE) — $FAILS checks failing"
fi
done
if [ -n "$FAILURES" ]; then
echo "has_regressions=true" >> "$GITHUB_OUTPUT"
# Write multiline output
{
echo "details<> "$GITHUB_OUTPUT"
else
echo "has_regressions=false" >> "$GITHUB_OUTPUT"
fi
- name: Open issue on regression
if: steps.audit.outputs.has_regressions == 'true'
uses: actions/github-script@v7
with:
script: |
await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: `SEO Regression Detected — ${new Date().toISOString().slice(0, 10)}`,
body: `## SEO Monitoring Alert\n\nThe weekly SEO audit found pages scoring below the threshold (70):\n\n${process.env.DETAILS}\n\nRun a full audit at [SEOPeek](https://seopeek.web.app) to investigate.`,
labels: ["seo", "automated"]
});
env:
DETAILS: ${{ steps.audit.outputs.details }}
This workflow requires no secrets or API keys—SEOPeek's free tier gives you 50 audits per day, which is more than enough for a weekly monitoring job. The workflow_dispatch trigger lets you run it manually after a deploy if you want immediate feedback.
What to Monitor: The 5 Most Impactful SEO Checks
Not all SEO checks carry equal weight. If you are building a monitoring pipeline and want to focus on the signals that actually move rankings, these are the five checks that matter most:
1. Title Tag
The title tag is the single most important on-page ranking factor. It appears in search results as the clickable headline and directly influences both rankings and click-through rate. Monitor for: missing titles, titles that are too short (under 30 characters) or too long (over 60 characters), and duplicate titles across pages. A missing title tag can drop a page out of the top 10 results within days.
2. Meta Description
While meta descriptions are not a direct ranking factor, they heavily influence click-through rate. Google uses CTR as a quality signal. A page with no meta description gets a snippet auto-generated by Google, which is often poorly constructed and leads to lower CTR. Monitor for: missing descriptions, descriptions under 120 characters (wasted real estate), and descriptions over 160 characters (truncated in SERPs).
3. H1 Tag
The H1 tag signals the primary topic of a page to search engines. Pages should have exactly one H1 tag, and it should be relevant to the target keyword. Common regressions include: template changes that add a second H1, CMS updates that wrap the site logo in an H1, or component library upgrades that remove the H1 entirely. Multiple H1 tags dilute topical relevance and confuse crawlers.
4. Open Graph Tags
Open Graph tags control how your page appears when shared on social media, Slack, Discord, and messaging apps. While they do not directly affect search rankings, they drive significant referral traffic. A page shared on LinkedIn with a compelling image and title gets far more clicks than one that shows a blank preview. Monitor for: missing og:title, og:description, and og:image tags. Deploys that break OG tags are extremely common and often go unnoticed for weeks.
5. Structured Data (JSON-LD)
Structured data enables rich results in Google Search—star ratings, FAQ dropdowns, product prices, event dates, and more. Pages with rich results get significantly higher click-through rates than plain blue links. Monitor for: missing JSON-LD blocks, invalid schema markup, and schema type changes. A template update that removes your FAQ schema can eliminate your FAQ rich results overnight, dropping CTR by 20–30%.
Pro tip: Start by monitoring just these five checks on your top 20 pages. That gives you 100 data points per run—enough to catch the regressions that actually matter without drowning in noise. Expand coverage later as you build confidence in the system.
SEO Monitoring API vs. Full SEO Platforms
There is a growing divide in the SEO tools market between lightweight monitoring APIs and full-featured SEO platforms. Understanding when you need each saves you significant money and complexity.
| Aspect | Monitoring API | Full SEO Platform |
|---|---|---|
| Typical cost | $0–$29/mo | $99–$499/mo |
| On-page checks | Yes | Yes |
| Backlink analysis | No | Yes |
| Rank tracking | No | Yes |
| Keyword research | No | Yes |
| CI/CD integration | Native | Limited or none |
| Custom alerting | Build your own | Platform-defined |
| Setup time | Minutes | Hours to days |
| Best for | Dev teams, CI/CD, automation | SEO specialists, agencies |
Use a monitoring API when: your primary goal is preventing on-page regressions, you want to integrate SEO checks into your development workflow, or you need programmatic access to audit data without a GUI. At $9/month for 1,000 audits, an API like SEOPeek costs less than a single hour of an SEO consultant's time.
Use a full platform when: you need backlink analysis, keyword research, competitor tracking, or rank monitoring across hundreds of keywords. These are legitimate needs, but they are different problems from regression detection. Many teams use both—a lightweight API for automated monitoring and a full platform for strategic research.
The key insight is that most SEO regressions are on-page issues that a monitoring API catches perfectly. A missing meta description, a broken H1 tag, or a dropped OG image does not require a $99/month platform to detect. It requires a scheduled API call and a Slack notification.
Start Monitoring Your SEO for Free
SEOPeek gives you 50 free audits per day—enough to monitor your entire site weekly. No API key required. Set up automated regression detection in under 30 minutes.
Try SEOPeek free →Conclusion
SEO regressions are one of the most common and preventable causes of ranking drops. A template change, a CMS update, or a careless deploy can silently remove meta descriptions, break heading hierarchies, or drop structured data—and you will not know until traffic has already declined.
The solution is automated SEO monitoring through an API. Define your critical URLs, run audits on a schedule, compare results between runs, and alert your team when something breaks. The complete Node.js script above does this in under 50 lines of code. The GitHub Actions workflow does it with zero infrastructure.
SEOPeek makes this practical by providing a fast, structured API that returns 20 on-page checks per URL with a numeric score and letter grade. The free tier covers monitoring for most sites. Paid plans start at $9/month for teams that need higher volume. Set it up once, and you will never lose rankings to a silent regression again.