How to Build a Website Monitoring System with Free APIs
How to Build a Website Monitoring System with Free APIs
Website monitoring doesn't have to be expensive. With a few free API calls, you can build a comprehensive monitoring system that checks your site's health every hour — no third-party dashboard needed.
The Architecture
A simple cron job that calls four APIs and sends you an alert if anything breaks:
- Dead Link Checker — Find broken links before your users do
- SSL Certificate Check — Get warned before your cert expires
- Performance Check — Track response times and detect slowdowns
- Screenshot — Visual regression detection
Step 1: Check for Broken Links
curl -s "https://51-68-119-197.sslip.io/api/deadlinks?url=https://yoursite.com&mode=quick" | jq '.broken_count'
The mode=quick parameter does a fast single-page check without launching a browser — perfect for frequent monitoring. If broken_count > 0, send an alert.
Step 2: Monitor SSL Expiry
curl -s "https://51-68-119-197.sslip.io/api/ssl?domain=yoursite.com" | jq '.validity.days_remaining'
Set your alert threshold to 14 days. This catches expiring certificates before they cause browser warnings.
Step 3: Track Performance
curl -s "https://51-68-119-197.sslip.io/api/perf?url=https://yoursite.com" | jq '.response_time_ms'
Alert if response time exceeds your baseline (e.g., 2x your average). Sudden spikes often indicate database issues, memory leaks, or traffic surges.
Step 4: Visual Regression Detection
# Capture current state
curl -s "https://51-68-119-197.sslip.io/api/screenshot?url=https://yoursite.com&format=png" -o current.png
# Compare with previous screenshot (using ImageMagick)
compare -metric AE previous.png current.png diff.png 2>&1
If the pixel difference exceeds your threshold, something changed visually. This catches CSS regressions, missing images, and layout breaks that automated tests miss.
Complete Monitoring Script
#!/bin/bash
SITE="https://yoursite.com"
BASE="https://51-68-119-197.sslip.io"
ALERT_EMAIL="you@example.com"
# Check broken links
BROKEN=$(curl -s "$BASE/api/deadlinks?url=$SITE&mode=quick" | jq -r '.broken_count')
if [ "$BROKEN" -gt 0 ]; then
echo "ALERT: $BROKEN broken links found on $SITE" | mail -s "Broken Links Alert" $ALERT_EMAIL
fi
# Check SSL
DAYS=$(curl -s "$BASE/api/ssl?domain=$(echo $SITE | sed 's|https://||')" | jq -r '.validity.days_remaining')
if [ "$DAYS" -lt 14 ]; then
echo "ALERT: SSL certificate expires in $DAYS days" | mail -s "SSL Expiry Warning" $ALERT_EMAIL
fi
# Check performance
RESPONSE=$(curl -s "$BASE/api/perf?url=$SITE" | jq -r '.response_time_ms')
if [ "${RESPONSE%.*}" -gt 5000 ]; then
echo "ALERT: Response time is ${RESPONSE}ms (>5s)" | mail -s "Performance Alert" $ALERT_EMAIL
fi
Add this to your crontab:
0 * * * * /home/user/monitor.sh
Scaling Up
For more frequent checks or multiple sites, grab a free API key:
curl -X POST "https://51-68-119-197.sslip.io/api/keys" \
-H "Content-Type: application/json" \
-d '{"email":"you@example.com"}'
This gives you 50 requests/day across all endpoints — enough to monitor 10+ sites hourly.
The Full Audit Shortcut
Don't want to call four APIs separately? The Website Audit Bundle combines tech stack, SSL, and performance in one call:
curl -s "https://51-68-119-197.sslip.io/api/audit?url=https://yoursite.com&seo=true"
This returns everything in a single JSON response — perfect for dashboard integration.
Why Free APIs?
Most monitoring services charge $10-50/month for basic checks. These APIs are free with no signup required. The trade-off is rate limits (5-20 requests/day per IP without a key), but for personal projects and small businesses, that's plenty.
If you need more volume, API keys are free and paid plans start at $9.99/month via RapidAPI.