Scheduled Monitoring Snapshot — Periodic Visual Checks
Capture regular screenshots of important pages on a schedule for visual monitoring, uptime verification, and change detection workflows.
Parameters
| Name | Value | Description |
|---|---|---|
| url | https://example.com | The page to monitor visually |
| width | 1280 | Consistent viewport for comparison |
| height | 720 | Consistent viewport for comparison |
| format | png | PNG for pixel-perfect comparisons |
cURL Example
curl -H "X-KEY: your-api-key" "https://api.scrnpix.com/screenshot?url=https://example.com&width=1280&height=720&format=png" -o "snapshot-$(date +%Y%m%d-%H%M%S).png"
SDK Example
import requests
from datetime import datetime
response = requests.get(
"https://api.scrnpix.com/screenshot",
headers={"X-KEY": "your-api-key"},
params={"url": "https://example.com", "width": 1280, "height": 720, "format": "png"}
)
timestamp = datetime.now().strftime("%Y%m%d-%H%M%S")
with open(f"snapshot-{timestamp}.png", "wb") as f:
f.write(response.content)Expected Output
| Content-Type | image/png |
| Credit Cost | 1 credit |
Failure Modes
Dynamic content causes false-positive changes
Symptom: Every screenshot looks different due to ads or timestamps
Fix: Use image comparison with a threshold tolerance, or mask known dynamic regions before comparing.
Rate limit exceeded on frequent monitoring
Symptom: HTTP 429 Too Many Requests
Fix: Space out monitoring intervals. The free tier allows 20 requests per minute. Upgrade to a higher plan for more frequent monitoring.
Frequently Asked Questions
How often should I schedule monitoring snapshots?
It depends on how critical the page is. Hourly checks work for most monitoring. For critical pages, every 15 minutes is reasonable within rate limits.
How do I compare screenshots automatically?
Use image diff libraries like pixelmatch (Node.js) or Pillow (Python) to compare consecutive snapshots pixel-by-pixel and flag significant changes.
Related Recipes
Basic Screenshot — Capture Any Web Page as PNG
Capture a simple PNG screenshot of any public web page with default viewport settings. The quickest way to get started with the Scrnpix API.
GET /animateCI Regression GIF — Automated Visual Testing Animation
Generate scroll GIFs in your CI pipeline for visual regression testing. Compare animations between builds to catch layout and scroll behavior changes.
Ready to try this recipe?
Get your API key and run this recipe in seconds. Free tier includes 50 credits per month.
Get API Key