Use Case
Visual Website Monitoring
Catch visual regressions before your users do. Schedule screenshots of key pages and diff them automatically.
Standard uptime monitors only check HTTP status codes. They won't catch a broken layout, a missing image, or a white-screen error. Visual monitoring does.
Set up a cron job that captures screenshots of critical pages and compares them to a baseline:
import requests
import hashlib
from datetime import datetime
PAGES = [
"https://yourapp.com",
"https://yourapp.com/pricing",
"https://yourapp.com/dashboard",
]
for url in PAGES:
res = requests.get(
"https://api.snapsharp.dev/v1/screenshot",
params={"url": url, "cache": "false"},
headers={"Authorization": "Bearer sk_live_..."},
)
ts = datetime.now().strftime("%Y%m%d_%H%M")
filename = f"snapshots/{ts}_{hashlib.md5(url.encode()).hexdigest()[:8]}.png"
with open(filename, "wb") as f:
f.write(res.content)
print("Snapshots saved")Pass cache=false to always get a fresh screenshot. Store snapshots with timestamps and use an image diff library to detect changes.